Dawn CLI
Dawn CLI is the terminal client for Dawn. Use it when you want the same workspace agents, connected sources, private threads, attachments, and local project context from a shell.
What this page is for
- Use Dawn from a terminal without opening Dawn Web, Desktop, or VS Code.
- Start private Dawn threads against the workspaces and agents your account can already access.
- Give Dawn local workspace context from the directory you run it in, or from an explicit
--rootpath. - Attach local files and clipboard images to a prompt.
- Send one-off non-interactive prompts from scripts with
dawn send.
If you want Dawn inside VS Code, use the VS Code Extension. If you want another AI client to call Dawn over MCP, use MCP and API Credentials.
Install
Dawn CLI is published as a Node package. Install it globally to add the dawn command to your PATH.
Install the CLI globally. Requires Node.js 22 or newer.
npm install -g @amaretto-software-labs/dawn-cli
Confirm the global command is available.
dawn --version
Sign in.
dawn login
Open the terminal UI.
dawn
The package name is @amaretto-software-labs/dawn-cli. The executable command is dawn.
Start commands
Once the dawn command is installed and available on your PATH, these are the normal entry points.
Start interactive Dawn in the current directory.
dawn
Start Dawn with an explicit local workspace root. Shell tools inherit the workspace policy unless you set a local override.
dawn --root ~/work/acme-api
Reduce local shell execution to safe commands for this session.
dawn --root ~/work/acme-api --allow-shell-tools
Inspect the current CLI auth, config, and context.
dawn status
List accessible workspaces without opening the TUI.
dawn workspaces
The default local workspace root is the shell’s current working directory. Use --root when the terminal is somewhere else but Dawn should read/search a specific project.
Top-level command reference
| Command | Purpose | Notes |
|---|---|---|
dawn | Open the interactive terminal UI. | If signed out, the UI opens a sign-in picker. |
dawn login | Sign in with browser auth. | Stores a browser session in secure local credential storage. |
dawn api-credential | Store a Dawn API credential. | Prompts for the credential without echoing it. |
dawn api-credential --stdin | Store a credential from standard input. | Useful for password managers and shell scripts. |
dawn logout | Clear the stored local session. | Does not revoke the server-side API credential itself. |
dawn status | Print auth, persisted CLI context, and resolved config as JSON. | Use it to verify which endpoint, workspace, agent, thread, and root path the CLI will use. |
dawn workspaces | List accessible workspaces. | Outputs tab-separated workspace id and name. |
dawn send <message...> | Send one prompt non-interactively. | Waits up to 180 seconds for the response and exits non-zero on error or timeout. |
dawn --help | Show CLI help. | Use dawn send --help for command-specific options. |
Global options and parameters
Global options can be passed before the command, for example dawn --root ~/repo send "...".
| Option | What it controls |
|---|---|
--api <url> | Dawn API base URL. |
--identity <url> | Dawn identity API base URL used by browser sign-in. |
--auth-app <url> | Dawn auth web app base URL opened for browser sign-in. |
--client-id <id> | OAuth client id override. Most users should not set this. |
--scope <scope> | OAuth scope override. Most users should not set this. |
--root <path> | Local workspace root for file search, file reads, attachments, downloads, and local tools. |
--allow-shell-tools | Set the local shell-mode override to safe commands. This can reduce the workspace policy but cannot raise it. |
--allow-unsafe-shell-tools | Set the local shell-mode override to all commands. This only permits all commands when the workspace policy also allows all. |
--disable-shell-tools | Force shell tools off locally even when the workspace allows them. |
-V, --version | Print the CLI version from the packaged build. |
Sign in and sessions
Dawn CLI supports browser sign-in, stored API credentials, and one-process credentials.
# Browser sign-in.
dawn login
# Store a Dawn API credential interactively.
dawn api-credential
# Store a Dawn API credential from stdin.
printf '%s' "$DAWN_API_CREDENTIAL" | dawn api-credential --stdin
# Use an API credential for this process without storing it locally.
DAWN_API_CREDENTIAL="dmcp_..." dawn
# Clear the stored local session.
dawn logout
DAWN_API_CREDENTIALtakes precedence over any stored browser session or stored API credential.- Stored sessions are matched to the configured Dawn target, so switching API/identity/auth endpoints can require a separate sign-in.
- Standalone binary builds use native secure storage: macOS Keychain, Windows DPAPI, or Linux Secret Service.
- Node installs and development builds try
keytarfirst, then fall back to native secure storage where available. DAWN_CLI_ALLOW_INSECURE_FILE_SESSION=1opts into plaintext local session storage. Use that only when you explicitly accept the local risk.
Interactive first run
- Open a terminal in the project directory you want Dawn to understand.
- Run
dawn, or rundawn --root <path>if the project root is elsewhere. - If signed out, choose Browser sign-in or API credential.
- Select the workspace. Dawn prefers the persisted workspace and otherwise selects the first available workspace.
- Select the agent. Dawn prefers the persisted agent, then the default agent, then the first CLI-enabled agent.
- Continue the selected thread, choose another thread with
/threads, or start fresh with/new. - Send a prompt from the composer.
Interactive slash commands
Type / in the composer to see available local commands and Dawn-provided prompt commands for the selected workspace. Signed-out mode only exposes /login, /theme, /help, and /quit.
| Command | Use it for |
|---|---|
/login | Start browser sign-in from inside the CLI. |
/logout | Sign out and clear the stored session. |
/workspaces [id-or-name] | Open the workspace picker, or switch directly by id/name when an argument is supplied. |
/agents [id-or-name] | Open the agent picker, or switch directly by id/name when an argument is supplied. |
/threads [id] or /resume [id] | Open or resume an existing private CLI thread. |
/new or /new_chat | Start a fresh thread. |
/rename <title> | Rename the current thread. |
/theme [dark|light] | Switch CLI theme, or open the theme picker without an argument. |
/help | Show available local CLI commands for the current auth state. |
/quit or /exit | Exit the terminal UI. |
Keyboard controls
| Input | Behavior |
|---|---|
| Enter | Send the prompt, select the highlighted picker item, or complete the highlighted slash command depending on context. |
| Shift+Enter or Ctrl+J | Insert a new line in the composer. |
| Tab | Complete the selected slash-command suggestion or attach the selected file in the file picker. |
| Up/Down | Move through pickers and suggestions. On an empty prompt, move through prompt history. |
| PageUp/PageDown | Scroll long thread history or move through file/picker pages. |
| Home/End | Move to the start/end of the line or picker list depending on context. |
| Esc | Close pickers, cancel API credential entry, or clear attachment selection. |
| Esc twice | Stop an active request and clear the prompt, or clear the prompt if no request is active. |
| Ctrl+C | Exit the CLI when there is no active text selection. |
Attachments and generated files
- Type
@to open the local file picker rooted at the CLI workspace root. - Press Tab or Enter in the file picker to attach the selected file.
- Paste one or more local file paths to attach them when the pasted text is recognized as paths.
- Paste a clipboard image to attach it as an image when your platform and terminal clipboard support it.
- Each uploaded attachment is limited to 25 MB.
- Use Ctrl+Up and Ctrl+Down to select pending attachments.
- Press Delete or Backspace to remove the selected pending attachment.
- Returned files, images, and HTML artifacts are cached under
.dawn/downloadsinside the CLI root path.
Non-interactive sends
Use dawn send when a script should send exactly one prompt and print the assistant response.
# Send one prompt and print the assistant response.
dawn send "Summarize the release blockers for this workspace."
# Target a workspace and agent by name.
dawn send \
--workspace "Engineering" \
--agent "Support Agent" \
"Summarize CFA-123 and list the next actions."
# Continue a known thread by id.
dawn send \
--workspace "Engineering" \
--agent "Support Agent" \
--thread "thread-id" \
"Add a concise QA checklist."
# Script-friendly usage with a one-process credential.
DAWN_API_CREDENTIAL="dmcp_..." dawn send \
--workspace "Engineering" \
--agent "Release Agent" \
"Draft a release-risk brief for today's merged PRs."
--workspaceaccepts a workspace id or exact workspace name.--agentaccepts an agent id or exact agent name.--threadaccepts a thread id and continues that thread.- If a name is ambiguous, use the id.
- The prompt text is required and is joined from all remaining command arguments.
- The command exits non-zero if auth, workspace selection, agent selection, sending, or response waiting fails.
Local workspace context and tools
Dawn CLI sends local client context with each prompt, including client type, session id, capability ids, and the selected workspace root. Local file tools are scoped to that root path.
# Use the current directory as local context.
cd ~/work/acme-api
dawn
# Use a different root without changing shell directories.
# Shell tools inherit the workspace policy unless you set a local override.
dawn --root ~/work/acme-api
# Reduce local shell execution to safe commands for this session.
dawn --root ~/work/acme-api --allow-shell-tools
# Explicitly allow all shell commands locally, still capped by workspace policy.
dawn --root ~/work/acme-api --allow-unsafe-shell-tools
# Force shell tools off locally even if the workspace allows them.
dawn --disable-shell-tools
- Read/search tools include local context summary, directory listing, file finding, file reads, and content search.
- File write and patch tools are exposed only when the effective shell mode is not disabled.
- Shell commands are refused unless the effective shell mode allows them.
- The workspace policy is the maximum allowed mode. Local client settings can inherit or reduce it, never raise it.
- With no local shell flag, the CLI inherits the workspace policy.
- If the workspace disables shell tools, shell commands are always refused.
- If the workspace allows safe shell tools, only safe shell commands can run, even with
--allow-unsafe-shell-tools. - If the workspace allows all shell tools, all commands can run only when the local mode inherits that policy or uses
--allow-unsafe-shell-tools. --allow-shell-toolsreduces local shell execution to safe commands.--disable-shell-toolsdisables shell commands locally even when the workspace allows them.
Endpoint overrides
Normal published CLI builds include the default Dawn endpoints. Most users should not need to set these flags or variables.
# Override Dawn endpoints.
dawn --api https://api.dawnhq.ai \
--identity https://identity.dawnhq.ai \
--auth-app https://app.dawnhq.ai
# Equivalent endpoint overrides.
export DAWN_API_URL="https://api.dawnhq.ai"
export DAWN_IDENTITY_API_URL="https://identity.dawnhq.ai"
export DAWN_AUTH_APP_URL="https://app.dawnhq.ai"
dawn
| Environment variable | Purpose |
|---|---|
DAWN_API_URL | Overrides the Dawn API base URL. |
DAWN_IDENTITY_API_URL | Overrides the Dawn identity API base URL. |
DAWN_AUTH_APP_URL | Overrides the browser auth web app URL. |
DAWN_CLIENT_ID | Overrides the OAuth client id. |
DAWN_AUTH_SCOPE | Overrides the OAuth scope string. |
DAWN_REDIRECT_PORT | Overrides the local browser-login redirect port. |
DAWN_API_CREDENTIAL | Supplies a bearer credential for the current process without writing it to storage. |
DAWN_CLI_HOME | Changes where CLI context, downloads, and optional file sessions are stored. |
DAWN_CLI_ALLOW_INSECURE_FILE_SESSION | Set to 1 to opt into plaintext local session storage when secure storage is unavailable. |
DAWN_STRICT_TLS | Set to 1 to disable local-development HTTPS certificate relaxation. |
Troubleshooting
- The CLI opens but I am not signed in: choose a sign-in method from the picker, or run
dawn loginordawn api-credential. - I typed a prompt while signed out: the CLI opens the auth picker instead of sending. Sign in, then send the prompt again.
- No workspaces or agents appear: confirm the same account can see them in Dawn Web and that the selected agent is enabled for CLI/client use.
- My API credential is ignored: check whether
DAWN_API_CREDENTIALis set. Environment credentials take precedence over stored sessions. - The wrong workspace, agent, thread, or root keeps loading: run
dawn statusand inspect the persisted context. Switch with/workspaces,/agents,/threads, or restart with--root. - Shell commands are refused: the effective shell mode does not allow them. The workspace policy is the maximum allowed mode; local settings can inherit or reduce it, never raise it.
- Attachment upload fails: confirm you are signed in, a workspace and agent are selected, the path points to a file, and the file is under 25 MB.
- Browser sign-in cannot open the callback: check local firewall or proxy rules, and use
DAWN_REDIRECT_PORTif the default port is unavailable.
Validation Prompts
Use these prompts in Dawn chat to quickly validate this setup area.
Give me a first-use checklist for Dawn CLI in this repository.
List what this selected agent can access from the CLI right now.
Completion Checklist
- Node.js 22 or newer available.
- Dawn CLI installed and available on PATH.
- Browser sign-in or API credential completed.
- Target workspace selected.
- Target agent selected.
- Root path points at the intended local project.
- First private CLI thread started and replied successfully.
- Attachment upload or generated file download tested.