Sign Up

CLI

A reference of supported operations using the Daytona CLI.

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.

Installation

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

The v2 CLI is released as 2.0.0-alpha.N versions. The daytona Homebrew formula and the latest GitHub release install the v0 CLI, so use the commands below.

brew install daytonaio/cli/daytona-alpha

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:

brew trust daytonaio/cli

To upgrade the Daytona CLI to the latest version:

brew upgrade daytonaio/cli/daytona-alpha

Alternatively, install without Homebrew. The script installs the newest 2.x release after verifying its checksum:

curl -fsSL https://github.com/daytona/clients/releases/download/v2.0.0-alpha.11/install.sh | sh

To install a specific release, set DAYTONA_VERSION for the script, for example curl -fsSL <script URL> | DAYTONA_VERSION=2.0.0-alpha.11 sh or $env:DAYTONA_VERSION = "2.0.0-alpha.11" in PowerShell before irm.

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

Sections

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

daytona

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, and an error is one JSON object on stderr. Authorization is decided by the server; the CLI only presents the credential you give it.

Get started:

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
daytona [flags]

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, for test environments (env DAYTONA_V2_API_URL; default https://api.daytona.com)
--debugboollog every request to stderr
--orgstringorganization id or name for this call (env DAYTONA_ORG)
--output-ostringoutput format: table|json|yaml (yml is an alias of yaml; default table at a terminal, json otherwise)
--profilestringsaved profile to use; it must exist (env DAYTONA_PROFILE)
--projectstringproject id or name for this call (env DAYTONA_PROJECT)
--quiet-qboolsuppress progress and informational output on stderr
--version-vboolprint the CLI version and exit
--yes-yboolconfirm destructive and billable actions; required off a terminal (env DAYTONA_YES=1)