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-v0 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-v0.

Install the Daytona CLI to interact with Daytona sandboxes from the command line. The Daytona v0 CLI installs as daytona-v0, next to the Daytona v2 CLI, which installs as daytona.

Terminal window
brew install daytonaio/cli/daytona-v0

To upgrade the Daytona CLI to the latest 0.x version:

Terminal window
brew upgrade daytonaio/cli/daytona-v0

Alternatively, install directly without Homebrew. The script downloads the latest 0.x release, verifies its checksum, and installs it to /usr/local/bin, or to ~/.local/bin if /usr/local/bin is not writable:

Terminal window
curl -fsSL https://raw.githubusercontent.com/daytona/clients/release/v0/cli/install-v0.sh | sh

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

Daytona CLI

Terminal window
daytona-v0 [flags]

Flags

LongShortDescription
--helphelp for daytona-v0
--version-vDisplay the version of Daytona

Archive a sandbox

Terminal window
daytona-v0 archive [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Adds a completion script for your shell environment

Terminal window
daytona-v0 autocomplete [bash|zsh|fish|powershell] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Create a new sandbox

Terminal window
daytona-v0 create [flags]

Flags

LongShortDescription
--auto-archiveAuto-archive interval in minutes (0 means the maximum interval will be used)
--auto-deleteAuto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
--auto-pauseAuto-pause interval in minutes (0 means disabled). Only supported for sandbox classes that support pausing. Not allowed for ephemeral sandboxes. Mutually exclusive with —auto-stop
--auto-stopAuto-stop interval in minutes (0 means disabled). Server default: 15, except for sandbox classes that support pausing where auto-pause defaults to 60 instead
--context-cFiles or directories to include in the build context (can be specified multiple times)
--cpuCPU cores allocated to the sandbox
--diskDisk space allocated to the sandbox in GB
--dockerfile-fPath to Dockerfile for Sandbox snapshot
--env-eEnvironment variables (format: KEY=VALUE)
--gpuGPU units allocated to the sandbox
--kvmExpose KVM (/dev/kvm) inside the sandbox via nested virtualization. linux-vm snapshots only. Requires the sandbox_kvm feature for the organization.
--label-lLabels (format: KEY=VALUE)
--memoryMemory allocated to the sandbox in MB
--nameName of the sandbox
--network-allow-listComma-separated list of allowed CIDR network addresses for the sandbox
--network-block-allWhether to block all network access for the sandbox
--publicMake sandbox publicly accessible
--queue-timeoutMinutes to wait for runner assignment before the sandbox creation is cancelled (omit to use the organization default)
--snapshotSnapshot to use for the sandbox
--targetTarget region (eu, us)
--ttlMaximum time to live in minutes, counted as wall-clock time since creation regardless of sandbox state (0 means disabled). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
--userUser associated with the sandbox
--volume-vVolumes to mount (format: VOLUME_ID_OR_NAME:MOUNT_PATH)
--helphelp for daytona-v0

Delete a sandbox

Terminal window
daytona-v0 delete [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--all-aDelete all sandboxes
--helphelp for daytona-v0

Opens the Daytona documentation in your default browser.

Terminal window
daytona-v0 docs [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Execute a command in a sandbox

Terminal window
daytona-v0 exec [SANDBOX_ID | SANDBOX_NAME] -- [COMMAND] [ARGS...] [flags]

Flags

LongShortDescription
--cwdWorking directory for command execution
--timeoutCommand timeout in seconds (0 for no timeout)
--helphelp for daytona-v0

Get sandbox info

Terminal window
daytona-v0 info [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--format-fOutput format. Must be one of (yaml, json)
--helphelp for daytona-v0

List sandboxes

Terminal window
daytona-v0 list [flags]

Flags

LongShortDescription
--cursor-cCursor for pagination
--format-fOutput format. Must be one of (yaml, json)
--limit-lMaximum number of items per page
--helphelp for daytona-v0

Log in to Daytona

Terminal window
daytona-v0 login [flags]

Flags

LongShortDescription
--api-keyAPI key to use for authentication
--helphelp for daytona-v0

Logout from Daytona

Terminal window
daytona-v0 logout [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Manage Daytona MCP Server

Terminal window
daytona-v0 mcp [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Outputs JSON configuration for Daytona MCP Server

Terminal window
daytona-v0 mcp config [AGENT_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Initialize Daytona MCP Server with an agent (currently supported: claude, windsurf, cursor)

Terminal window
daytona-v0 mcp init [AGENT_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Start Daytona MCP Server

Terminal window
daytona-v0 mcp start [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Manage Daytona organizations

Terminal window
daytona-v0 organization [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Create a new organization and set it as active

Terminal window
daytona-v0 organization create [ORGANIZATION_NAME] [flags]

Flags

LongShortDescription
--region-rDefault region (id or name) for the organization
--helphelp for daytona-v0

Delete an organization

Terminal window
daytona-v0 organization delete [ORGANIZATION] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

List all organizations

Terminal window
daytona-v0 organization list [flags]

Flags

LongShortDescription
--format-fOutput format. Must be one of (yaml, json)
--helphelp for daytona-v0

List members of an organization

Terminal window
daytona-v0 organization members [ORGANIZATION] [flags]

Flags

LongShortDescription
--format-fOutput format. Must be one of (yaml, json)
--helphelp for daytona-v0

Set active organization

Terminal window
daytona-v0 organization use [ORGANIZATION] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Pause a sandbox

Terminal window
daytona-v0 pause [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Get signed preview URL for a sandbox port

Terminal window
daytona-v0 preview-url [SANDBOX_ID | SANDBOX_NAME] [flags]

Flags

LongShortDescription
--expiresURL expiration time in seconds
--port-pPort number to get preview URL for (required)
--helphelp for daytona-v0

Manage Daytona snapshots

Terminal window
daytona-v0 snapshot [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Activate a snapshot

Terminal window
daytona-v0 snapshot activate [SNAPSHOT_ID | SNAPSHOT_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Create a snapshot

Terminal window
daytona-v0 snapshot create [SNAPSHOT] [flags]

Flags

LongShortDescription
--context-cFiles or directories to include in the build context (can be specified multiple times). If not provided, context will be automatically determined from COPY/ADD commands in the Dockerfile
--cpuCPU cores that will be allocated to the underlying sandboxes (default: 1)
--diskDisk space that will be allocated to the underlying sandboxes in GB (default: 3)
--dockerfile-fPath to Dockerfile to build
--entrypoint-eThe entrypoint command for the snapshot
--image-iThe image name for the snapshot
--memoryMemory that will be allocated to the underlying sandboxes in GB (default: 1)
--regionID of the region where the snapshot will be available (defaults to organization default region)
--sandbox-classTarget sandbox class for the snapshot. One of: ‘container’ or ‘linux-vm’ (defaults to organization/server default)
--helphelp for daytona-v0

Delete a snapshot

Terminal window
daytona-v0 snapshot delete [SNAPSHOT_ID | SNAPSHOT_NAME] [flags]

Flags

LongShortDescription
--all-aDelete all snapshots
--helphelp for daytona-v0

List all snapshots

Terminal window
daytona-v0 snapshot list [flags]

Flags

LongShortDescription
--format-fOutput format. Must be one of (yaml, json)
--limit-lMaximum number of items per page
--page-pPage number for pagination (starting from 1)
--source-sandbox-idFilter by the ID of the sandbox the snapshot was created from
--helphelp for daytona-v0

Push local snapshot

Terminal window
daytona-v0 snapshot push [SNAPSHOT] [flags]

Flags

LongShortDescription
--cpuCPU cores that will be allocated to the underlying sandboxes (default: 1)
--diskDisk space that will be allocated to the underlying sandboxes in GB (default: 3)
--entrypoint-eThe entrypoint command for the image
--memoryMemory that will be allocated to the underlying sandboxes in GB (default: 1)
--name-nSpecify the Snapshot name
--regionID of the region where the snapshot will be available (defaults to organization default region)
--helphelp for daytona-v0

SSH into a sandbox

Terminal window
daytona-v0 ssh [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--expiresSSH access token expiration time in minutes
--helphelp for daytona-v0

Start a sandbox

Terminal window
daytona-v0 start [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Stop a sandbox

Terminal window
daytona-v0 stop [SANDBOX_ID] | [SANDBOX_NAME] [flags]

Flags

LongShortDescription
--force-fForce stop the sandbox using SIGKILL
--helphelp for daytona-v0

Print the version number

Terminal window
daytona-v0 version [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Manage Daytona volumes

Terminal window
daytona-v0 volume [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Create a volume

Terminal window
daytona-v0 volume create [NAME] [flags]

Flags

LongShortDescription
--size-sSize of the volume in GB
--helphelp for daytona-v0

Delete a volume

Terminal window
daytona-v0 volume delete [VOLUME_ID_OR_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona-v0

Get volume details

Terminal window
daytona-v0 volume get [VOLUME_ID_OR_NAME] [flags]

Flags

LongShortDescription
--format-fOutput format. Must be one of (yaml, json)
--helphelp for daytona-v0

List all volumes

Terminal window
daytona-v0 volume list [flags]

Flags

LongShortDescription
--format-fOutput format. Must be one of (yaml, json)
--helphelp for daytona-v0