Reference for all depot claude commands. To install the Depot CLI, see Installation.
Other Depot product CLI references:
depot claudeRun Claude Code in remote agent sandboxes backed by Depot with automatic session & file system saving and resuming. Sessions are stored by Depot and can be resumed by session ID, allowing you to collaborate on any session in your organization across any environment.
By default, Claude Code runs in a remote sandbox environment.
Note: All flags not recognized by depot are passed directly through to the Claude CLI. This includes Claude flags like -p, --model, etc.
Example
Start a new Claude Code session with a custom ID:
depot claude --session-id feature-auth-redesignResume an existing session:
depot claude --resume feature-auth-redesignRun Claude Code locally instead of in a sandbox:
Note: This will only persist the Claude Code session information up to Depot, but not execute in a remote sandbox.
depot claude --local --session-id local-developmentWork with a Git repository in the sandbox:
depot claude --repository https://github.com/user/repo.git --branch main --session-id repo-workUse a private repository with authentication:
Note: You can use the --git-secret flag to specify a secret containing your Git credentials, or use the Depot Code app installed in your GitHub organization.
depot claude secrets add GITHUB_TOKEN
depot claude --repository https://github.com/org/private-repo.git --git-secret GITHUB_TOKENMix Depot flags with Claude flags:
depot claude --session-id older-claude-pr-9953 --model claude-3-opus-20240229 -p "write tests"Use in a script with piped input:
cat code.py | depot claude -p "review this code" --session-id code-reviewclaude| Name | Description |
|---|---|
help | Show help for claude command |
local | Run Claude locally instead of in a remote sandbox |
org | Organization ID (optional) |
output | Output format (json, csv) |
repository | Git repository URL for remote context (format: https://github.com/user/repo.git) |
branch | Git branch to use (defaults to main) |
git-secret | Secret name containing Git credentials for private repositories if not using Depot Code app |
resume | Resume a session by ID |
session-id | Custom session ID for saving |
token | Depot API token |
wait | Wait for the remote Claude session to complete (by default exits after starting) |
depot claude list-sessionsList all saved Claude sessions for the organization. In interactive mode, pressing Enter on a session will start Claude with that session.
Example
List sessions interactively:
depot claude list-sessionsList sessions in JSON format:
depot claude list-sessions --output jsonclaude list-sessions| Name | Description |
|---|---|
help | Show help for list-sessions |
org | Organization ID |
output | Output format (json, csv) |
token | Depot API token |
depot claude secretsManage secrets that can be used in Claude sandboxes. Secrets are stored securely and scoped to your organization, available as environment variables in sandbox sessions.
depot claude secrets addAdd a new secret to your organization. You'll be prompted to enter the secret value securely.
Example
# Add a secret interactively
depot claude secrets add GITHUB_TOKEN
# Add a secret with value (use with caution)
depot claude secrets add API_KEY --value "secret-value"depot claude secrets listList all secrets in your organization. Note that secret values are never displayed.
Example
depot claude secrets listdepot claude secrets removeRemove a secret from your organization.
Example
depot claude secrets remove GITHUB_TOKENclaude secrets| Name | Description |
|---|---|
help | Show help for secrets command |
org | Organization ID |
token | Depot API token |
value | Secret value (for add command only, prompted if not provided) |