@fabric-harness/cli

中文文档
6.9.0发布于 2026/11/09Apache-2.0TypeScriptES Module近 30 天下载 5286

TechFabric Harness command-line interface (fabric-harness, fh) — run, build, deploy, inspect agents.

原始使用文档
文档目录5 节
  1. Install
  2. Quick start
  3. What's in the box
  4. Documentation
  5. License

@fabric-harness/cli

Command-line interface for TechFabric Harness — run, build, deploy, inspect, and operate agents from one binary.

Install

npm install -g @fabric-harness/cli
# or
pnpm add -g @fabric-harness/cli

Provides two commands (aliases of each other):

  • fabric-harness
  • fh

Quick start

fh init                                             # scaffold a new .fabricharness/ workspace
npm install                                         # install the deps the scaffolder declared
fh agents                                          # list workspace agents
fh describe hello                                   # show agent metadata + schema
fh run hello --payload '{"name":"Ada"}'             # one-shot run
fh dev                                              # watch mode — POST /agents/:name
fh dev --console                                    # watch mode with the Fiber terminal UI
fh fiber                                            # connect Fiber to an existing local server
fh build --target node                              # build deployable artifact
fh sessions                                         # list persisted sessions
fh inspect <session-id>                             # session history snapshot
fh metrics <session-id>                             # tokens, tools, mounts, per-source bytes

What's in the box

  • fh init [--dir <path>] [--model <provider/model>] [--force] — scaffold .fabricharness/ (sample agent, role, skill, config) plus package.json, tsconfig.json, AGENTS.md. Idempotent.
  • fh run / dev — local execution against any workspace agent.
  • fh fiber — optional keyboard-first terminal UI for jobs, persistent agents, tool activity, and approvals. Use --plain for the line-oriented fallback.
  • fh build — emit deployable artifacts for: node, docker, temporal-worker, cloudflare, foundry-hosted-agent, databricks-app, aks (Dockerfile + k8s/ Deployment/Service manifests with health probes), aca (Dockerfile + azure.yaml + infra/main.bicep for azd up). Agent definitions and source-only workspace contracts are bundled so the output directory can be staged without the producer repository.
  • fh agents / describe — agent discovery and schema introspection.
  • fh sessions / inspect / logs / metrics — session history operations. fh metrics reports tokens, tools, shells, mounts (count / files / bytes), and top tools / sources.
  • fh replay <id> [--from <step-id>] [--limit <n>] — read-only active-path filter from a specific entry id.
  • fh approvals / approve / reject — capability-policy approval handling.
  • fh checkpoints / artifacts / artifact get — durable state inspection.
  • fh tasks / task / cancel-task — task tree management.
  • fh doctor — environment, model provider, Databricks target, and Buzz bridge validation. Databricks App reports separate offline contract support, exact public live certification, preview reachability, and claims that remain unestablished; --live adds bounded read-only workspace probes. Buzz --live performs signed, read-only relay membership and Lakebase/PostgreSQL health certification with redacted operational evidence.
  • fh buzz reconcile [--dry-run] [--limit <1-1000>] — preview or replay one bounded durable Buzz dead-letter batch through the ordinary signed ingress path. Output is content-free and a record is acknowledged only after successful ingress. Optional BUZZ_FORWARD_KEY_ID selects the signing key at a rotating-key receiver; malformed IDs fail before replay.
  • fh temporal-worker — start a local Temporal worker with Fabric activities.
  • fh add — install connector recipes (sandbox, MCP, data).
  • fh verify-attestation / verify-provenance — supply-chain checks for built artifacts.

Databricks support is loaded only for Databricks-specific commands so the base CLI remains lightweight and compatible with its documented Node floor. Install @fabric-harness/databricks in the project before using fh deploy --target databricks-serving; fh init --target databricks and the managed Databricks recipes declare it automatically.

Run fh --help for the full surface.

Documentation

License

Apache-2.0

版本与发布记录

@fabric-harness/cli 共发布 92 个版本,首次发布于 2026/05/06;过去 12 个月发布了 92 个版本。

版本发布日期距今
6.9.0latest2026/11/095 天前
6.8.22026/11/086 天前
6.8.12026/11/0311 天前
6.8.02026/10/3114 天前
6.7.72026/10/1728 天前
6.7.62026/10/131 个月前

其他发布通道:dev → 6.6.0。

关于 @fabric-harness/cli 的常见问题

@fabric-harness/cli 是什么?

TechFabric Harness command-line interface (fabric-harness, fh) — run, build, deploy, inspect agents.

如何安装 @fabric-harness/cli?

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

@fabric-harness/cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fabric-harness/cli 支持 ESM 还是 CommonJS?

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

@fabric-harness/cli 需要什么版本的 Node.js?

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

@fabric-harness/cli 可以商用吗?

@fabric-harness/cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@fabric-harness/cli 的下载量有多少?

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

@fabric-harness/cli 还在维护吗?

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