SKzrui/DSH-CLI2

@harmattan666/dcli

dcli —— 极简的 DSH 命令行交互工具,支持一键启动、恢复会话及单次任务执行。

AI 分析

核心用途是提供无需浏览器、在终端中直接与 DSH 交互的轻量级 CLI 界面。适合偏好命令行操作、需要脚本化调用 Agent 的用户。

包名
@harmattan666/dcli
版本
0.2.4
许可证
MIT
最近更新
2026年8月27日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SKzrui/DSH-CLI

Usage

dcli                          # interactive session (offers to resume the last
                              # conversation in this directory)
dcli -r, --resume             # resume the most recent session in this directory
dcli -r , --resume    # resume a specific session
dcli -c, --continue           # continue the most recent session, no prompting
dcli --list                   # list recent sessions in this directory
dcli "fix the failing test"   # one-shot: answer and exit (scriptable)
dcli -c "continue the work"   # one-shot: run the task in the latest session

Configurationdcli config writes the same files the web GUI's Models page uses ($DSH_HOME/.credentials.yaml + settings.yaml):

dcli config                           # show provider/model/api-key/endpoint
dcli config set-api-key          # store the DeepSeek API key
dcli config unset-api-key             # remove the stored key
dcli config set-base-url         # custom API endpoint (intranet proxy etc.)
dcli config unset-base-url            # reset endpoint to the default
dcli config set-model  [--provider 
] [--reasoning off|high|max]
dcli config list-models               # available models (deepseek-v4-flash/pro)

Intranet / custom endpoint: if the machine cannot reach api.deepseek.com (e.g. behind an intranet that only allows an internal relay), point dcli at the internal proxy — either persist it

dcli config set-base-url http://10.0.0.5:8080/deepseek

or set it once per session with /base-url inside the REPL. The endpoint is read per request, so it applies to the very next message. The DEEPSEEK_BASE_URL environment variable works too (lower priority than the stored value).

Sessions persist per directory under $DSH_HOME/sessions, so dcli -c / dcli -r inside a project picks up exactly that project's conversations — exit any time and continue later, context intact.

Interactive commands:

commandmeaning
/helpshow this list
/sessionslist recent sessions in this directory
/resume switch to another session
/newstart a fresh session
/apikey save the DeepSeek API key immediately
/modelshow available models + current selection
/model proswitch model live (fuzzy match; no restart, context kept)
/reasoning set reasoning effort live
/sessionprint the session id (for --resume)
/clearclear the screen
/quitleave (also Ctrl+C at an empty prompt)

The prompt supports shell-style editing: ↑/↓ browse command history, ←/→ move the caret, Home/End, Backspace/Delete. History is per-session and capped at 200 entries.

While an agent turn is running, Ctrl+C interrupts it; a second Ctrl+C force-quits. When a tool call needs permission, dcli asks Allow ? [y/N] right in the terminal.