Skip to main content

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

OptionDescription
--jsonPrint 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://.
--stagingUse https://workspace-staging.dench.com.
--prodUse https://dench.dev.
--versionPrint the installed CLI version.
The default host is https://dench.dev.

Environment variables

VariableDescription
DENCH_SESSION_KEYStable human-readable session identity for long-lived agents.
DENCH_AGENT_SESSIONAlternate stable session identity input.
DENCH_HOSTHost override for commands and Long Sessions.
DENCH_AUTONOMOUS_API_BASEAPI base override for dench autonomous run.
NEXT_PUBLIC_CONVEX_URLDevelopment-mode Convex URL.
DENCH_WORKSPACEDevelopment-mode workspace slug.
DENCH_DEV_AGENT_KEYDevelopment-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

CommandDescription
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

CommandDescription
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

CommandDescription
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

CommandDescription
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

CommandDescription
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

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

External tools

CommandDescription
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

CommandDescription
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.
CommandDescription
dench register --name "AI Agent" --kind other --devRegister a development-mode agent.
dench project create <name> [--repo <url>] [--root <path>] --devCreate 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.