CLI Usage
DimCode ships a single CLI entrypoint: dim.
Help
dim --helpSynopsis
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 acpCommands
dim
Starts the interactive terminal UI (TUI).
Flags:
--route <name>: start from a specific route (advanced).--approvals auto|all: tool approvals mode (autoby 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.logby default).
dim exec
Runs a one-shot prompt (tools auto-approved). Alias: dim e.
# 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 execFlags:
-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_IDenvironment 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.
# 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 --verboseFlags:
--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--tokenis 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=1to disable checks; setDIMCODE_AUTOUPDATE=0to 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.
# 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 8080Flags:
--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 --opento run the bundled GUI instead of the dev server.
dim acp
Starts ACP server mode for editor integrations (e.g., Zed).
dim acpSee: /acp.
dim version
Prints version and runtime details.
dim version
dim --version
dim -vdim upgrade
Upgrades the standalone binary (if you are running a compiled dim).
# 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 --quietFlags:
--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:
npm install -g dimcode@latestKeyboard shortcuts
Ctrl+P: command paletteF1: help & shortcutsEnter: send ·Shift+Enter(orCtrl+J): new lineCtrl+O: expand/collapse tool calls & thinkingCtrl+C: clear input (if non-empty); otherwise exit
Slash commands
Type slash commands directly in the input field:
| Command | What it does |
|---|---|
/connect | Connect a provider (or add a custom / local one) |
/models | Select provider + model |
/approvals | Tool approvals (auto / all) |
/tool-settings | Tool settings (WebSearch, etc.) |
/mcp-settings | MCP server settings |
/sessions | List/pick sessions |
/timeline or /tl | Jump to a user message |
/new | New session |
/rename <title> | Rename current session |
/compact | Compact the conversation (reduce context) |
/language | Switch UI language |
/theme | Toggle light/dark theme |
/settings or /config | Open settings |
/review | Review code changes |
/init | Initialize/improve AGENTS.md |
/debug | Open debug dialog |
/exit | Exit |
Data locations
For a detailed explanation of ~/.dimcode/, see: /config.
DimCode stores everything locally on your machine.
Config directory:
- If
DIMCODE_HOMEis set:$DIMCODE_HOME - Else if
XDG_CONFIG_HOMEis set:$XDG_CONFIG_HOME/.dimcode - Else:
~/.dimcode
Cache directory:
- If
DIMCODE_HOMEis set:$DIMCODE_HOME/dimcode - Else if
XDG_CONFIG_HOMEis set:$XDG_CONFIG_HOME/.dimcode/dimcode - Else:
~/.dimcode/dimcode
Files you may care about:
config.json: provider connections and UI settingscache.json: cached preferences + session metadatatools.json: tool config (WebSearch, MCP servers)
Diagnostics
dim --debugIf you report a bug, attaching a --record file can be very helpful:
dim --record ./dim.tui-record.jsonl