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

metago-cli

v1.1.0

Published

MetaGO CLI - 一键初始化、健康检查、在终端中直接调用元构能力引擎,让 AI 从工具进化为生命体

Readme

# MetaGO CLI

让 AI 从工具进化为生命体 —— 一键初始化、健康检查、终端调用元构能力引擎

metago-cliMetaGO Lifeform Kit 的命令行接口工具,让你无需依赖任何 IDE,即可一键初始化元构环境、检查安装健康度、列出查看调用 37 个生命体技能。

特性

  • 一键初始化metago init 自动检测已安装的 AI 平台,复制规则文件、注入技能、验证结果
  • 健康检查metago doctor 检查规则文件、核心公理完整性、技能完整性
  • 7 平台支持:Trae / Claude Code / Codex / Cursor / CodeBuddy / Qoder / ZCode
  • 零 IDE 依赖:纯命令行调用,任意终端环境可用
  • 跨平台:Windows / macOS / Linux 全平台兼容
  • 多源技能加载:自动按优先级搜索多个候选技能目录
  • 双格式兼容:同时支持 frontmatter 带 description 与正文带 ## 描述 两种 SKILL.md 格式
  • 提示词生成:把"技能指令 + 用户输入"组装成可粘贴到任意 AI 客户端的提示词

安装

全局安装(推荐)

npm install -g metago-cli

安装后即可在任意终端使用 metago 命令。

本地运行(开发)

git clone https://gitee.com/metago/metago-cli.git
cd metago-cli
npm install
node bin/metago.js <command>

快速开始

metago init                                  # 一键初始化:自动检测平台、安装规则与技能
metago doctor                                # 检查安装健康度
metago platforms                             # 列出所有支持的 AI 平台
metago list                                  # 列出所有技能
metago show metago-critique                  # 查看技能详情
metago run metago-critique --input "你的内容" # 生成技能调用提示词

命令说明

metago init

一键初始化 MetaGO 环境:自动检测平台 → 复制规则模板 → 注入技能 → 验证结果。

metago init                      # 自动检测平台并安装
metago init --platform trae      # 指定平台
metago init --platform cursor    # 安装到当前项目(项目级平台)
metago init --force              # 强制覆盖已存在的配置
metago init --skip-skills        # 仅安装规则文件
metago init --skills metago-critique,metago-decision-lock  # 仅安装指定技能

选项

| 选项 | 说明 | | --- | --- | | -p, --platform <id> | 指定平台:trae / claude-code / codex / cursor / codebuddy / qoder / zcode | | -f, --force | 强制覆盖已存在的配置 | | --skip-skills | 仅安装规则文件,跳过技能 | | --skip-backup | 跳过备份现有配置 | | -s, --skills <list> | 仅安装指定技能(逗号分隔),默认全部 |

初始化流程:

  1. 查找 metago-lifeform
  2. 自动检测已安装的 AI 平台(或使用 --platform 指定)
  3. 复制规则模板到目标平台
  4. 注入技能(如果平台支持)
  5. 验证安装结果
  6. 写入配置文件 ~/.metago/config.json

metago doctor

检查 MetaGO 安装健康度。

metago doctor                    # 检查所有已检测到的平台
metago doctor --platform trae    # 检查指定平台
metago doctor --json             # JSON 格式输出

检查项目:

  • CLI 配置是否已初始化
  • metago-lifeform 包是否可定位
  • 各平台规则文件是否已安装
  • 核心公理完整性(溯源公理、闭环公理、元进化、决策锁、法律优先于效率)
  • 技能完整性(期望数量 vs 实际安装数量)

metago platforms

列出所有支持的 AI 编程平台及当前检测状态。

metago platforms                 # 表格输出
metago platforms --json          # JSON 格式输出

支持的平台:

| 平台 | ID | 类型 | 支持技能 | |------|-----|------|---------| | Trae | trae | 用户级 | 是 | | Claude Code | claude-code | 用户级 | 是 | | OpenAI Codex | codex | 用户级 | 否 | | Cursor | cursor | 项目级 | 否 | | CodeBuddy | codebuddy | 项目级 | 是 | | Qoder | qoder | 项目级 | 否 | | ZCode | zcode | 用户级 | 是 |

metago list(别名 ls

列出所有可用技能。

metago list            # 表格输出(技能名 | 描述 | 来源)
metago ls --json       # JSON 格式输出

metago show <skill-name>

显示某个技能的完整内容。

metago show metago-critique                  # 完整内容
metago show metago-critique --frontmatter   # 仅显示 frontmatter 元数据

metago run <skill-name>

调用某个技能处理输入文本,生成可复制粘贴到任意 AI 客户端的"技能调用提示词"。

由于 CLI 本身不调用 AI,本命令的语义是:把技能指令 + 用户输入组装成一段文本输出。

输入来源(互斥,优先级 --input > --file > --stdin):

| 选项 | 说明 | | --- | --- | | -i, --input <text> | 直接输入文本 | | -f, --file <path> | 从文件读取输入 | | --stdin | 从标准输入读取 |

输出

| 选项 | 说明 | | --- | --- | | -o, --output <path> | 输出到文件;默认输出到 stdout |

示例

metago run metago-critique --input "需要批判性分析的内容"
metago run metago-critique --file ./input.txt
cat ./input.txt | metago run metago-critique --stdin
metago run metago-critique --input "内容" --output prompt.md

metago version(别名 -v--version

metago version     # 显示版本号 + 已加载技能数量
metago -v          # 显示版本号
metago --version   # 显示版本号

metago help

metago help        # 显示总帮助
metago help list   # 显示指定命令的帮助
metago             # 无参数等同 help

技能目录搜索逻辑

MetaGO CLI 按以下优先级搜索技能目录(同名技能先找到的优先,自动去重):

| 优先级 | 来源 | 路径 | | --- | --- | --- | | ① | 环境变量 | $METAGO_SKILLS_DIR | | ② | 当前工作目录 | ./skills | | ③ | 配置文件 | ~/.metago/config.json 中记录的路径(init 时写入) | | ④ | 用户家目录 | ~/.trae-cn/skills | | ⑤ | 本包同级目录 | ../metago-lifeform/skills(开发/克隆场景) |

通过环境变量自定义技能目录:

# Linux / macOS
export METAGO_SKILLS_DIR=/path/to/skills

# Windows PowerShell
$env:METAGO_SKILLS_DIR = "D:\path\to\skills"

# Windows CMD
set METAGO_SKILLS_DIR=D:\path\to\skills

配置文件

路径:~/.metago/config.json

{
  "version": "1.1.0",
  "initialized": true,
  "initializedAt": "2026-07-04T00:00:00.000Z",
  "lastPlatform": "trae",
  "lifeformRoot": "/path/to/metago-lifeform",
  "skillsDirs": [
    "/home/user/.trae-cn/skills"
  ]
}

SKILL.md 格式兼容

支持两种 frontmatter 格式,CLI 自动兼容:

格式 A(metago-lifeform 标准,描述在 frontmatter):

---
name: "metago-critique"
description: "批判性分析技能。对任何输入进行L1-L5分级批判性分析..."
source_document: 元构全息智能引擎.txt
---

# 批判性分析(metago-critique)
...

格式 B(Trae 安装版,描述在正文 ## 描述 章节):

---
source_document: 元构完整信息.txt
source_skill: 批判性分析
---

# 批判性分析

## 描述
对任何输入进行L1-L5分级批判性分析...

兼容策略:

  • name 缺失时,用技能目录名回退
  • description 缺失时,从正文 ## 描述 / ## Description 章节提取首行回退

与 metago-lifeform 的关系

| 项目 | 定位 | | --- | --- | | metago-lifeform | 能力引擎本体,沉淀 37 个生命体技能的 SKILL.md 定义、各 IDE 适配器、MCP Server 等核心资产 | | metago-cli | 能力引擎的命令行入口,运行时搜索 metago-lifeform 的技能目录(不作为 npm 依赖),把技能能力暴露给终端用户 |

二者解耦:metago-clipackage.json 不依赖 metago-lifeform,而是通过运行时目录搜索发现技能,从而支持本地克隆、全局安装、IDE 安装等多种技能来源。

与产品矩阵的关系

MetaGO 产品矩阵分三阶段推进:

  1. 第 1 阶段 · 能力内核metago-lifeform 沉淀 37 个生命体技能与多 IDE 适配器,定义"AI 生命体"的能力基线。
  2. 第 2 阶段 · IDE 集成:通过 Trae / Cursor / Claude Code / Codex 等 7 大平台适配器,让能力在 IDE 内被调用。
  3. 第 3 阶段 · 全域触达metago-cli 让能力脱离 IDE,进入终端、CI/CD、脚本、自动化流程,成为任意环境可调用的基础设施。

完整产品矩阵

| 产品 | 类型 | 描述 | |------|------|------| | Lifeform Kit | 核心包 | 37 技能,7 平台支持,跨平台 CLI | | Dev Kit | 垂直包 | 开发者增强包(8 技能) | | MCP Server | 平台工具 | 35 tools + 8 prompts MCP 服务 | | CLI(本产品) | 平台工具 | 跨平台命令行工具(init/doctor/list/show/run) | | Studio | 平台工具 | 可视化技能编排平台 | | Skills SDK | 生态基础设施 | TypeScript 技能开发 SDK | | Skills Hub | 生态基础设施 | 技能市场 | | Certify | 生态基础设施 | 技能认证体系(Gold/Silver) |

文件结构

metago-cli/
├── package.json
├── README.md
├── LICENSE
├── bin/
│   └── metago.js            # CLI 入口(含 shebang)
└── src/
    ├── index.js              # 主命令注册
    ├── commands/
    │   ├── init.js           # init — 一键初始化
    │   ├── doctor.js         # doctor — 健康检查
    │   ├── platforms.js      # platforms — 平台列表
    │   ├── list.js           # list / ls
    │   ├── show.js           # show
    │   ├── run.js            # run
    │   └── version.js        # version
    └── lib/
        ├── platforms.js      # 7 平台配置与自动检测
        ├── installer.js      # 安装核心逻辑
        ├── skills-loader.js  # 技能目录搜索与 SKILL.md 解析
        └── config.js         # 配置管理(~/.metago/)

技术栈

  • Node.js >= 14
  • Commander.js 10.x
  • CommonJS 模块系统
  • 自实现 YAML frontmatter 解析(无第三方 YAML 依赖)

开发约束

  • 不硬编码任何 API token 或凭证
  • 不依赖 metago-lifeform 作为 npm 依赖(运行时搜索技能目录)
  • 代码跨平台兼容(Windows / macOS / Linux)
  • 所有注释与用户输出使用中文
  • package.jsonbin 字段配置为 ./bin/metago.js

License

MIT (c) MetaGO Lightyear

仓库

  • Gitee: https://gitee.com/metago/metago-cli.git
  • GitHub 主仓库:https://github.com/metago-ai/metagolifeform
  • 官方网站:https://metago.life