npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

oh-my-cli

v1.0.1

Published

AI Agent orchestration tool — orchestrate multiple AI CLIs using OMO's agent convention

Readme

oh-my-cli (omc)

AI Agent 编排工具 —— 统一调度 Claude Code、Codex、Gemini 等 AI CLI,让它们按角色分工协同工作

什么是 oh-my-cli?

oh-my-cli 是一个 AI Agent 编排工具,它让你手头的主 AI CLI(比如 OpenCode、Claude Code)能自动调度其他 AI CLI 来干活。

核心逻辑:

  • 每个 Agent 有明确的职责,绑定最擅长的 AI CLI
  • 你只管下任务,omc 自动分派给最合适的 Agent
  • 通过 acpx 调用所有 AI CLI,支持 system prompt 角色注入

安装

1. 安装 oh-my-cli

npm install -g oh-my-cli

验证安装:

omc --version

2. 安装 acpx(必须)

oh-my-cli 通过 acpx 调用所有 AI CLI,必须先安装:

npm install -g acpx@latest
acpx --version

3. 安装你想用的 AI CLI

oh-my-cli 本身不包含这些 CLI,需要你提前装好:

| AI CLI | 安装命令 | 验证 | |--------|----------|------| | Claude Code | npm install -g @anthropic-ai/claude-code | claude --version | | Codex CLI | npm install -g @openai/codex | codex --version | | Gemini CLI | npm install -g @google/gemini-cli | gemini --version | | Cursor CLI | 在 Cursor IDE 中启用 | cursor --version | | Copilot CLI | npm install -g @github/copilot-cli | copilot --version | | OpenCode | npm install -g opencode-ai | opencode --version |

提示: 不需要全部装,装你自己用得上的就行。

4. 初始化配置

第一次使用前,运行 omc init 创建配置文件:

omc init

这会在 ~/.config/omc/config.json 创建默认配置,你可以根据实际情况修改 Agent 绑定的 CLI。

配置文件示例:

{
  "agents": {
    "architect": { "cli": "claude" },
    "explorer": { "cli": "codex" },
    "researcher": { "cli": "gemini" },
    "frontender": { "cli": "cursor" },
    "craftsman": { "cli": "claude" },
    "writer": { "cli": "gemini" }
  }
}

说明: 配置文件中只需要写你想修改的 Agent,不写的保持默认。

快速上手

查看你的 Agent 团队

omc agents

输出示例:

📋 Available Agents:

  Planning Layer:
    planner    → claude    战略规划:分析需求,制定实施计划
    analyst    → claude    顾问:分析需求,识别隐藏意图和歧义
    reviewer   → claude    审查者:评估工作成果的清晰度和完整性

  Execution Layer:
    commander  → opencode  总指挥:全生命周期管理,任务路由,不写代码

  Worker Layer:
    architect  → claude    架构师:架构设计、复杂问题解答
    explorer   → codex     搜索者:快速代码分析、模式发现
    researcher → gemini    研究员:文档查询、技术调研
    craftsman  → claude    工匠:复杂代码实现,深度重构
    frontender → cursor    前端工程师:UI/UX 开发,界面设计
    writer     → gemini    写手:生成和更新项目文档、README
    ...

检查哪些 AI CLI 可用

omc discover

输出示例:

🔍 Discovering AI CLIs...

  ✓ acpx       0.10.0
  ✓ claude     2.1.104 (Claude Code)
  ✓ codex      codex-cli 0.133.0
  ✗ gemini     not found
  ✓ opencode   1.15.10

使用方式

1. 全流程模式(默认)

直接给任务,omc 自动走 规划 → 搜索 → 执行 → 审查 四阶段:

omc "重构用户登录模块,改用 JWT"

流程:Planner 规划 → Explorer 搜索代码 → Architect 执行 → Reviewer 审查

2. 快速模式(跳过规划和审查)

直接路由到最合适的 Agent 执行,适合简单任务:

omc -q "统计这个项目的代码行数"
omc -q "找出所有 TODO 注释"

3. 指定 Agent

你明确知道要用谁时:

omc --agent architect "分析这段代码的架构问题"
omc --agent explorer "搜索项目中所有用到 Redis 的地方"
omc --agent researcher "对比 RSC 和 SSR 的性能差异"
omc --agent craftsman "重构 auth 模块"

4. 并行执行

多个任务同时开工:

omc --parallel "重构 auth 模块" "写单元测试" "更新 README"

5. 按能力路由

让 omc 根据能力匹配 Agent:

omc --capabilities "code-search,analysis" "找出所有未使用的 import"
omc --capabilities "documentation" "写 API 使用说明"

Agent 列表

规划层(只读,不修改代码):

| Agent | 默认 CLI | 职责 | |-------|----------|------| | planner | Claude Code | 需求分析、制定实施计划 | | analyst | Claude Code | 识别隐藏需求、评估风险 | | reviewer | Claude Code | 审查成果的完整性和质量 |

执行层(只负责协调,不写代码):

| Agent | 默认 CLI | 职责 | |-------|----------|------| | commander | OpenCode | 全流程管理、任务路由 |

工作者层(干活的主力):

| Agent | 默认 CLI | 擅长 | |-------|----------|------| | architect | Claude Code | 架构设计、复杂分析 | | craftsman | Claude Code | 复杂代码实现、深度重构 | | explorer | Codex CLI | 代码搜索、模式分析 | | researcher | Gemini CLI | 文档查询、技术研究 | | frontender | Cursor CLI | UI/UX、前端开发 | | writer | Gemini CLI | 文档编写 | | looker | Gemini CLI | 图片、PDF 分析 | | helper | Copilot CLI | 简单任务、辅助 |

注意: 默认 CLI 可以在 ~/.config/omc/config.json 中修改。

自定义配置

配置文件位置

~/.config/omc/config.json

创建配置文件

omc init

配置格式

{
  "agents": {
    "architect": { "cli": "opencode" },
    "explorer": { "cli": "claude" },
    "writer": { "cli": "claude" },
    "researcher": { "cli": "claude" }
  }
}

修改后验证

omc agents --cli opencode  # 查看哪些 Agent 用 opencode
omc agents                 # 查看完整列表

配置示例

场景 1:我只有 Claude Code 和 OpenCode

{
  "agents": {
    "explorer": { "cli": "claude" },
    "researcher": { "cli": "claude" },
    "frontender": { "cli": "claude" },
    "writer": { "cli": "claude" },
    "looker": { "cli": "claude" }
  }
}

场景 2:我想让某个 Agent 换个 CLI

{
  "agents": {
    "architect": { "cli": "opencode" }
  }
}

真实场景示例

例 1:新功能开发

# 全流程模式
omc "实现用户反馈功能"

例 2:代码审查

# 指定 Agent 逐步审查
omc --agent explorer "扫描整个项目,列出所有已废弃的 API"
omc --agent architect "分析这些废弃 API 的影响范围"
omc --agent craftsman "按照分析结果,逐步替换废弃 API"

例 3:技术调研

omc --agent researcher "对比 RSC 和 SSR 的性能差异"
omc --agent explorer "项目中哪些页面可以用 RSC 优化"
omc --agent architect "基于调研结果,给出迁移到 RSC 的方案"

CLI 命令速查

# 全流程(规划→搜索→执行→审查)
omc "重构登录模块"

# 快速模式(直接路由)
omc -q "统计文件数"

# 指定 Agent
omc --agent architect "分析架构"

# 并行执行
omc --parallel "重构" "写测试" "更新文档"

# 按能力路由
omc --capabilities "code-search" "查找 TODO"

# 查看 Agent 列表
omc agents
omc agents --layer worker
omc agents --cli claude

# 发现可用 CLI
omc discover

# 初始化配置
omc init

常见问题

Q:需要装所有 AI CLI 吗?

不用。只装你用得上的就行。omc discover 会告诉你哪些可用。

Q:没有配置文件能用吗?

可以。omc 内置了默认配置,没有配置文件也能正常运行。但建议运行 omc init 创建配置文件,方便自定义。

Q:omc 和 OMO 是什么关系?

omc 使用了 OMO 的 Agent 命名约定,但 omc 是一个独立的 CLI 工具,不依赖 OMO。

Q:omc 适合谁用?

适合手头有多个 AI CLI 工具,想让它们协作的开发者和团队。

Q:Agent 调用时有角色上下文吗?

有。每个 Agent 调用时会通过 acpx 的 --append-system-prompt 注入角色 system prompt,所以 AI CLI 知道自己是谁、该做什么。

License

MIT