Skip to content

CLI

View as Markdown

Daytona provides command-line access to core features for interacting with Daytona Sandboxes, including managing their lifecycle, snapshots, and more.

The CLI reference lists all commands supported by the daytona command-line tool, complete with a description of their behavior, and any supported flags. You can access this documentation on a per-command basis by appending the --help/-h flag when invoking daytona.

Install the Daytona CLI to interact with Daytona sandboxes from the command line.

Terminal window
brew install daytonaio/cli/daytona

Trust the tap once so routine brew upgrade keeps the Daytona CLI up to date. Recent Homebrew versions require third-party taps to be explicitly trusted; without it, a bare brew upgrade skips the Daytona tap and the CLI goes stale:

Terminal window
brew trust daytonaio/cli

To upgrade the Daytona CLI to the latest version:

Terminal window
brew upgrade daytonaio/cli/daytona

Alternatively, install directly without Homebrew:

For Apple Silicon (arm64):

Terminal window
sudo curl -fL https://github.com/daytona/clients/releases/latest/download/daytona-darwin-arm64 -o /usr/local/bin/daytona && sudo chmod +x /usr/local/bin/daytona

For Intel (amd64):

Terminal window
sudo curl -fL https://github.com/daytona/clients/releases/latest/download/daytona-darwin-amd64 -o /usr/local/bin/daytona && sudo chmod +x /usr/local/bin/daytona

After installing the Daytona CLI, use the daytona command to interact with Daytona sandboxes from the command line.

The reference groups commands into the following sections. Global flags that apply to every command are listed under daytona.

SectionCommands
Login and contextdaytona login, daytona logout, daytona profile, daytona whoami
Sandboxes and resourcesdaytona cpu-type, daytona image, daytona mac-model, daytona region, daytona reservation, daytona sandbox, daytona snapshot
Organization managementdaytona audit, daytona billing, daytona invite, daytona key, daytona member, daytona org, daytona org-key, daytona project, daytona registry, daytona role, daytona secret, daytona service-account
Otherdaytona completion, daytona config, daytona docs, daytona version

Daytona — sandboxes, images, snapshots and your organization, from the terminal

daytona is the command line for the Daytona platform.

At a terminal it is interactive: tables, pickers and a confirmation before destructive actions. When piped, redirected or run with —output json it is a strict tool: no prompts, —yes required for destructive verbs, JSON on stdout, diagnostics on stderr. Authorization is decided by the server; the CLI only presents the credential you give it.

Get started:

Terminal window
daytona login browser login (or --device on a remote host)
daytona image create py312 --ref python:3.12 import a registry image once
daytona sandbox create --image py312
daytona sandbox exec <id> -- python -c 'print(1)'
daytona docs --full the whole reference in one page

Global flags

Global flags apply to every command.

LongShortTypeDefaultDescription
--api-keystringstatic credential sent as-is; disables the saved login for this call (env DAYTONA_API_KEY)
--api-urlstringAPI base URL (env DAYTONA_API_URL)
--debugboollog every request to stderr
--file-fstringJSON request body from a file (or - for stdin); explicit flags override its fields
--no-waitboolreturn once the server accepts the operation instead of waiting for it to finish
--orgstringorganization id or name for this call (env DAYTONA_ORG)
--output-ostringtableoutput format: table|json|yaml
--profilestringconfig profile to use (env DAYTONA_PROFILE)
--projectstringproject id or name for this call (env DAYTONA_PROJECT)
--quiet-qboolsuppress progress and informational output on stderr
--regionstringregion slug; filters lists and places creates (env DAYTONA_REGION)
--timeoutstring10mhow long to wait for an operation to finish
--yes-yboolskip confirmation prompts (env DAYTONA_YES=1)