@forum-ai/cli

中文文档
0.4.0发布于 2026/10/05UNLICENSEDES Module零依赖近 30 天下载 4098

Import and capture execution evidence for Forum AI.

原始使用文档
文档目录5 节
  1. Import a provider
  2. Endpoints and source limits
  3. Offline bundles
  4. Local coding sessions
  5. Inspect an exact revision

Forum AI CLI

@forum-ai/cli 0.4.0 records native sessions through session protocol v2. Use Node.js 24 or later.

npm install -g @forum-ai/[email protected]
forum --version
forum --help

One conversation or workflow session is one browsable recording and evaluation unit. Turns and member traces become evidence fragments inside immutable session revisions. Compaction does not start a new session. Native child sessions remain separate with explicit parent links.

Import a provider

Configure FORUM_BASE_URL and FORUM_IMPORT_TOKEN from Add sessions → Import existing traces. A destination FORUM_API_KEY also works. Keep source credentials local.

forum projects --source langsmith
forum preview --source langsmith --project PROJECT_ID --out preview.json
forum import --plan preview.json
forum continue --plan preview.json --out next-preview.json

Use langfuse or braintrust for those providers. Configure LANGSMITH_API_KEY, BRAINTRUST_API_KEY, or both LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY privately.

ProviderExplicit native session identity
LangSmithextra.metadata.thread_id or extra.metadata.session_id
LangfusesessionId
Braintrustmetadata.thread_id, metadata.session_id, or metadata.conversation_id

Identity is scoped by provider, endpoint, and project. Missing session identity produces a deterministic standalone session from trace identity. Titles, users, timestamps, and projects alone never establish membership.

Previews default to seven days and up to 100 sessions. Dates select sessions; all available member traces are included, including members outside that period. Inspect membership, counts, limitations, and continuation before import. Provider previews freeze identities and retrieve evidence at import time.

Version 3 previews are required. Regenerate older plans. Continuation skips prior selections without splitting sessions. Use locally generated previews; never run an untrusted plan with credentials.

The private delivery checkpoint binds to the preview and destination. Retry the same command after an interrupted delivery. Changed evidence requires --refresh, which reads current fragment versions before submitting updates. Unknown delivery outcomes retain exact requests for retry; a confirmed conflict permits an explicit refresh.

An import remains active until all selected members arrive. A completed import establishes an immediate cutoff; unresolved boundaries remain explicit and block automatic evaluation. Delivery never enables a schedule or changes selected judges and sampling.

Endpoints and source limits

Use --endpoint for project discovery or preview. Continuation and import retain it.

SourceDefault endpoint
LangSmithhttps://api.smith.langchain.com
Langfusehttps://cloud.langfuse.com
Braintrusthttps://api.braintrust.dev

Regional and self-hosted sources require their configured HTTPS origin. Langfuse defaults to its public v2 observation API. Use --langfuse-api v1 for an older deployment. This provider API choice is independent of Forum protocol v2.

Langfuse v2 must return the requested sessionId field. An explicit null permits standalone identity; an omitted field fails. Source-side metadata truncation is disclosed as a limitation. Unsupported responses are rejected rather than guessed.

Previews and provider responses have a 64 MiB safety limit and 100,000-record safeguards. Forum accepts up to 8 MiB per fragment, 64 MiB per upload, and 128 MiB per session. Limits produce explicit errors. No session is silently truncated or split.

Offline bundles

forum import --plan preview.json --bundle evidence.forum.json
forum upload --bundle evidence.forum.json

A forum-session-bundle version 2 contains session fragment uploads. Source retrieval or validation failure prevents a partial offline export. Keep bundles and checkpoints private.

The browser import has a smaller request limit. Use the CLI for larger bundles. Offline bundles are new admission requests; use --refresh to reconcile changed destination fragments explicitly.

Local coding sessions

Read the capture guide for activation, verification, upgrades, and removal.

forum capture setup --runtime codex --scope project
forum history preview --runtime codex --out preview.json
forum history import --plan preview.json

Use claude-code for Claude Code. Live capture begins at activation; historical import is separate. Native phase, compaction, delegation, messages, and tool results remain evidence. Opaque encrypted content stays opaque.

History previews select sessions and freeze available supported closed turns and session-level compaction records. Preview and import summaries count turns and session-level fragments separately. A compaction-only session reports zero turns and is still imported. Identical source copies deduplicate. Conflicting copies remain unresolved. Continuation fails if its source-file snapshot changed; generate a new preview.

Inspect an exact revision

Create a temporary grant in Add sessions → Set up tracing → Verify saved sessions. Set FORUM_INSPECTION_TOKEN privately. Missing credentials use hidden terminal input; noninteractive processes must supply private environment variables.

forum recording inspect --recording RECORDING_ID --revision REVISION
forum recording inspect --recording RECORDING_ID --revision REVISION --out private-session.json

Use identifiers from a receipt. There is no latest-revision default. The first command prints metadata. Export downloads the pinned manifest and each exact fragment version in bounded chunks, verifies checksums, and creates a new mode-0600 file.

Existing files are never overwritten. Failed downloads remove partial output. Remove a partial file after forcibly terminating the process before retrying.

Read grants expire after 30 minutes and can be revoked earlier. They cannot upload, manage credentials, or evaluate. Inspection failure does not repeat an application operation.

版本与发布记录

@forum-ai/cli 共发布 4 个版本,首次发布于 2026/09/29;过去 12 个月发布了 4 个版本。

版本发布日期距今
0.4.0latest2026/10/051 个月前
0.3.22026/10/011 个月前
0.3.12026/09/301 个月前
0.3.02026/09/291 个月前

关于 @forum-ai/cli 的常见问题

@forum-ai/cli 是什么?

Import and capture execution evidence for Forum AI.

如何安装 @forum-ai/cli?

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

@forum-ai/cli 支持 TypeScript 吗?

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

@forum-ai/cli 支持 ESM 还是 CommonJS?

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

@forum-ai/cli 需要什么版本的 Node.js?

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

@forum-ai/cli 可以商用吗?

@forum-ai/cli 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@forum-ai/cli 的下载量有多少?

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

@forum-ai/cli 还在维护吗?

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