chen-001/dsh-grok-tui6

dsh-grok-tui

通过 grok-build 的 TUI 使用 dsh。

AI 分析

核心用途是让用户在终端(TUI)中直接操作和使用 dsh。适合偏好命令行交互、使用 macOS 或 Linux 系统的开发者,前提是需安装 dsh 与 grok TUI 二进制文件。

包名
dsh-grok-tui
版本
0.3.8
许可证
MIT
最近更新
2026年8月13日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

使用 / 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 rate99.6%
dsh_ttft平均首 token 延迟 / avg time-to-first-token0.8s
dsh_tps平均输出速率 / avg output tokens/s204.1/s
dsh_in / dsh_out累计输入/输出 token / cumulative in/out tokens64 / 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            │
╰─────────────────────────────────╯

推荐:在 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 rate99.6%
dsh_ttft平均首 token 延迟 / avg time-to-first-token0.8s
dsh_tps平均输出速率 / avg output tokens/s204.1/s
dsh_in / dsh_out累计输入/输出 token / cumulative in/out tokens64 / 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            │
╰─────────────────────────────────╯