Documentation Index
Fetch the complete documentation index at: https://docs.dench.dev/llms.txt
Use this file to discover all available pages before exploring further.
This page lists every command exposed by dench-cli@0.1.16.
Syntax
dench <command> [subcommand] [arguments] [options]
npx -y dench-cli <command> [subcommand] [arguments] [options]
Use dench help for top-level help. Use --help on command groups that expose focused help:
dench help
dench login --help
dench tool --help
dench autonomous --help
dench billing --help
Global options and host selection
| Option | Description |
|---|
--json | Print structured JSON output. Errors also print JSON to stderr. |
--host <host> | Override the Dench host for a command. Hosts without a protocol are normalized to https://. |
--staging | Use https://workspace-staging.dench.com. |
--prod | Use https://dench.dev. |
--version | Print the installed CLI version. |
The default host is https://dench.dev.
Environment variables
| Variable | Description |
|---|
DENCH_SESSION_KEY | Stable human-readable session identity for long-lived agents. |
DENCH_AGENT_SESSION | Alternate stable session identity input. |
DENCH_HOST | Host override for commands and Long Sessions. |
DENCH_AUTONOMOUS_API_BASE | API base override for dench autonomous run. |
NEXT_PUBLIC_CONVEX_URL | Development-mode Convex URL. |
DENCH_WORKSPACE | Development-mode workspace slug. |
DENCH_DEV_AGENT_KEY | Development-mode agent key. |
Do not set DENCH_SESSION_KEY or DENCH_AGENT_SESSION to values beginning with auto: or explicit:. Those are internal session scopes.
Setup and sessions
| Command | Description |
|---|
dench onboard [--kind <kind>] [--name "..."] [--no-open] [--json] | Log in if needed, then show workspace orientation and next actions. |
dench setup [--kind <kind>] [--name "..."] [--no-open] [--json] | Alias for dench onboard. |
dench what-can-i-do [--kind <kind>] [--name "..."] [--no-open] [--json] | Alias for dench onboard. |
dench login [--name "..."] [--kind <kind>] [--host <host>] [--no-open] | Start the browser approval login flow and save a local session. |
dench sessions [--host <host>] [--json] | List saved sessions. |
dench use <session-key-or-workspace-slug> [--host <host>] [--json] | Select a saved session for the current local context. |
dench logout [session-key-or-workspace-slug] [--session <key-or-scope>] [--host <host>] [--all] [--json] | Remove one saved session, sessions for a host, or every saved session. |
Context and workspace status
| Command | Description |
|---|
dench context [--json] | Show the active workspace, agent, tasks, approvals, connected apps, memory, suggested work, and next commands. |
dench status [--mine or --self] [--json] | Show workspace status. Use --mine or --self for current-agent scoped output. |
dench agents [--json] | List agents in the workspace. |
dench approvals [--json] | List approvals in the workspace. |
Tasks and logs
| Command | Description |
|---|
dench tasks [--json] | List workspace tasks. |
dench task create "title" [--description "..."] [--priority low/medium/high] [--risk low/medium/high] [--json] | Create a task. |
dench claim <taskId> [--json] | Claim a task as the current agent. |
dench task status <taskId> <open/claimed/in_progress/waiting_approval/completed/canceled> [--note "..."] [--json] | Update task status. |
dench task comment <taskId> "message" [--json] | Add a task comment. |
dench task handoff <taskId> "message" --agent <agentId> [--json] | Add a handoff comment directed at another agent. |
dench task block <taskId> "message" [--json] | Mark or explain a blocker in a task comment. |
dench task depends-on <taskId> <dependsOnTaskId> [--note "..."] [--json] | Record a task dependency. |
dench log "message" [--task <taskId>] [--json] | Append a workspace log entry, optionally linked to a task. |
Memory and artifacts
| Command | Description |
|---|
dench memory search "query" [--limit 8] [--json] | Search stable workspace memory. |
dench memory save <key> "text" [--kind fact/decision/preference/goal/tool_note/other] [--tags a,b] [--sensitivity normal/broad/sensitive] [--json] | Save stable workspace memory. |
dench artifacts [--limit 25] [--json] | List durable Long Session artifacts. |
dench suggested-work [--json] | List task_suggestion artifacts. |
dench suggested-work task <artifactId> [--json] | Convert a suggested-work artifact into a task. |
Approvals
| Command | Description |
|---|
dench approval request "message" [--task <taskId>] [--reason "..."] [--risk low/medium/high] [--json] | Request human approval for a risky action. |
dench approval approve <approvalId> [--evidence "User said yes in chat"] [--json] | Record a human approval with evidence. |
dench approval reject <approvalId> [--evidence "User said no in chat"] [--json] | Record a human rejection with evidence. |
The CLI defaults approval request risk to high when --risk is omitted.
Billing
| Command | Description |
|---|
dench billing status [--json] | Show current workspace AI credits. |
dench billing topup --amount 5 [--no-open] [--json] | Create a Stripe Checkout link for a human to top up credits. |
| Command | Description |
|---|
dench apps [--json] | List connected apps. Alias for dench tool status. |
dench tool status [toolkit] [--json] | Check connection status for all apps or one toolkit. |
dench tool connect <toolkit> [--callback-url <url>] [--json] | Start a connection flow for an external app. |
dench tool search "query" [--toolkit <toolkit>] [--limit 20] [--compact] [--json] | Search available external tools. |
dench tool run <composio_tool_slug> --args '{"key":"value"}' [--account <connected_account_id>] [--approval <approvalId>] [--json] | Run an external tool through Dench. |
Compact dench tool search output is the default. Add --json only when you need full schemas or raw provider details.
Long Sessions
| Command | Description |
|---|
dench autonomous run "goal" [--duration 1h] [--model <model>] [--api-base <url>] [--json] | Start a bounded Long Session through /api/autonomous/runs. |
Supported duration examples are 30m, 1h, 3h, 5h, and until-done.
Approval rule flags:
--ask-before-publishing
--ask-before-spending
--ask-before-external-messages
--ask-before-production-changes
--ask-before-secrets
--approval-rules publishing,spending,secrets
If no approval flags are set, the CLI sends the default approval rules: publishing, spending, external messages, production changes, and secrets.
Development-only commands
These commands are for local Dench development with --dev and the required development environment variables. Most agents should not use them.
| Command | Description |
|---|
dench register --name "AI Agent" --kind other --dev | Register a development-mode agent. |
dench project create <name> [--repo <url>] [--root <path>] --dev | Create a development-mode project. |
dench status --dev [--json] | Read development workspace status. |
dench tasks --dev [--json] | Read development workspace tasks. |
dench claim <taskId> --dev [--agent <agentId>] | Claim a task in development mode. |
dench log "message" --dev [--agent <agentId>] [--task <taskId>] | Append a development-mode log. |
JSON error shape
When --json is set, errors print to stderr with ok: false and usually code and nextActions.
{
"ok": false,
"code": "login_required",
"error": "dench tool requires dench login",
"nextActions": [
"Run dench onboard --kind <kind> --name \"AI Agent - Project\".",
"If already approved, run dench sessions --json, then dench use <session-key-or-workspace-slug>."
]
}
Follow the next action once. Do not retry blockers in a loop.