DimAgent 覆盖多模型 CLI、桌面应用与 ACP 编辑器集成。
快速开始
桌面 App
DimAgent Desktop 0.7.0 提供 macOS、Windows 与 Linux 下载:
安装
npm install -g dimcode@latest
# pnpm add -g dimcode
# yarn global add dimcode
# bun add -g dimcode
运行
dim
# or: npx dimcode
配置凭据
- 按
Ctrl+P-> Connect Provider(或输入/connect),添加需要 API key 的提供方(OpenAI / OpenRouter 等)。
TUI 的第 1 分钟
Ctrl+P:命令面板(会话、连接、模型、审批、MCP、插件)。/connect:连接提供方(也可添加自定义 / 本地提供方)。/models:选择模型。/approvals:设置工具审批(auto、normal或strict)。Shift+Enter:换行;Enter:发送;Ctrl+O:展开/折叠工具调用与思考。
数据存储位置
默认存放在 ~/.dimcode/v2/:
- 主存储:
~/.dimcode/v2/dimcode.sqlite - MCP servers:
~/.dimcode/v2/mcp.json - 凭据:
~/.dimcode/v2/credentials/
完整说明见配置页。
可通过以下变量调整位置:
DIMCODE_HOME(基础目录)
可选集成
网页搜索(Serper)
WebSearch 需要 Serper API Key。可在 Plugins(Ctrl+P -> Plugins 或 /plugins)中配置。
MCP 服务器
在 MCP(Ctrl+P -> MCP 或 /mcp)中配置。
常见用法
# One-shot prompt (default full-access policy)
dim exec --policy full-access "Review this repo and propose a refactor plan"
# Read-only one-shot prompt
dim exec --policy read-only "Review this repo without making changes"
# One-shot prompt with verification
dim exec --verify "pnpm test" "Review this repo and propose a refactor plan"
# 从 stdin 执行 one-shot
echo "Review this code" | dim exec --stdin
# Next API OAuth 登录
dim auth next-api-oauth
# Editor integration (ACP)
dim acp
ACP 说明见 ACP 页面。
需要帮助?
dim --help查看命令与参数。dim --debug启用诊断,默认写入./dimcode-debug.log。