0-finance-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Purpose

目的

Keep the 0 Finance CLI agent-native: every user-facing capability in 0 Finance should be mirrored in the CLI. If a feature is added to the product, add the corresponding CLI command and update docs.
确保0 Finance CLI具备原生Agent特性:0 Finance中所有面向用户的功能都应在CLI中有所体现。如果产品新增了某项功能,需添加对应的CLI命令并更新文档。

When to Use

适用场景

Use this skill whenever modifying the CLI in
packages/cli
(the agent-bank package) or adding new commands, flags, or authentication flows.
当修改
packages/cli
(即agent-bank包)中的CLI,或添加新命令、新标识(flags)、新认证流程时,使用此技能。

Workflow

工作流程

  1. Identify the product capability being exposed.
  2. Add or update the matching CLI command in
    packages/cli/src/index.ts
    .
  3. Update CLI docs in
    packages/docs/cli/
    (installation + reference).
  4. Update product docs or landing pages if the CLI entrypoint changes.
  5. Verify the CLI output examples match actual responses.
  1. 确定要开放的产品功能。
  2. packages/cli/src/index.ts
    中添加或更新匹配的CLI命令。
  3. 更新
    packages/docs/cli/
    中的CLI文档(包括安装指南和参考文档)。
  4. 若CLI入口发生变更,更新产品文档或着陆页。
  5. 验证CLI输出示例与实际响应一致。

Testing

测试

Run commands from
packages/cli
using either Bun or pnpm:
  • bun --cwd packages/cli run dev -- <command args>
  • pnpm --filter agent-bank exec tsx src/index.ts <command args>
使用Bun或pnpm运行
packages/cli
中的命令:
  • bun --cwd packages/cli run dev -- <command args>
  • pnpm --filter agent-bank exec tsx src/index.ts <command args>

Common Issues

常见问题

  • pnpm --filter agent-bank dev -- ...
    injects a literal
    --
    argument, which Commander treats as end-of-options; use
    pnpm --filter agent-bank exec tsx src/index.ts ...
    instead.
  • pnpm exec
    prints an extra
    undefined
    line on non-zero exits; this is a pnpm quirk. Use
    finance
    or Bun for cleaner stderr if needed.
  • pnpm --filter agent-bank dev -- ...
    会注入一个字面量
    --
    参数,Commander会将其视为选项结束符;请改用
    pnpm --filter agent-bank exec tsx src/index.ts ...
  • pnpm exec
    在非零退出时会额外打印一行
    undefined
    ,这是pnpm的特性。若需要更简洁的stderr输出,可使用
    finance
    或Bun。

Documentation Requirements

文档要求

  • Update
    packages/docs/cli/reference.mdx
    when a command or option changes.
  • Update
    packages/docs/cli/installation.mdx
    when auth or install steps change.
  • Keep
    packages/docs/index.mdx
    quick start in sync with the CLI.
  • 当命令或选项发生变更时,更新
    packages/docs/cli/reference.mdx
  • 当认证或安装步骤变更时,更新
    packages/docs/cli/installation.mdx
  • 保持
    packages/docs/index.mdx
    中的快速入门内容与CLI同步。

Completion Criteria

完成标准

  • CLI functionality matches the product capability.
  • Docs reflect the latest CLI behavior.
  • If the CLI is user-facing, update the landing quick-start copy.
  • CLI功能与产品功能匹配。
  • 文档反映CLI的最新行为。
  • 若CLI面向用户,更新着陆页的快速入门文案。