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

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

To update the Daytona CLI to the latest version:

Terminal window
brew upgrade daytonaio/cli/daytona

Daytona CLI

Terminal window
daytona [flags]

Flags

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

Archive a sandbox

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

Flags

LongShortDescription
--helphelp for daytona

Adds a completion script for your shell environment

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

Flags

LongShortDescription
--helphelp for daytona

Create a new sandbox

Terminal window
daytona 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-stopAuto-stop interval in minutes (0 means disabled)
--classSandbox class type (small, medium, large)
--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
--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
--snapshotSnapshot to use for the sandbox
--targetTarget region (eu, us)
--userUser associated with the sandbox
--volume-vVolumes to mount (format: VOLUME_NAME:MOUNT_PATH)
--helphelp for daytona

Delete a sandbox

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

Flags

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

Opens the Daytona documentation in your default browser.

Terminal window
daytona docs [flags]

Flags

LongShortDescription
--helphelp for daytona

Execute a command in a sandbox

Terminal window
daytona 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

Get sandbox info

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

Flags

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

List sandboxes

Terminal window
daytona 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)
--helphelp for daytona

Log in to Daytona

Terminal window
daytona login [flags]

Flags

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

Logout from Daytona

Terminal window
daytona logout [flags]

Flags

LongShortDescription
--helphelp for daytona

Manage Daytona MCP Server

Terminal window
daytona mcp [flags]

Flags

LongShortDescription
--helphelp for daytona

Outputs JSON configuration for Daytona MCP Server

Terminal window
daytona mcp config [AGENT_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona

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

Terminal window
daytona mcp init [AGENT_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona

Start Daytona MCP Server

Terminal window
daytona mcp start [flags]

Flags

LongShortDescription
--helphelp for daytona

Manage Daytona organizations

Terminal window
daytona organization [flags]

Flags

LongShortDescription
--helphelp for daytona

Create a new organization and set it as active

Terminal window
daytona organization create [ORGANIZATION_NAME] [flags]

Flags

LongShortDescription
--helphelp for daytona

Delete an organization

Terminal window
daytona organization delete [ORGANIZATION] [flags]

Flags

LongShortDescription
--helphelp for daytona

List all organizations

Terminal window
daytona organization list [flags]

Flags

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

Set active organization

Terminal window
daytona organization use [ORGANIZATION] [flags]

Flags

LongShortDescription
--helphelp for daytona

Get signed preview URL for a sandbox port

Terminal window
daytona 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

Manage Daytona snapshots

Terminal window
daytona snapshot [flags]

Flags

LongShortDescription
--helphelp for daytona

Create a snapshot

Terminal window
daytona 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)
--helphelp for daytona

Delete a snapshot

Terminal window
daytona snapshot delete [SNAPSHOT_ID] [flags]

Flags

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

List all snapshots

Terminal window
daytona 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)
--helphelp for daytona

Push local snapshot

Terminal window
daytona 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

SSH into a sandbox

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

Flags

LongShortDescription
--expiresSSH access token expiration time in minutes (defaults to 24 hours)
--helphelp for daytona

Start a sandbox

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

Flags

LongShortDescription
--helphelp for daytona

Stop a sandbox

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

Flags

LongShortDescription
--helphelp for daytona

Print the version number

Terminal window
daytona version [flags]

Flags

LongShortDescription
--helphelp for daytona

Manage Daytona volumes

Terminal window
daytona volume [flags]

Flags

LongShortDescription
--helphelp for daytona

Create a volume

Terminal window
daytona volume create [NAME] [flags]

Flags

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

Delete a volume

Terminal window
daytona volume delete [VOLUME_ID] [flags]

Flags

LongShortDescription
--helphelp for daytona

Get volume details

Terminal window
daytona volume get [VOLUME_ID] [flags]

Flags

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

List all volumes

Terminal window
daytona volume list [flags]

Flags

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