@clemrig/flow-ui

中文文档
0.15.0发布于 2026/11/10MITES Module近 30 天下载 3628

A local read-only dashboard of the runs of @clemrig/flow workflows

原始使用文档
文档目录3 节
  1. Use
  2. From code
  3. License

@clemrig/flow-ui

A local, read-only dashboard of the runs of @clemrig/flow workflows.

Use

Requires macOS or Linux and Node.js 24 or later.

npm install -g @clemrig/flow-ui
flow-ui [RUNS_DIR] [--port PORT]

flow-ui serves the runs kept in RUNS_DIR (default: .flow/runs, where @clemrig/flow keeps them; a RUNS_DIR given must be an existing directory) on 127.0.0.1, on PORT or a port the system chooses, prints its URL and stops on Ctrl-C. The page shows the runs in a rail you can fold, grouped by day, named by their input, filtered by status or workflow and searched (/). A run shows its name, status, links its result gives, input and figures (start, end, active time, cost against the initial budget with each budget allotted and where it comes from on hover, then launches, rounds and stage executions), above three tabs. Timeline: its launches (the first one, then each resumption) on one bar, each sized by its active time with its day and start time, the pause between two written out, and why each failed one stopped, a launch opening what it ran with (versions, prompts, runtimes, budget and its origin, machine, directory, the runtimes' variables set, values given), what changed since the launch before marked; its stage executions over its active time, one after the other as the run executes them, the shortest wider than their time, a lane per agent stage then one for the code stages, each gate a badge with its verdict on the end of the execution it judges, with the resumptions, the rounds its corrections started and each correction taken, zoomed on demand (Fit, 2×, 4×, or a pinch or Ctrl/⌘ with the wheel on the lanes); its correction counters; below, the selected execution's panel with a tab per question, a code stage having only Summary, Output and Activity: Summary (its outcome, why it failed or was sent back, the correction it received, its warnings; for an agent stage, what its main agent read from its first step to its latest, in tokens, its steps (the main agent's responses), its tool calls, sub-agents' included, its cost, partial when a call's own cost is unknown (a call's own cost: what it announced, or for Claude Code, whose figures are a session's total, that total less the total as the session's previous call in the run ended); its agent: runtime, model and effort, permissions and where they come from, the tools the profile lists and how many the session loaded, the conversation, the timeout; each call when it made several; and the tools used), Configuration (what each of its sessions ran with, as the session's first call in the stage announced it: what the profile sets beside what the runtime announced, and the differences it reported; for Claude Code, the built-in tools, MCP tools by server, sub-agents, skills, commands (the operator's) and plugins, each with what the profile sets and what was loaded, opening on each item marked by what the profile allows of it: allowed, refused (not in its tools under its permission mode, unless the machine's rules, which are not recorded, allow it), undecided (it lists no tools, or its mode decides), in its tools but not loaded, or, for sub-agents and skills, without the Agent or Skill tool they need; for Pi, its tools, skills and extensions; Codex says it does not announce its configuration; then the system prompt as the call sent it: the runtime's own and the workflow's, sized at a conversation's first call only, the parts estimated and marked ≈), Input (what each call sent, one at a time: its message part by part, what the request named instead of sending because the conversation already had it, then the request and the command exactly), Output (what the stage returned, the correction it sent back or could not send, each call's final text when the stage returned nothing, and what a call that succeeded wrote on its error output) and Activity (its calls, tool calls, journal, the hooks that ran, a failed one marked, what the runtime reported, such as refused tools, limits, retries and compactions, and warnings, in one timeline you can filter). Cost: its cost by session and over its active time with each launch's budget when known. Result: its result, its data as a tree you unfold, and its runtimes. The address keeps the run and its tab and, on the timeline, the execution chosen and the execution's tab (#/<id>/stages/<n>/<tab>, #/<id>/cost, #/<id>/result); while another tab is open, the timeline keeps the execution chosen, the launch opened, the activity's filter and the lanes' zoom and scroll, and a run chosen in the rail opens on the same tab. On the timeline, j, k and f move between executions, and 1 to 5 open the execution's tabs (three for a code stage). It follows a running run as it goes, and follows the selected run again when it is resumed. A result shows the run's validated data as JSON.

To watch a run on another machine, forward the same port through SSH: ssh -L 4321:127.0.0.1:4321 machine, run flow-ui --port 4321 there, and open http://localhost:4321/.

While it runs, any local process that can reach 127.0.0.1 can read the runs it serves.

From code

import { startDashboard } from "@clemrig/flow-ui";

const dashboard = await startDashboard({
  runsDir: ".flow/runs",
  title: "flow",
  label: "my-project",
  presentResult: (state) => [JSON.stringify(state.data)], // optional
});
console.log(dashboard.url);
// later: await dashboard.close();

With presentResult, a run's result is its lines, and the page shows the run's validated data folded below them.

dashboardHandler(options) gives the same dashboard as a request handler, for a server that serves it beside other pages: it answers (request, response, url), where url is the request's address relative to where the dashboard is mounted (/api/runs for /runs/api/runs), and refuses, like startDashboard, every method but GET and any Host other than its own address. The page's own addresses are relative, so it works under any path that ends with /.

License

MIT

版本与发布记录

@clemrig/flow-ui 共发布 20 个版本,首次发布于 2026/10/11;过去 12 个月发布了 20 个版本。

版本发布日期距今
0.15.0latest2026/11/10今天
0.14.02026/11/063 天前
0.13.02026/11/055 天前
0.12.02026/10/2318 天前
0.11.02026/10/1822 天前
0.10.02026/10/1822 天前

关于 @clemrig/flow-ui 的常见问题

@clemrig/flow-ui 是什么?

A local read-only dashboard of the runs of @clemrig/flow workflows

如何安装 @clemrig/flow-ui?

在项目目录运行 npm install @clemrig/flow-ui,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 flow-ui,可以用 npx flow-ui 直接运行。

@clemrig/flow-ui 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/clemrig__flow-ui 是否存在。

@clemrig/flow-ui 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@clemrig/flow-ui 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@clemrig/flow-ui 可以商用吗?

@clemrig/flow-ui 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@clemrig/flow-ui 的下载量有多少?

根据 npm 官方下载统计,@clemrig/flow-ui 在 2026/10/10 – 2026/11/08 这 30 天内被下载 3,628 次,日均约 121 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@clemrig/flow-ui 还在维护吗?

最新版本 0.15.0 发布于 2026/11/10(今天);至今共发布 20 个版本,其中过去 12 个月发布了 20 个;首次发布于 2026/10/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。