Skip to content

Getting Started

Prerequisites

  • A real terminal (macOS Terminal, iTerm2, Windows Terminal, etc.) is recommended for the best TUI experience.
  • A recent Node.js is recommended if you install via npm/pnpm/yarn.

Install

bash
npm install -g dimcode

Other package managers:

bash
# pnpm
pnpm add -g dimcode

# yarn
yarn global add dimcode

# bun
bun add -g dimcode

Run

bash
dim
# or: npx dimcode

Verify

bash
dim --version
dim

DimCode can be configured entirely inside the TUI:

  1. Open the command palette: Ctrl+P
  2. Choose Connect Provider (or type /connect)
  3. Set API key / base URL
  4. Choose a model: /models
  5. Set tool approvals: /approvals (auto or all)

Tip: For local providers like Ollama or LM Studio, you usually don't need an API key, but you do need to add model IDs (or fetch them) in the Connect Provider flow.

Then run:

bash
dim

For where settings are stored and how paths are resolved, see: /config.

Useful in-app commands

Command palette

Press Ctrl+P for quick access to:

  • Sessions (switch/list/create)
  • Settings / Connect Provider
  • Models
  • Tool Approvals
  • Tool Settings (web search)
  • MCP Settings

Slash commands

Type these directly in the input box:

  • /connect - connect a provider (API key / base URL)
  • /models - pick a model
  • /approvals - approvals mode (auto or all)
  • /sessions - list sessions
  • /new - new session
  • /rename <title> - rename current session
  • /timeline (or /tl) - jump to a user message
  • /tool-settings - configure tools like WebSearch
  • /mcp-settings - configure MCP servers
  • /language - switch UI language
  • /theme - toggle light/dark theme

Troubleshooting

No API key / unauthorized

  • Use /connect (recommended), or set OPENAI_API_KEY in your environment.

Terminal rendering issues

Try:

bash
dim --no-alt-screen --no-mouse

Debug logs

bash
dim --debug
# writes: ./dimcode-debug.log (override via DIMCODE_DEBUG_LOG=/path/to/file)