# CLI Reference The `chaser` CLI is a thin client over the public Chaser API. ## Installation Download the latest release from the [Chaser dashboard](https://chaser.sh/dashboard) or build from source. ## Configuration Set credentials via environment variables or flags: ```bash export CHASER_API_URL="https://api.chaser.sh" export CHASER_API_KEY="sk_your_key_here" export CHASER_ACCOUNT="personal" # or an organization name ``` Or pass them as flags: ```bash chaser --api-url "$CHASER_API_URL" --api-key "$CHASER_API_KEY" --account personal ``` ## Commands ### Sessions ```bash # Create sessions chaser browser --ephemeral --json chaser browser --workspace my-browser --json chaser sandbox --ephemeral --json chaser sandbox --workspace my-sandbox --json chaser sandbox --ephemeral --image ghcr.io/example/dev:latest --json # Interactive shell chaser shell chaser shell -c "ls -la" # List and inspect chaser sessions list --format table chaser sessions list --format json --type sandbox chaser sessions info --json # Runtime diagnostic chaser sessions self-test --json # Terminate chaser sessions terminate chaser sessions bulk-terminate --all --json ``` ### Workspaces ```bash # Create chaser workspaces create --session-type sandbox --name dev --json chaser workspaces create --session-type sandbox --name dev --image ghcr.io/example/dev:latest --json chaser workspaces create --session-type sandbox --name base --template --json chaser workspaces create --clone-from base --name feature --json # List and manage chaser workspaces list --format table chaser workspaces label new-name chaser workspaces label --clear chaser workspaces template set chaser workspaces template set --disable # Snapshots chaser workspaces snapshots create --name checkpoint --json chaser workspaces snapshots list --json chaser workspaces snapshots restore checkpoint --force --json chaser workspaces snapshots delete checkpoint --json # Delete chaser workspaces delete --force chaser workspaces bulk-delete --all --json ``` ### File transfer ```bash chaser upload ./local-file /workspace/remote-file chaser download /workspace/remote-file ./local-file chaser teleport --local ./my-app --remote /workspace ``` ### Port forwarding ```bash chaser forward [local_port] [--open] [--wait ] ``` ### Jobs ```bash # Execute chaser jobs exec --workspace dev "npm test" --wait --json chaser jobs exec --ephemeral --image ghcr.io/example/dev:latest "echo hi" --wait --json # Scrape chaser jobs scrape --url "https://example.com" --wait --json # List and inspect chaser jobs kinds --json ``` ### Accounts ```bash # List accounts chaser accounts list --json chaser accounts current --json # Organizations chaser accounts create-org --name "Acme Engineering" --json # Members (on active organization account) chaser --account "Acme Engineering" accounts members list --json chaser --account "Acme Engineering" accounts members add --email user@example.com --role admin --json chaser --account "Acme Engineering" accounts members update --role member --json chaser --account "Acme Engineering" accounts members remove --json # Service accounts chaser --account "Acme Engineering" accounts service-accounts list --json chaser --account "Acme Engineering" accounts service-accounts create --name deploy-bot --json chaser --account "Acme Engineering" accounts service-accounts keys create \ --name key-name --scope sessions.read --scope exec.write --json chaser --account "Acme Engineering" accounts service-accounts keys revoke --json ``` ### API keys ```bash chaser keys create --name automation --scope sessions.read --scope exec.write --json ``` Keys are bound to the account selected at creation time. ### Webhooks ```bash # Create chaser --account "Acme Engineering" webhooks create \ --url https://example.com/webhooks \ --event session.created --event session.terminated --json # Deliveries chaser --account "Acme Engineering" webhooks deliveries list --status failed --json chaser --account "Acme Engineering" webhooks deliveries replay --json chaser --account "Acme Engineering" webhooks deliveries discard --json ``` ### SSH ```bash chaser ssh --addr 127.0.0.1:2222 --mode human ``` ## Output formats Most commands support `--json` for machine-readable output and `--format table` for human-readable tables. Use `--help` at any command depth for full syntax.