Skip to content

Deploy: CLI Commands

Terminal window
promptarena deploy [subcommand] [flags]

The deploy command manages prompt pack deployments to cloud providers through adapter plugins. It supports planning, applying, monitoring, and destroying deployments across multiple environments.

FlagShortDefaultDescription
--env-e"default"Target environment name
--configarena.yamlPath to config file
--packAuto-detectedPath to .pack.json file

Pack auto-detection searches the current directory for *.pack.json files.

Run plan and apply sequentially. This is the default command.

Terminal window
promptarena deploy [flags]

Examples:

Terminal window
# Deploy to default environment
promptarena deploy
# Deploy to production
promptarena deploy --env production
# Deploy with explicit pack file
promptarena deploy --pack dist/app.pack.json
# Deploy with custom config
promptarena deploy --config deploy.yaml --env staging

Process:

  1. Load arena.yaml deploy config
  2. Resolve pack file (auto-detect or --pack)
  3. Merge base config with environment overrides
  4. Load prior state (if exists)
  5. Refresh state from live environment (pre-plan state refresh)
  6. Call adapter Plan
  7. Call adapter Apply
  8. Save state with adapter state, pack checksum, and timestamps

Preview deployment changes without modifying any resources.

Terminal window
promptarena deploy plan [flags]

Examples:

Terminal window
# Plan for default environment
promptarena deploy plan
# Plan for production
promptarena deploy plan --env production

Output format:

Planning deployment (env: production)...
Provider: agentcore v0.2.0
Changes:
+ agent_runtime.greeting Create agent runtime
~ a2a_endpoint.greeting Update A2A endpoint
- old_resource.legacy Delete legacy resource
unchanged.resource No change
Summary: 1 to create, 1 to update, 1 to delete

Change symbols:

SymbolAction
+CREATE
~UPDATE
-DELETE
!DRIFT
NO_CHANGE

Apply deployment changes (called automatically by deploy).

Terminal window
promptarena deploy apply [flags]

Examples:

Terminal window
# Apply to staging
promptarena deploy apply --env staging

Show current deployment status and resource health.

Terminal window
promptarena deploy status [flags]

Examples:

Terminal window
# Status for default environment
promptarena deploy status
# Status for production
promptarena deploy status --env production

Output format:

Status: deployed
Last deployed: 2026-02-16T10:30:00Z
Pack checksum: sha256:abc123def456...
Resources:
agent_runtime.greeting: healthy
a2a_endpoint.greeting: healthy — serving at https://example.com/a2a

Status values:

StatusMeaning
deployedAll resources running
not_deployedNo resources found
degradedSome resources unhealthy
unknownUnable to determine

Resource health:

HealthMeaning
healthyRunning normally
unhealthyExists but has issues
missingExpected but not found

Requires: Prior deployment state (exits with error if no state exists).


Tear down all managed resources.

Terminal window
promptarena deploy destroy [flags]

Examples:

Terminal window
# Destroy staging deployment
promptarena deploy destroy --env staging

Process:

  1. Load prior state (exit if none exists)
  2. Call adapter Destroy with prior state
  3. Delete local state file
  4. Display completion message

Requires: Prior deployment state.


Refresh local state from the live environment. Queries the adapter for the current state of all resources and updates local state to match reality. Use this to detect drift between local state and cloud resources.

Terminal window
promptarena deploy refresh [flags]

Examples:

Terminal window
# Refresh state for default environment
promptarena deploy refresh
# Refresh state for production
promptarena deploy refresh --env production

Process:

  1. Acquire deploy lock
  2. Load prior state (exit if none exists)
  3. Call adapter Status with prior state
  4. Update adapter state and last_refreshed timestamp
  5. Save updated state
  6. Display resource status (drift shown with !)

Requires: Prior deployment state.


Import a pre-existing resource into deployment state. This allows PromptKit to manage resources that were created outside of the deploy workflow.

Terminal window
promptarena deploy import <type> <name> <id> [flags]

Arguments:

ArgumentDescription
typeResource type (e.g., agent_runtime, a2a_endpoint)
nameResource name to assign in local state
idProvider-specific resource identifier

Examples:

Terminal window
# Import an agent runtime
promptarena deploy import agent_runtime my-agent container-abc123
# Import an A2A endpoint
promptarena deploy import a2a_endpoint my-ep endpoint-xyz789
# Import into a specific environment
promptarena deploy import agent_runtime my-agent container-abc123 --env production

Process:

  1. Acquire deploy lock
  2. Load prior state (or create new state if none exists)
  3. Call adapter Import with resource type, name, and identifier
  4. Update or create local state with adapter response
  5. Save updated state with last_refreshed timestamp
  6. Display imported resource information

Install an adapter binary from the registry.

Terminal window
promptarena deploy adapter install <provider>[@<version>]

Examples:

Terminal window
# Install latest version
promptarena deploy adapter install agentcore
# Install specific version
promptarena deploy adapter install agentcore@0.2.0

Process:

  1. Look up provider in the built-in adapter registry
  2. Determine version (specified or latest from registry)
  3. Download binary from GitHub Releases for current OS/architecture
  4. Install to ~/.promptarena/adapters/promptarena-deploy-{provider}
  5. Set executable permissions (0755)

Download URL format:

https://github.com/{repo}/releases/download/v{version}/promptarena-deploy-{provider}_{os}_{arch}

List all installed adapters.

Terminal window
promptarena deploy adapter list

Output format:

Installed adapters:
agentcore ~/.promptarena/adapters/promptarena-deploy-agentcore
custom .promptarena/adapters/promptarena-deploy-custom

Searches:

  1. Project-local: .promptarena/adapters/
  2. User-level: ~/.promptarena/adapters/

Remove an installed adapter.

Terminal window
promptarena deploy adapter remove <provider>

Examples:

Terminal window
promptarena deploy adapter remove agentcore

Removes the binary from ~/.promptarena/adapters/.

The deploy section in arena.yaml:

deploy:
provider: agentcore # Required: adapter name
config: # Optional: base provider config
region: us-west-2
environments: # Optional: per-environment overrides
production:
config:
region: us-east-1
PathDescription
arena.yamlDefault config file
*.pack.jsonAuto-detected pack files
.promptarena/deploy.stateDeployment state (JSON)
.promptarena/deploy.lockDeploy lock file (prevents concurrent access)
.promptarena/adapters/Project-local adapters
~/.promptarena/adapters/User-level adapters