@agentdocumentformat/cli

中文文档
0.8.8发布于 2026/11/06MITES Module构建来源已验证近 30 天下载 1832

ADF CLI: the ADF (Agent Document Format) daemon, command line and terminal app. Run your agents headless: adf daemon, then adf.

原始使用文档
文档目录6 节
  1. Install
  2. Browser Studio
  3. Local models
  4. Quickstart
  5. Docs
  6. License

@agentdocumentformat/cli

The ADF CLI: run ADF (Agent Document Format) agents from a terminal, with no desktop app. An ADF agent is a single .adf file: config, memory, files and history in one portable document. For the desktop app, ADF Studio, see the releases.

  • adf: the terminal app. Your fleet of agents in one screen: chat with any agent or any of its loops, approve tool calls, edit files, schedule inner loops (side loops), watch live events.
  • adf web: Browser Studio, using the shared desktop renderer. Available in builds that include browser support; published npm v0.8.3 does not include it.
  • adf <command>: one-shot commands for scripts (adf help).
  • adf daemon: the background daemon that runs the agents. adf starts it for you; it keeps running after you quit.

Install

Current main requires Node.js ^22.23.4 || ^24.22.1 || ^26.12.1; adf refuses earlier releases and 23.x/25.x because of CVE-2026-111497, and 27+ until tested. Published npm v0.8.3 declares >=22 and predates this check. See Node.js versions. Native modules (SQLite, OS keychain) come prebuilt for Windows, macOS (arm64, x64) and Linux (x64, arm64, glibc).

npm i -g @agentdocumentformat/cli
adf

EEXIST on install? Remove the old package first: npm uninstall -g agent-document-format.

Upgrade: npm i -g @agentdocumentformat/cli@latest, then adf daemon restart.

Browser Studio

With a browser-enabled CLI and daemon build:

adf web                   # start the local daemon if needed and open the browser
adf web --port 7485        # choose another local daemon port
adf web --no-daemon        # use an already-running daemon

The browser signs in through a short-lived, one-use link. No desktop app or manual token copying is needed. adf web is local-only; for another device, run these commands on the daemon host:

adf daemon remote on
adf daemon remote status
adf daemon remote allow-network <network-id-or-name>   # if not already allowed
adf daemon pair

Open the printed /studio/ address on the other device, enter the six-digit code and a browser name, then approve that request in the host terminal. Paired browsers are remembered for up to 30 days; browser sessions last eight hours. Signing out clears the remembered credential. Revoke access with adf daemon devices revoke <id-or-label>.

These instructions describe the browser-enabled build, not published npm v0.8.3. From its source checkout, use npm run build:web followed by npm run adf -- web; npm run build:npm packages the browser assets with the CLI. See the Browser Studio guide for source setup, network access and browser limitations.

Local models

Use Ollama, LM Studio, or any server that implements the OpenAI-compatible chat API. Both the server and selected model need tool calling for agent tools. Vision is needed only when the model must understand images or screenshots. Add the server with /provider add, using its API base URL and model ID; supply a key only if the server requires one. See local model requirements.

Quickstart

In the terminal app (a welcome checklist opens on first run):

/identity create        # your owner identity: 12 words, the same as in ADF Studio
/login chatgpt          # or /login grok, /login claude, or /provider add for an API key
/new                    # create an agent; its chat opens
/loop new consolidator  # optional: an inner loop that tidies memory nightly

Or with one-shot commands:

adf identity new
adf auth login chatgpt
adf new agent-1 --start
adf chat agent-1 "hello"
adf events agent-1

Daemon: adf daemon status | stop | restart | logs -f | token. On current main, Studio in Local mode and the CLI share one daemon, settings and owner identity, and can run side by side. With Inside Studio (legacy), adf refuses to start a daemon on the same settings while Studio runs; switch Studio to Local mode or quit it first.

Docs

License

MIT

版本与发布记录

@agentdocumentformat/cli 共发布 16 个版本,首次发布于 2026/09/29;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.8.8latest2026/11/062 天前
0.8.72026/11/035 天前
0.8.62026/11/016 天前
0.8.52026/10/309 天前
0.8.42026/10/309 天前
0.8.32026/10/2415 天前

关于 @agentdocumentformat/cli 的常见问题

@agentdocumentformat/cli 是什么?

ADF CLI: the ADF (Agent Document Format) daemon, command line and terminal app. Run your agents headless: adf daemon, then adf.

如何安装 @agentdocumentformat/cli?

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

@agentdocumentformat/cli 支持 TypeScript 吗?

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

@agentdocumentformat/cli 支持 ESM 还是 CommonJS?

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

@agentdocumentformat/cli 需要什么版本的 Node.js?

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

@agentdocumentformat/cli 可以商用吗?

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

@agentdocumentformat/cli 的下载量有多少?

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

@agentdocumentformat/cli 还在维护吗?

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