Skip to content

CLI Usage

DimCode ships a single CLI entrypoint: dim.

Help

bash
dim --help

Synopsis

text
Usage:
  dim [--route name] [--approvals auto|all] [--auto-approve|-y] [--cols N --rows N] [--record file] [--replay file] [--snapshot file] [--no-mouse] [--no-alt-screen] [--debug]
  dim version
  dim upgrade [version] [--check] [--quiet]
  dim server [--host HOST] [--port N] [--open] [--token TOKEN] [--verbose] [--debug-ui|--debug]
  dim gui [--host HOST] [--port N] [--gui-host HOST] [--gui-port N] [--open|--no-open] [--token TOKEN] [--verbose] [--debug-ui|--debug]
  dim exec [-c dir] <prompt>
  dim acp

Commands

dim

Starts the interactive terminal UI (TUI).

Flags:

  • --route <name>: start from a specific route (advanced).
  • --approvals auto|all: tool approvals mode (auto by default).
  • --auto-approve, --yes, -y: same as --approvals all.
  • --cols <N>, --rows <N>: force terminal size (debug/testing).
  • --record <file>: record TUI events to a file.
  • --replay <file>: replay a previously recorded session.
  • --snapshot <file>: write a UI snapshot (debug/testing).
  • --no-mouse: disable mouse support.
  • --no-alt-screen: disable the terminal alternate screen.
  • --debug: enable diagnostics (writes ./dimcode-debug.log by default).

dim exec

Runs a one-shot prompt (tools auto-approved). Alias: dim e.

bash
# Basic usage
dim exec "Summarize this repo and propose next steps"

# With working directory
dim exec -c /path/to/repo "Find the bug and fix it"
dim exec --cwd ~/projects/myapp "Generate tests"

# Read from stdin
echo "Review this code" | dim exec

Flags:

  • -c, --cwd, --chdir <dir>: set working directory.
  • --: stop parsing flags (useful if prompt starts with -).

Notes:

  • Tools are auto-approved in exec mode.
  • Session ID can also be set via DIMCODE_SESSION_ID environment variable.
  • Returns exit code 0 on success, 1 on error, 2 if user input is required.

dim server

Starts the local API server and serves the bundled Web GUI.

bash
# Start server
dim server

# Start and open browser
dim server --open

# Custom host/port
dim server --host 0.0.0.0 --port 8080

# With authentication token
dim server --token mysecrettoken

# Enable verbose logging
dim server --verbose

Flags:

  • --host <HOST>: API server host (default: 127.0.0.1).
  • --port <N>: API server port (default: 13442).
  • --open, -o: open browser after starting.
  • --no-open: don't open browser.
  • --token <TOKEN>: set authentication token. If --token is provided without a value, a random token is generated.
  • --verbose, -v: enable verbose logging.
  • --debug, --debug-ui: enable UI debug mode.

Environment Variables:

  • DIMCODE_SERVER_TOKEN: default token value.

Notes:

  • Auto-update is enabled by default (set DIMCODE_DISABLE_AUTOUPDATE=1 to disable checks; set DIMCODE_AUTOUPDATE=0 to disable background installs).
  • npm install: updates are checked against npm.
  • standalone binary: updates are checked against releases.

dim gui

Starts the Nuxt dev server (hot reload) and a local API server. Repo-only: expects ./packages/gui and requires bun.

bash
# Start GUI dev server
dim gui

# Custom ports
dim gui --port 13442 --gui-port 3001

# Don't open browser
dim gui --no-open

# Custom GUI server host/port
dim gui --gui-host 0.0.0.0 --gui-port 8080

Flags:

  • --host <HOST>: API server host (default: 127.0.0.1).
  • --port <N>: API server port (default: 13442).
  • --gui-host <HOST>: GUI dev server host (default: 127.0.0.1).
  • --gui-port <N>: GUI dev server port (default: 3000).
  • --open, -o: open browser after starting (default: true).
  • --no-open: don't open browser.
  • --token <TOKEN>: set authentication token.
  • --verbose, -v: enable verbose logging.
  • --debug, --debug-ui: enable UI debug mode.

Notes:

  • Use dim server --open to run the bundled GUI instead of the dev server.

dim acp

Starts ACP server mode for editor integrations (e.g., Zed).

bash
dim acp

See: /acp.

dim version

Prints version and runtime details.

bash
dim version
dim --version
dim -v

dim upgrade

Upgrades the standalone binary (if you are running a compiled dim).

bash
# Check for updates
dim upgrade --check

# Upgrade to latest
dim upgrade

# Upgrade to specific version
dim upgrade 1.2.3

# Quiet mode (background)
dim upgrade --quiet

Flags:

  • --check: only check if an update is available, don't install.
  • --quiet, --background: suppress output (useful for background updates).

If you installed via npm/pnpm/yarn/bun, upgrade with your package manager instead:

bash
npm install -g dimcode@latest

Keyboard shortcuts

  • Ctrl+P: command palette
  • F1: help & shortcuts
  • Enter: send · Shift+Enter (or Ctrl+J): new line
  • Ctrl+O: expand/collapse tool calls & thinking
  • Ctrl+C: clear input (if non-empty); otherwise exit

Slash commands

Type slash commands directly in the input field:

CommandWhat it does
/connectConnect a provider (or add a custom / local one)
/modelsSelect provider + model
/approvalsTool approvals (auto / all)
/tool-settingsTool settings (WebSearch, etc.)
/mcp-settingsMCP server settings
/sessionsList/pick sessions
/timeline or /tlJump to a user message
/newNew session
/rename <title>Rename current session
/compactCompact the conversation (reduce context)
/languageSwitch UI language
/themeToggle light/dark theme
/settings or /configOpen settings
/reviewReview code changes
/initInitialize/improve AGENTS.md
/debugOpen debug dialog
/exitExit

Data locations

For a detailed explanation of ~/.dimcode/, see: /config.

DimCode stores everything locally on your machine.

Config directory:

  • If DIMCODE_HOME is set: $DIMCODE_HOME
  • Else if XDG_CONFIG_HOME is set: $XDG_CONFIG_HOME/.dimcode
  • Else: ~/.dimcode

Cache directory:

  • If DIMCODE_HOME is set: $DIMCODE_HOME/dimcode
  • Else if XDG_CONFIG_HOME is set: $XDG_CONFIG_HOME/.dimcode/dimcode
  • Else: ~/.dimcode/dimcode

Files you may care about:

  • config.json: provider connections and UI settings
  • cache.json: cached preferences + session metadata
  • tools.json: tool config (WebSearch, MCP servers)

Diagnostics

bash
dim --debug

If you report a bug, attaching a --record file can be very helpful:

bash
dim --record ./dim.tui-record.jsonl