@fongflow/cli

中文文档
2.10.4发布于 2026/11/13ES Module近 30 天下载 2300

FongFlow命令行界面——在自有电脑上运行Flow步骤(fongflow running),给FongFlow AI一个浏览器(fongflow computer),运行并监视工作流程,从终端上捕获待办事宜.

中文使用文档
文档目录8 节
  1. 登录工作方式
  2. 安装/ 运行
  3. 配置
  4. 图标
  5. 实例
  6. 运行者 – 运行此计算机上的流程步骤
  7. 容器模式
  8. 电脑——FongFlow AI为您使用的浏览器

fongflow 语录

fongflow 是方花的命令行界面。 仅命令:否 互动屏. 它有三样东西:

  • runner:使这台电脑成为"Flow's "Run on my computer"的跑车 步骤。 这是它的主要工作.
  • flow:运行工作流程,并从 shell 脚本或 CI 中观看其运行.
  • fofo:从终点站问出方花助手福福.
  • capture: 将注释、 管道文本或文件放入您的 Idea 抓取信箱.
  • todo:快取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取.

ff 以简短的别名安装: ff flow ls 与 fongflow flow ls。 。 。 .

登录工作方式

CLI 使用标准的 OAuth 2. 0 授权代码流与 PKCE (RFC 7636 / RFC 8252-"Outh for Birtual apps"): for (中文(简体) )

  1. fongflow login 在回转端口上启动一个微小的本地网络服务器 (单位:千美元)127.0.0.1打开后端的浏览器 /oauth/authorize 终点.
  2. 你和往常一样登录到网上 授权服务器重定向到 cLI的当地 …/callback 一次性授权的 URL code。 。 。 .
  3. CLI 交换编码(加上 PKCE 验证器) : /oauth/token 用于 访问令牌 财务报告和审定财务报表 刷新符号,然后在当地储存.
  4. 之后的每个命令都会发送访问符作为 Authorization: Bearer <token>键当它们被自动刷新时 过期.

OAuth 公众客户端(client_id = fongflow-cli)及其回转方向 URI 启动时由后端种子 (单位:千美元)backend/src/modules/oauth/bootstrap.ts) (中文(简体) ).

安装/ 运行

从回波根:

pnpm install
pnpm --filter @fongflow/cli build

然后直接运行,或者将其链接到您的 PATH数字 :

node cli/dist/index.js --help
# or, to get a global `fongflow` command:
cd cli && npm link
fongflow --help

开发期间,您可以跳过建设步骤 :

pnpm --filter @fongflow/cli dev -- --help

配置

设置如何设定默认
后端 URLFONGFLOW_API_URL (原始内容存档于2019-09-21) (英语). env var, or fongflow login --api <url>https://fongflow.com
OAuth 客户端 IDFONGFLOW_CLIENT_ID 环境 varfongflow-cli
配置/ 令牌存储FONGFLOW_HOME,则 $XDG_CONFIG_HOME/fongflow~/.config/fongflow

全权证书应写给 ~/.config/fongflow/credentials.json 与 0600 权限.

图标

每个列表命令需要 --json。失败的命令退出非零.

fongflow login [--api <url>] [--no-browser] [--scope <scope>]
fongflow logout
fongflow whoami [--json]

# Runner (see below)
fongflow runner register | start | status | config | test | jobs | logs
fongflow runner install-service | stop | restart | uninstall-service | unregister | build-image

# Computer — a browser FongFlow AI uses for you (see below)
fongflow computer start [--browser auto|container|chrome] [--headed] [--image <img>] [--port <n>] [--chrome <path>]

# Flow — a workflow is a name (exact or a unique part of one) or an id
fongflow flow ls [--status active,paused] [--json]
fongflow flow run <workflow> [-i <json|@file|->] [--var k=v]… [--draft] [--no-wait] [-t <seconds>] [--json]
fongflow flow runs [workflow] [--status <s>] [-l <n>] [--json]
fongflow flow show <runId> [--json]
fongflow flow answer <runId> [field=value…]     # no values: print the question
fongflow flow cancel <runId>
fongflow flow on|off <workflow>

# FoFo — one question per command; the answer streams to stdout
fongflow fofo <message...> [--new] [-c <conversationId>] [-a <agent>] [--json]
fongflow fofo ls | history [id] | agents

# Idea Capture (alias: idea) — words, piped stdin, or a file (≤ 50 MB)
fongflow capture [text...] [-t <title>] [-f <file>] [--json]
#   ff capture "an idea"            → the text
#   git diff | ff capture           → the diff
#   git diff | ff capture "why"     → titled "why", the words then the diff

# Todos
fongflow todo ls [--all] [-l <n>] [--json]
fongflow todo add <title...> [-p <priority>] [-d <date>] [--json]
fongflow todo done <id>

flow run 等待运行结束并打印其步骤 已经返回。 它的出站代码说运行是如何结束的:

代码含义
0 个成功
1个失败或取消
2个等待提问flow answer 还原它)
3个仍在运行时 --timeout 跑出来了

跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑跑 flow run 保留 等跑者完成任务. flow run 运行工作流程 活动版本; 添加 --draft 运行最新保存的草稿.

fofo 保持自己的对话,与网络和码头聊天分开. 每个问题都是最后一个问题; --new 重新开始 管道输入为 所附问题git diff | ff fofo "review this") (中文(简体) ). 工具进度 所以Stdout只坚持答案 需要网络应用程序的工具 打开( 例如读取打开的屏幕) 报表为不可用, FoFo 没有答案.

实例

# Authenticate against a local backend
fongflow login --api http://localhost:9999

# In CI: run a workflow with input, fail the job if the run fails
fongflow flow run "Deploy preview" --input @payload.json --timeout 600

# What happened?
fongflow flow runs "Deploy preview" -l 5
fongflow flow show 0a50c5e7-…

运行者 – 运行此计算机上的流程步骤

偏好安装节点的单个二进制? runner/ 在此寄存器中 正在建设 fongflow-runner,此命令的 Rust 端口,其服务器相同 协议和协议 runner.json (见 runner/README.md) (中文(简体) ). 所有东西 两者均适用;替换 fongflow runner <cmd> 与 fongflow-runner <cmd>。 。 。 .

fongflow runner 把机器变成一个 运行 流出应用程序 "在我的电脑上跑"步. 跑者只打出HTTPS的电话: 长波对工作, 流回脚本的输出, 并报告结果, 因此它在NAT后面工作 没有开放的端口.

# 1. Flow → Runners → Add runner, then copy the key it shows (ffrun_…):
fongflow runner register --key ffrun_… --api https://your-host/api
#    …or, when the CLI is logged in, let it create the runner for you:
fongflow runner register --name "My MacBook" --labels mac,home

# 2. Decide what this machine may run (shell scripts are OFF by default):
fongflow runner config --allow-shell on        # any script
fongflow runner config --allow "git pull"      # or only these commands

# 3. Run it
fongflow runner start                # foreground
fongflow runner install-service      # background, starts at login (macOS launchd / Linux systemd)
fongflow runner status               # config + key check
fongflow runner test "git pull" --dry-run   # would this machine run it, and where?
fongflow runner test "npm test" --image node:22   # run it the way a job would, locally
fongflow runner logs -f              # the background service's log
fongflow runner jobs                 # recent jobs on this runner (needs `fongflow login`)
fongflow runner uninstall-service
fongflow runner unregister

容器模式

一个步骤设置到 进入: 集装箱 在丢弃的多克/波德曼中运行 容器:只挂载该步骤的工作目录(在 /work, (中文(简体) ), 可选只读),有内存/CPU限制, no-new-privileges,以及 可选择无网络。 集装箱不需要 --allow-shell。 。 。 .

fongflow runner config --container-only on      # never run anything directly on this machine
fongflow runner config --allow-image "node:*" --allow-image "fongflow/*"   # image allowlist (empty = any)
fongflow runner config --default-image python:3.12-slim --memory 4g --cpus 4 --network off
fongflow runner build-image claude-code         # builds fongflow/claude-code (Claude Code, non-root)
fongflow runner build-image claude-code-python  # + pip, venv, uv (also claude-code-rust, claude-code-dotnet)

在台阶上摘取的证书(Anthropic、OpenAI或GitHub)到达 脚本为 ANTHROPIC_API_KEY 编号 : OPENAI_API_KEY 编号 : GITHUB_TOKEN + 键 GH_TOKEN。 。 。 . Claude 代码订阅符( 来自 claude setup-token以下列方式抵达: CLAUDE_CODE_OAUTH_TOKENClaude Code执行你的Pro/Max计划. 当工作被要求时,秘密被获取, 从来没有与工作一起存储, 伪装成 •••• 在日志和输出中.

跑腿的装扮住在 runner.json 在证书旁边。 变动至 它可能从下一个任务开始运行; 不需要重新启动 。 脚本运行在 您的登录 shell ($SHELL -l -c所以他们看到你的正常 PATH脚本运行 作为您的用户,在您的许可下,所以只允许在机器上使用外壳 账户中您信任您的工作流程.

电脑——FongFlow AI为您使用的浏览器

fongflow computer start 在方花的AI这个机器上打开浏览器 可以驱动 : 在聊天时询问 !computer … 电脑找到今天的SJC黄金 价钱。 它作为这台机器的跑道运行, 所以先登记一个.

fongflow computer start             # in a container if Docker/Podman is usable, else the installed Chrome
fongflow computer start --headed    # the installed Chrome with its window visible, to watch it work

容器模式运行 chromedp/headless-shell 及其 DevTools 端口打开 127.0.0.1 只保存浏览器配置文件(cookies, sign-ins) fongflow-computer-profile 音量。 Chrome模式将自己的配置保存在 computer/profile 除了你每天的Chrome之外 在证书旁边.

打开 计算机 (单位:千美元)/computer在方花中观看浏览器在旁边的直播 与它聊天(CLI 2.4.0+). 接手吧 将浏览器交给您——单击, 滚动并键入活屏幕以签名或解决支票,而AI的 更改动作等待——和 回返控制 还给我 框架仅仅是 该页面打开时已流出.

在登录时,AI会显示您在聊天中的私人形式:您输入什么(或 你为该网站保存的登录)直接转到这台计算机上 填上页面——AI从未看到. 权限 计算机页面 自行决定可以做什么而不要求:填写、发送/张贴、删除、购买/支付—— 每个"做它","问我"(证明/否认在聊天)或"离开我".

在流动中 在浏览器中执行任务 动作( e)computer.run_task运行 a 整个任务没有得到重视——如时间表上——并返回答案。 保留 fongflow computer start 操作; 需要批准的步骤或 签到时,请按原因停止任务.

AI将页面读作文本并按编号要素行事:打开、点击、键入、, 按键,滚动,退后。 它从未输入密码字段( CLI) 拒绝),并停止签入,付款和机器人检查,让你完成 在浏览器中。 像跑者一样,它只叫出方花,所以它工作 nAT后; Ctrl+C 停止并关闭浏览器.

版本与发布记录

@fongflow/cli 共发布 27 个版本,首次发布于 2026/10/05;过去 12 个月发布了 27 个版本。

版本发布日期距今
2.10.4latest2026/11/132 天前
2.10.32026/11/132 天前
2.10.22026/11/114 天前
2.9.12026/11/069 天前
2.8.02026/11/0214 天前
2.7.02026/10/2620 天前

关于 @fongflow/cli 的常见问题

@fongflow/cli 是什么?

FongFlow命令行界面——在自有电脑上运行Flow步骤(fongflow running),给FongFlow AI一个浏览器(fongflow computer),运行并监视工作流程,从终端上捕获待办事宜.

如何安装 @fongflow/cli?

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

@fongflow/cli 支持 TypeScript 吗?

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

@fongflow/cli 支持 ESM 还是 CommonJS?

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

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

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

@fongflow/cli 可以商用吗?

@fongflow/cli 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

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

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

@fongflow/cli 还在维护吗?

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