dshbase

插件目录 / Developer / dsh-grok-tui

dsh-grok-tui

已验证 · 实测可装 chen-001

✓ 持续维护 2 位贡献者 基于 6 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

11Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台

功能简介

用 grok-build 的 TUI 跑 DSH

我们的评价
可用 — 实测通过,早期项目

用 grok-build 的 TUI 跑 DSH 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-grok-tui

grok-build 的 TUI 作为 DeepSeek Harness (dsh) 的前端:界面是 grok 的,内核(提示词、工具、模型路由、会话持久化)由 dsh 提供。

Grok's TUI as a frontend for DeepSeek Harness (dsh): the interface is grok's, the engine (prompts, tools, model routing, persistence) is dsh's.

dsh-grok-tui

安装 / Installation

前提:已安装 dsh 与 grok TUI 二进制(curl -fsSL https://x.ai/cli/install.sh | bash)。支持 macOS / Linux。

Prerequisites: dsh and the grok TUI binary (curl -fsSL https://x.ai/cli/install.sh | bash). macOS / Linux.

方式 A:npm 发布版 / Published npm package

npm install -g dsh-grok-tui
grok-dsh setup        # 把 grok bridge 挂进 dsh web 的 profile(幂等,可重复执行)
                      # wire the grok bridge into the dsh web profile (idempotent)
npx @deepseek-ai/dsh web   # 启动官方 host / start the official host
grok-dsh              # 打开 TUI,直连运行中的 dsh web
                      # open the TUI, bridging to the running dsh web

grok-dsh setup 是显式的(npm 全局安装不会静默改写你的 dsh 配置):它把 grok-server 行写进 ~/.dsh/profiles/web/cordis.patch.yml 并把插件软链进 profile 的 node_modules,npx @deepseek-ai/dsh web 随之携带 leader socket。host 已在运行时重装后需重启一次。

grok-dsh setup is explicit (a global install never silently rewrites your dsh config): it adds the grok-server row to ~/.dsh/profiles/web/cordis.patch.yml and links the plugin into the profile's node_modules, so npx @deepseek-ai/dsh web carries the leader socket. Restart the host once if it is already running.

方式 B:git 完整安装 / Full installer

git clone https://github.com/chen-001/dsh-grok-tui.git
cd dsh-grok-tui && sh install.sh

This installer performs the same bridge hookup automatically, then builds and writes the grok-dsh launcher into your PATH.

两种方式安装后的行为完全一致(命令、herdr 侧栏自动配置、用量面板)。

Both paths behave identically afterwards (command, automatic herdr sidebar config, usage panels).

使用 / Usage

先启动官方 host(推荐),再打开 TUI:

Start the official host first (recommended), then open the TUI:

dsh web                # 启动官方 host / start the official host
grok-dsh               # 打开 TUI:检测到运行中的 dsh web 则直连,否则启动本窗口独立后端
                       # open the TUI: bridges to a running dsh web, else starts a per-window backend
grok-dsh stop          # 停止所有独立后端 / stop all standalone backends
grok-dsh status        # 查看 host 桥 / 独立后端状态与 grok 版本 / host bridge & backend status, grok version
grok-dsh restart       # 重启当前窗口的独立后端 / restart this window's standalone backend

在哪个目录运行 grok-dsh,会话的工作目录就在哪个目录。独立后端与 dsh web 不要同时运行(两者写同一会话存储)。

Run grok-dsh in the directory you want the session's working directory to be. Do not run a standalone backend while dsh web is up (both write the same session store).

用量指标展示 / Usage metrics

官方 grok 二进制即可显示 token 用量(状态栏 18K/1.0M context bar)。完整指标——缓存命中率、TTFT、TPS、输入/输出 token——在以下环境自动展示,无需编译任何 grok 源码

The stock grok binary already shows token usage (the 18K/1.0M context bar). Full metrics — cache hit rate, TTFT, TPS, in/out tokens — appear automatically in these environments, no grok source build needed:

推荐:在 herdr 中使用 / Recommended: inside herdr

herdr 的 pane 里运行 grok-dsh,指标实时显示在左侧 agents 列表的 grok 条目下(herdr 侧栏配置由安装自动完成,重启 herdr 或 reload config 后生效):

Run grok-dsh inside a herdr pane and the metrics appear live under the grok entry in the agents list (herdr sidebar config is installed automatically; reload herdr or its config to pick it up):

token 内容 / Metric 示例 / Example
dsh_cache 缓存命中率 / cache hit rate 99.6%
dsh_ttft 平均首 token 延迟 / avg time-to-first-token 0.8s
dsh_tps 平均输出速率 / avg output tokens/s 204.1/s
dsh_in / dsh_out 累计输入/输出 token / cumulative in/out tokens 64 / 175

在 tmux 中使用 / Inside tmux

在 tmux 里运行 grok-dsh 会自动在 TUI 下方开一个用量面板窗格(按 q 关闭):

Running inside tmux auto-opens a usage panel below the TUI (press q to close):

╭─ dsh usage ─────────────────────╮
│ cache hit     99.6%  (18.0K read) │
│ input            64 tokens       │
│ output          172 tokens       │
│ total         18.1K tokens       │
│ api calls           1            │
│ tool time        0.0s            │
╰─────────────────────────────────╯

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-grok-tui」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

Web profile:

dsh plugin --profile web add dsh-grok-tui

Headless(CLI)profile:

dsh plugin --profile headless add dsh-grok-tui

包信息

npm:dsh-grok-tui · 版本 · 实测环境 dsh 0.1.0-rc.6

实测报告

端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。

使用场景

扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。

适合谁

想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。

二次开发建议

工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →