@fnmoa/cli

中文文档
0.9.20发布于 2026/11/13UNLICENSEDES Module近 30 天下载 2000

与终端的工作空间交谈.

中文使用文档
文档目录18 节
  1. 快开始
  2. chatGPT 计划中的代码
  3. 照顾它
  4. 使用工作空间
  5. 登录到一个
  6. 检查好了
  7. 船舶问题
  8. 宣布一个团队并给它工作
  9. 跟着发生的事情
  10. 跟经理说话
  11. 选择工作地点
  12. 连接联系人
  13. 脚本
  14. 退出代码
  15. 贾森
  16. 通用旗帜
  17. 它把东西藏在那里
  18. 许可证

@fnmoa/cli (英语)

moa 是命令行用于 fnMoa (英语): 运行编码代理的工作空间 (Claude Code, Codex等)作为你的GitHub寄存器上的团队. 这个 校对:soup.

用CLI来:

  • 安装 这个机器上的fnMoa工作空间,一个Vercel Sandbox或Cloudflare: moa init 写一个可以读取和填充的文件夹,以及 moa deploy 部署;
  • 照顾好它数字 : moa deploy --dry-run (计划), moa status, (中文(简体) ), moa down· ;
  • 与它合作给特工工作 跟着跑 和经理谈话 向合并拉动请求发出.
npx @fnmoa/cli init machine    # or: npm install -g @fnmoa/cli, then `moa init machine`

节点22或更新. fnMoa是专有软件,需要许可证,即 一个工作空间是免费的。 见 许可证。 。 。 .


快开始

  1. 做户口. 转到 https://fnmoa.locusgraph.com (中文(简体) ),并签名 GitHub, 选择 免费开始 并复制您的密钥 账户 — 许可证密钥。 。 。 .

  2. 写文件夹.

    moa init machine            # or: moa init cloudflare --domain example.com, moa init vercel
    cd fnmoa-machine
    
    目标文件夹需求
    machinecompose.yaml, (中文(简体) ), .env道克与作曲相会. 工作空间在127.0.0.1:8787,控制台在:3100.
    cloudflarewrangler.jsonc, (中文(简体) ), worker.js, (中文(简体) ), Dockerfile, (中文(简体) ), secrets.envnpx wrangler@4 login你在Cloudflare的域名 工人付费 道克.
    vercelsandbox.jsonc, (中文(简体) ), secrets.envvercel login (或 VERCEL_TOKEN(原始内容存档于2018-09-26). Docker the first time.

    每个文件夹还有一个 README.md 每个步骤 moa 并用手, (单位:千美元) .gitignore 隐藏秘密 moa.json。 。 。 .

  3. 填入网络上的秘密. 签名于 https://fnmoa.locusgraph.com/count/secrets (中文(简体) ) 你应当在大地上填满每个迹象 GH_TOKEN,一个代理密钥,控制台登录, 其余,每个有一个 说明如何得到它。 它们被封入了您的浏览器 并用密码句 在你的账户的金库里; moa deploy 把他们拉进来 密码句是每台机器问一次).

    moa init 请您批准在浏览器中登录并写下 文件夹许可证( i)MOA_LICENCE本身; --no-browser 跳过,和 FNMOA_LICENCE_KEY 做同样的工作。 文件夹( E)secrets.env, (中文(简体) ), .env 打开 一台机器,写0600 仅保留属于它的东西: 主人的代币, 安装代号,控制台的饼干秘诀, 许可证, 和一个claude或 代码登录 。 谁可以报名到控制台 MOA_LOGINS 在金库里: GitHub 用户名, 逗号分隔, 每个所有者; 它们与 GitHub通过fnmoa.locusgraph.com. (原始内容存档于2017-10-12). 0.7.x 的文件夹移动它的秘密 到金库一次 moa secrets import。 。 。 .

  4. 计划,然后部署.

    moa deploy --dry-run    # what would be made (+), changed (~) or kept (=), and what is missing (!)
    moa deploy              # makes it, deploys it, and logs `moa` in to it
    

    moa deploy 记录它做了什么 .moa/state.json,所以运行它再次 只改变改变什么。 在Cloudflare上,它使D1数据库和R2 桶并写他们的身份 wrangler.jsonc。 。 。 .

chatGPT 计划中的代码

运行 codex login 在你的机器上,然后: 在Cloudflare和Vercel上,复制 ~/.codex/auth.json 改为 codex/auth.json 文件夹中 (moa deploy 放进去 放在机器上,放进去 .env 作为 MOA_CODEX_AUTH (读取有 单行道.


照顾它

moa status [dir]                 # the workspace, the folder's owner token, the console
moa deploy [dir] --dry-run       # what a deploy would change; changes nothing
moa deploy [dir]                 # apply the folder again
moa init <target> . --update     # move the folder to this CLI's release; secrets kept
moa stop [dir]                   # stop what the folder deployed; every piece of data kept
moa start [dir]                  # start it again on the same data, and wait for the workspace
moa down [dir]                   # delete what moa deploy made, and nothing else; asks [--yes]

down 只删除什么 .moa/state.json 说 moa deploy 制作,由id. A 类 数据库或水桶中曾经存在过的东西被单独处理.

stop 结束计算并保存数据:在 Cloudflare 上,容器是 已销毁并保留下来( 工作空间回答 503, 控制台的一页写着 ) (所以)D1,R2和工人留下来;在一台机器上 docker compose stop, (中文(简体) ), 保存了容器和体积;在Vercel上服务器端和持续沙盒 停止,它的磁盘保存. start 带回并打印 URL; 在 Cloudflare 上 寒冷的开始需要一两分钟. moa status 说"停止"一个停止 云浮部署. 在部署文件夹中 moa stop 表示文件夹; 带有工作编号 它阻止了这项工作.

日志是平台本身的: docker compose logs -f 在机器上, npx wrangler@4 tail fnmoa-workspace 在克洛德弗莱尔 云花板容器 空闲时间过后会入睡,一个Vercel沙盒会停在它的尽头 会话; 下一个请求,或 moa deploy,再次开始——a moa stop 留下来 直至 moa start。 。 。 .

为了更新 fnMoa,更新CLI,然后:

moa init <target> . --update && moa deploy

使用工作空间

登录到一个

moa deploy 将您登录到它部署的工作空间。 用别人 运行 :

moa login https://workspace.example.com --token <token>   # a token the owner gave you
moa login https://workspace.example.com --github          # sign in with GitHub
moa whoami                                                # which workspace, which tenant
moa use <profile>                                         # switch between saved workspaces

--github 是给一个拥有者在控制台上添加的人的 它印着一个 GitHub 设备代码, 等待当你批准它, 并保存一个自己的符号, 和你的日常开支上限。 在控制台访问中删除您 立刻停下来.

检查好了

moa doctor
  ok  runs agents   sqlite, v0.4.0
  ok  agent CLIs    claude, codex
  NO  repository    none configured — pipelines need MOA_REPO
  NO  github login  gh has no token there — run `gh auth login` where the workspace runs

准备就绪时退出 0,未准备时退出 2.

船舶问题

moa ship 41                        # issue #41 → pull request → reviewed → merged

宣布一个团队并给它工作

moa agent create planner  --cli claude --role "You scope the work. You never write code." --peers builder
moa agent create builder  --cli claude --role "You write the code and its tests."         --peers reviewer
moa agent create reviewer --cli codex  --role "You read diffs and name defects."

moa run builder "fix the retry bug in src/http.ts" --watch
moa team work planner,builder,reviewer --watch
moa ask planner builder "which retry flag?"        # and wait for the answer
moa delegate planner builder "implement the retry fix"

--peers 一个特工可以打开一条线 在线条内回應是 已经不需要权限 .

跟着发生的事情

moa watch                  # every job in the workspace, as it changes
moa jobs                   # what is running now
moa runs                   # what ran, newest first [--failed] [--state running]
moa logs <runId> --watch   # every line a run produced, live
moa spend --since 24h      # what it cost, and what asked for it
moa inbox                  # who is waiting on an answer
moa delegations --blocked  # what is stuck, and the command to unstick it

Ctrl-C停止命令开始的工作并等待它停止. 按着它 两次离开工作; moa jobs 又寻出.

跟经理说话

经理是为你谋划和开始工作的代理商, 同样的一个 控制台的聊天页面.

moa manager say "start #41 with the core team"   # and wait for its answer
moa manager proposals              # what it proposes, each with its id
moa manager approve <id>           # say yes, and run it now
moa manager dismiss <id>           # say no
moa manager watch                  # what is running, and how it is going

say 等待时间 --timeout <s> (默认600). 二号出口和二号出口 经理的回答是当它有一个.

选择工作地点

经理和领队只接触允许的仓库和管道 只从一个开始。 不允许任何人发言。 更改名单是老板的.

moa repos allowed                  # the repositories it may touch
moa repos allow acme/web           # one the GitHub login here can push to
moa repos disallow acme/web        # take it back; the Manager stops watching it

连接联系人

仅限所有者. moa pair 制作一次性代码并打印要发送的行 特使,它工作一次,10分钟.

moa pair                                   # the /specialist add … line for Envoy
moa pair --repo acme/web,acme/api --cap 20 # only these repos, at most $20
moa pair list                              # who is paired, and the opt-in
moa pair same-owner on --owner nasim       # your yes in Envoy counts here
moa pair same-owner off                    # every yes is given in fnMoa

没有 --repo,代理的任务可以在经理的每一个仓库中执行 看着. --owner 是您代理人名下“ @” 后面的部分( x)nasim 页:1 envoy@nasim) (中文(简体) ). 没有它, same-owner on 带一对经纪人的主人,或 工作空间是自己的。 代理标记的名称不考虑 案例.


脚本

退出代码

  0  it did what it was asked
  1  it ran and failed — a red build, a CLI that would not start
  2  a rule stopped it — a budget, a policy, a bounced message, a timeout
  3  the command was typed wrong, or the token was refused

贾森

--json 写一个回答,不要其他的。 警告到标准点.

moa agent list --json | jq -r '.agents[] | "\(.name)\t\(.cli)\t\(.status)"'
moa run builder "say ok" --json | jq '{result: .result.result, cost: .result.costUsd}'
moa jobs --json | jq -r '.jobs[] | select(.state == "running") | .kind'
moa ship 41 --json | jq -r '.result.outcome'
moa doctor --json | jq -e '[.checks[] | select(.ok == false)] | length == 0'

所依赖的外形是由测试所支撑的 所以用它们来构建一个脚本 不安静地打破 :

  agent list     .agents[].name .agents[].cli .agents[].status .agents[].role
  inbox          .waiting[].to .waiting[].unread .waiting[].oldest
                 .waiting[].from
  run            .result.runId .result.result .result.isError .result.costUsd
  ask            .result.answered .result.answer .result.chain
  runs           .runs[].id .runs[].cause .runs[].costUsd
  delegations    .delegations[].from .delegations[].to .delegations[].task
                 .delegations[].blockedBy.body
  seats          .seats[].cli .seats[].used .seats[].hasCredential
                 .seats[].installed
  spend          .costUsd .byAgent[].agent .byCause[].cause
  jobs           .jobs[].kind .jobs[].state .jobs[].subject .jobs[].agent
                 .jobs[].progress.step
  doctor         .tenant .checks[].name .checks[].ok .checks[].detail
  ship           .result.outcome .result.reason .result.steps .result.costUsd

退出代码仍然适用 --json: 弹出 moa send 2号出口和打印 弹出.

通用旗帜

  --watch            print what the agent does, as it does it
  --detach           start the work and return at once
  --json             machine-readable output only
  --profile <name>   a saved workspace other than the current one
  --timeout <s>      stop waiting; the work carries on

标签补全 : eval "$(moa completion zsh)" (或 bash在你的外壳的弧形文件中.


它把东西藏在那里

  ~/.moa/config.json           saved workspaces and their tokens (mode 0600)
  <folder>/secrets.env, .env   the deploy folder's secrets (mode 0600, gitignored)
  <folder>/.moa/state.json     what moa deploy made there, for moa down
  MOA_HOME                     use another folder than ~/.moa
  MOA_URL, MOA_TOKEN           talk to this workspace, ignoring the saved ones (CI)

许可证

fnMoa为专有:版权 (c)2026 fnLog0,所有权利保留. 见 LICENSE 本包中。 使用它需要来自 https://fnmoa.locusgraph.com (中文(简体) )数字 :

  • 免费:这个机器上的一个工作空间.
  • 团队 财务报告和审定财务报表 商业:更多工作空间,在Vercel和Cloudflare上也. 马上就来.

工作场所每天检查一次许可证。 如果计划失败了,就有 宽限期。 之后,工作空间只读直到支付计划 ,则没有删除数据.

本套件0.1.0至0.3.0版本是较旧、无关的CLI,并且是 堕地.

版本与发布记录

@fnmoa/cli 共发布 51 个版本,首次发布于 2026/06/24;过去 12 个月发布了 51 个版本。

版本发布日期距今
0.9.20latest2026/11/132 天前
0.9.192026/10/2422 天前
0.9.182026/10/2224 天前
0.9.172026/10/2224 天前
0.9.162026/10/2224 天前
0.9.152026/10/2224 天前

关于 @fnmoa/cli 的常见问题

@fnmoa/cli 是什么?

与终端的工作空间交谈.

如何安装 @fnmoa/cli?

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

@fnmoa/cli 支持 TypeScript 吗?

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

@fnmoa/cli 支持 ESM 还是 CommonJS?

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

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

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

@fnmoa/cli 可以商用吗?

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

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

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

@fnmoa/cli 还在维护吗?

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