Login and context
Commands
Section titled “Commands”This page documents the following commands. Global flags that apply to every command are listed under daytona.
| Command | Description |
|---|---|
daytona login | Sign in with your browser, a device code, or a static credential |
daytona logout | Remove the saved session from this machine |
daytona profile | Manage named connections (API URL + credential + org/project context) |
daytona whoami | Show who you are, which credential is in use, and the selected org/project |
daytona login
Section titled “daytona login”Sign in with your browser, a device code, or a static credential
Signs in to the API configured by —api-url / DAYTONA_API_URL and saves the session in the active profile.
Default at a terminal: opens your browser (authorization code + PKCE on a loopback redirect) and prints the URL too — nothing to type, approve and you are done. Without a terminal (agents, CI) or inside an SSH session (where a browser on your machine cannot reach this host’s loopback redirect) the CLI switches to the device flow automatically; —device forces it — you open a URL on any device and enter a short code. —token: stores a static credential (a project API key, an org API key, or any bearer the server accepts) as-is. The CLI never inspects it; the server decides what it may do.
After a browser or device login the CLI selects your personal organization and its default project the first time, and remembers your last selection afterwards. Sandbox commands then mint a short-lived project API key on your behalf (it expires with your session).
daytona login [flags]Examples
daytona login --api-url https://api.example.comdaytona login --devicedaytona login --token dtn_…Flags
| Long | Short | Type | Default | Description |
|---|---|---|---|---|
--browser | bool | force the browser (loopback) flow even inside an SSH session — for when you forward the callback port with ssh -L | ||
--client-id | string | OIDC client id override (default: the API’s oidc.cli_client_id, or DAYTONA_OIDC_CLIENT_ID) | ||
--device | bool | device-code login for hosts without a browser | ||
--token | string | store this static credential instead of signing in |
daytona logout
Section titled “daytona logout”Remove the saved session from this machine
Deletes the active profile’s saved tokens and cached workload keys from this machine. Like other CLIs, this is local only: the server-side session and any keys already copied elsewhere remain valid until they expire. Revoke a key explicitly with ‘daytona key revoke’ if you need it dead now.
daytona logoutdaytona profile
Section titled “daytona profile”Manage named connections (API URL + credential + org/project context)
Commands
| Command | Description |
|---|---|
daytona profile delete | Delete a profile and its saved credentials |
daytona profile list | List profiles |
daytona profile use | Make a profile the active one |
daytona profile delete
Section titled “daytona profile delete”Delete a profile and its saved credentials
daytona profile delete <name>daytona profile list
Section titled “daytona profile list”List profiles
daytona profile listdaytona profile use
Section titled “daytona profile use”Make a profile the active one
daytona profile use <name>daytona whoami
Section titled “daytona whoami”Show who you are, which credential is in use, and the selected org/project
daytona whoami