kit-zeason/dsh-simple-CLI1

dsh-simple-cli

Interactive terminal chat bundle for dsh: drives an Agent from stdin over dsh-base.

AI 分析

核心用途是提供轻量级的命令行交互界面,直接在终端中与 DSH 智能体进行对话和任务调度。适合偏好键盘操作、需要在终端环境快速调用 DSH 能力的开发者。

パッケージ
dsh-simple-cli
バージョン
0.1.2
ライセンス
MIT
最終更新
2026/08/15

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:kit-zeason/dsh-simple-CLI

ドキュメント

README 全文を読む ↗

Usage

dsh-cli                        # start interactive chat
dsh --profile cli              # same
dsh-cli "run the tests"        # send a first task, then keep chatting
┌───────────────────────────────────────────────┐
│ dsh-cli: DeepSeek Harness 交互模式(/help …)      │
│ ▸ 推理  let me check the repo layout…             │  ← dim gray, streaming
│ ⛭ pwsh: Get-ChildItem -Recurse .                │  ← yellow
│   ✓   Directory: …                              │  ← cyan
│ 这里是最新的文件清单:…                             │  ← streaming reply
│───────────────────────────────────────────────│
│ > 输入你的消息…  (Shift+Enter 换行, Enter 发送)     │  ← input area
│ 模型: deepseek/deepseek-v4-flash · 权限: ask   …  │  ← status bar
└───────────────────────────────────────────────┘

Commands (type them in the input area):

CommandEffect
/modelopen the model picker (browse or keyword-search, then pick)
/model switch model (same provider), e.g. /model deepseek-v4-flash
`/model
/`switch provider + model
/presetopen the preset picker (标准 / PTC / 极简 / 创造 + your own)
/preset switch preset (live on a blank session, else applies on /new)
/permission ask / neverswitch the approval policy (aliases: /perm)
/newstart a fresh session
/clearclear the scrollback
/help, /exithelp / quit (Ctrl+C also quits)

Presets: each session is composed from one DSH agent preset (the same mechanism as the web app — 标准/standard, PTC/code, 极简/minimal, 创造/cordis). The default is standard; set a persistent default in $DSH_HOME/settings.yaml under agent-presets.default, and author your own presets in $DSH_HOME/.agent-presets/ (a directory with agent.cordis.yml + optional preset.yml).

Tool approval prompt (inline on the same input area):

? [授权] pwsh: … — y 允许一次 / n 拒绝 / 回车 允许

Color scheme (override via env DSH_CLI_THEME= ; each value is an SGR parameter string):

{ "user": "1;92", "reasoning": "2;90", "toolCall": "33",
  "toolResult": "36", "toolError": "1;31", "system": "35", "status": "36" }

使用

dsh-cli                  # 开始交互对话
dsh --profile cli        # 等价
dsh-cli "run the tests"  # 先发一条任务,之后继续对话

界面示意:

┌──────────────────────────────────────────────┐
│ dsh-cli: DeepSeek Harness 交互模式(/help …)   │
│ ▸ 推理  let me check the repo layout…          │  ← 暗灰,流式
│ ⛭ pwsh: Get-ChildItem -Recurse .             │  ← 黄色
│   ✓   Directory: …                           │  ← 青色
│ 这里是最新的文件清单:…                           │  ← 流式正文
│──────────────────────────────────────────────│
│ > 输入你的消息…  (Shift+Enter 换行, Enter 发送)  │  ← 输入区
│ 模型: deepseek/deepseek-v4-flash · 权限: ask … │  ← 状态栏
└──────────────────────────────────────────────┘

命令一览:

命令作用
/model弹出模型选择框(浏览或输入关键字过滤后选中)
/model 切换模型(保持 provider),如 /model deepseek-v4-flash
`/model
/`同时切换 provider 与模型
/preset弹出预设选择框(标准 / PTC / 极简 / 创造 + 自定义)
/preset 切换预设(空白会话立即生效,否则 /new 后生效)
/permission ask / never切换权限策略(别名 /perm
/new开启新会话
/clear清空回滚区
/help/exit帮助 / 退出(Ctrl+C 也可退出)

预设:每个会话由一个 DSH agent preset(与网页端同一套机制——标准/standard、PTC/code、极简/minimal、创造/cordis)组装而成。默认是 standard;可在 $DSH_HOME/settings.yamlagent-presets.default 设置持久默认值,自定义 preset 放在 $DSH_HOME/.agent-presets/(一个含 agent.cordis.yml 与可选 preset.yml 的目录)。

工具授权提示(同一输入区内联):

? [授权] pwsh: … — y 允许一次 / n 拒绝 / 回车 允许

配色覆盖(DSH_CLI_THEME=,值为 SGR 参数串):

{ "user": "1;92", "reasoning": "2;90", "toolCall": "33",
  "toolResult": "36", "toolError": "1;31", "system": "35", "status": "36" }