CLI reference
pandastack — the official CLI.
Installation
The CLI ships with the TypeScript SDK on npm:
npm install -g @pandastack/sdk # provides the `pandastack` commandConfiguration
export PANDASTACK_API_KEY=pds_abc123def456...
export PANDASTACK_API_URL=https://api.pandastack.ai # optional overridepandastack auth login prints the same setup steps, including the config-file
alternative (~/.config/pandastack/config.json). Commands print JSON, so they
compose with jq:
pandastack sandbox list | jq -r '.[].id'Auth
pandastack auth login # API key setup instructions
pandastack auth logout # remove the saved key from the config file
pandastack me # show the authenticated identitySandboxes
pandastack sandbox create --template code-interpreter --ttl 3600
pandastack sandbox create --template base --metadata job=demo,env=ci
pandastack sandbox create --from-snapshot <snapshot-id>
pandastack sandbox list
pandastack sandbox get <id>
pandastack sandbox exec <id> --timeout 30 -- python -c 'print(42)'
pandastack sandbox run-code <id> --language python -- "print(2 + 2)"
pandastack sandbox logs <id> --stream both --follow
pandastack sandbox ssh <id>
pandastack sandbox pause <id>
pandastack sandbox resume <id>
pandastack sandbox snapshot <id>
pandastack sandbox fork <id>
pandastack sandbox fork-tree <id> --count 5
pandastack sandbox hibernate <id>
pandastack sandbox wake <id>
pandastack sandbox lifecycle <id>
pandastack sandbox set-ttl <id> --ttl 3600
pandastack sandbox set-persistent <id> --persistent true
pandastack sandbox preview-url <id> --port 3000
pandastack sandbox preview-urls <id>
pandastack sandbox delete <id>sb is an alias for sandbox. TTLs and timeouts are in seconds.
Filesystem
pandastack fs read <id> --path /workspace/out.txt
pandastack fs write <id> --path /workspace/in.txt --content "hello" # or --stdin
pandastack fs upload <id> --local ./local.txt --remote /workspace/local.txt
pandastack fs download <id> --remote /workspace/out.txt --local ./out.txtTemplates
pandastack template list
pandastack template get code-interpreter
pandastack template build --name my-template -f Dockerfile --size-mb 2048
pandastack template build-logs <build-id> --follow
pandastack template build-status <build-id>
pandastack template builds
pandastack template push --name my-template -f Dockerfile # advanced: local docker build + push
pandastack template delete my-templateFirst-party templates: base, code-interpreter, agent, claude-agent, browser, postgres-16, postgres-16-4g, postgres-16-16g.
Databases (Beta)
Manage managed PostgreSQL databases. db is an alias for database.
pandastack database create --label app --size 1g
pandastack database list
pandastack database get <id>
pandastack database connection <id>
pandastack database clone <id> --label copy
pandastack database wake <id>
pandastack database update <id> --always-on
pandastack database reset-credentials <id>
pandastack database delete <id>--label is optional and just tags the database for easy identification in list. --size picks the RAM tier (1g, 4g, 16g); CPU is otherwise fixed by the template snapshot. connection returns the postgres:// URL for the database.
Functions and schedules
pandastack fn deploy ./my-project/ --name my-fn --runtime python --entrypoint handler.py
pandastack fn list
pandastack fn get <id>
pandastack fn update <id> --env LOG_LEVEL=debug
pandastack fn invoke <id>
pandastack fn runs <id>
pandastack fn metrics <id> --period 24
pandastack fn delete <id>
pandastack schedule create --name nightly --fn <function-id> --cron "0 2 * * *"
pandastack schedule list
pandastack schedule pause <id>
pandastack schedule resume <id>
pandastack schedule trigger <id>
pandastack schedule runs <id>
pandastack schedule delete <id>fn is an alias for function; sched for schedule.
Apps
pandastack app create --name my-site --git-url https://github.com/me/my-site --port 3000
pandastack app list
pandastack app get <id>
pandastack app deploy <id> --follow
pandastack app deploys <id>
pandastack app logs <id> <deployment-id>
pandastack app rollback <id>
pandastack app delete <id>Snapshots
pandastack snapshot list
pandastack snapshot list --sandbox <sandbox-id>
pandastack snapshot get <id>
pandastack snapshot delete <id>Tokens
pandastack token list
pandastack token create --label local-dev
pandastack token revoke pds_abc123Misc
pandastack version
pandastack --help
pandastack cma # run a self-hosted Claude Managed Agents workerFor file transfer use pandastack fs upload / pandastack fs download; there is no cp or completion subcommand.