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

@ia-ccun/code-agent-cli

v0.0.34

Published

AI Coding Agent CLI - 基于OpenClaw🦞底层Agent原理实现的的编码智能体(供学习使用)。

Readme

@ia-ccun/code-agent-cli

基于OpenClaw 🦞底层Agent架构实现的智能编码智能体,具备通用技能Skills扩展能力,实现高效、智能的代码开发体验。(供学习使用)

核心工作流

  • 遵循“任务拆解→深度思考→执行行动→复盘反思”的闭环逻辑,确保每一步操作精准可靠。

立即安装

  • 欢迎下载体验,开启智能编码新范式。
# 全局安装
npm install -g @ia-ccun/code-agent-cli

# 或使用 npx 直接运行
npx @ia-ccun/code-agent-cli

快速开始

# 启动交互式会话 (两种命令均可使用)
aicode
aicode-cli

# 查看帮助
aicode --help
aicode-cli --help

# 指定配置目录
aicode --config /path/to/config
aicode-cli --config /path/to/config

# 指定模型
aicode --model openai/gpt-4o
aicode-cli --model openai/gpt-4o

# 非交互模式
aicode -p "你的指令"
aicode-cli -p "你的指令"

配置

配置文件位于 ~/.aicode-cli/

config.json

{
  "name": "aicode-cli",
  "banner": ["Code is poetry", "Build with pride"],
  "themeColor": "#49bccf",
  "configDir": ".aicode-cli"
}

banner 配置说明:

| 值 | 说明 | |---|---| | "" | 禁用 banner | | "__default__" | 使用 ASCII 艺术 banner | | "单条标语" | 显示单条自定义标语 | | ["标语1", "标语2"] | 每次启动随机显示一条标语 |

示例:

// 禁用 banner
"banner": ""

// 使用 ASCII banner
"banner": "__default__"

// 单条标语
"banner": "Hello, World!"

// 多条标语(随机显示)
"banner": [
  "Code is poetry",
  "Build with pride",
  "Ideas become reality"
]

models.json

编辑 ~/.aicode-cli/agent/models.json 配置 LLM Provider:

{
  "providers": {
    "openai": {
      "name": "OpenAI",
      "baseUrl": "https://api.openai.com/v1",
      "api": "openai-completions",
      "apiKey": "YOUR_API_KEY_HERE",
      "models": [
        {
          "id": "gpt-4o",
          "name": "GPT-4o",
          "contextWindow": 128000,
          "maxTokens": 16384,
          "reasoning": false,
          "cost": { "input": 2.5, "output": 10 }
        },
        {
          "id": "gpt-4o-mini",
          "name": "GPT-4o Mini",
          "contextWindow": 128000,
          "maxTokens": 16384,
          "reasoning": false,
          "cost": { "input": 0.075, "output": 0.3 }
        }
      ]
    },
    "anthropic": {
      "name": "Anthropic",
      "baseUrl": "https://api.anthropic.com",
      "api": "anthropic-messages",
      "apiKey": "YOUR_API_KEY_HERE",
      "models": [
        {
          "id": "claude-sonnet-4-20250514",
          "name": "Claude Sonnet 4",
          "contextWindow": 200000,
          "maxTokens": 8192,
          "reasoning": true,
          "cost": { "input": 3, "output": 15 }
        }
      ]
    }
  }
}

字段说明: | 字段 | 说明 | |------|------| | api | API 类型:openai-completionsanthropic-messages | | baseUrl | API 端点地址 | | apiKey | API 密钥 | | models[].id | 模型 ID | | models[].contextWindow | 上下文窗口大小 | | models[].maxTokens | 最大输出 tokens | | models[].reasoning | 是否为推理模型 | | models[].cost | 价格(美元/百万 tokens) |

环境变量

| 变量 | 说明 | |------|------| | AICODE_CLI_CONFIG_DIR | 自定义配置目录 |

命令行参数

# 两种命令均可使用
aicode                      # 启动交互式会话
aicode-cli                  # 启动交互式会话

aicode --help              # 查看帮助
aicode-cli --help          # 查看帮助

aicode --config /path      # 指定配置目录
aicode-cli --config /path  # 指定配置目录

aicode --model provider/model # 指定模型
aicode-cli --model provider/model # 指定模型

aicode -p "prompt"         # 非交互模式
aicode-cli -p "prompt"    # 非交互模式

aicode --list-models       # 列出可用模型
aicode-cli --list-models   # 列出可用模型

快捷键

| 快捷键 | 功能 | |--------|------| | Ctrl+C | 清空编辑器 | | Ctrl+L | 切换模型 | | Escape | 取消/中止 |

预置 Skills

内置技能位于 config/agent/skills/(打包在 npm 包中)

| Skill | 说明 | |-------|------| | /skill:code-review | 代码审查 - 执行全面的代码审查,检查代码质量、安全性、性能和最佳实践 | | /skill:commit | Git 提交 - 分析代码变更并生成规范的 Git commit 消息 | | /skill:pr | PR 描述 - 分析代码变更并生成规范的 Pull Request 描述 | | /skill:refactor | 代码重构 - 对代码进行重构,提高可读性和可维护性 | | /skill:unit-test | 单元测试 - 为选定的代码文件生成单元测试 | | /skill:ui-ux-pro-max | UI/UX 设计 - 专业 UI/UX 设计辅助,支持 50+ 样式、21+ 配色方案 | | /skill:csv-data-summarizer | CSV 数据分析 - 分析 CSV 文件,生成统计摘要和可视化图表 | | /skill:find-skills | 技能发现 - 查找和安装扩展技能 | | /skill:frontend-design | 前端设计 - 创建生产级前端界面 | | /skill:skill-creator | 技能创建 - 辅助创建自定义技能 | | /skill:hello | 示例技能 - 自定义技能示例 |

使用 Skill

在对话中直接使用:

/skill:code-review
/skill:commit --emoji
/skill:ui-ux-pro-max design a login page

创建自定义 Skill

~/.aicode-cli/skills/ 目录下创建 .md 文件:

# My Skill

## 描述
技能说明

## 触发方式
/skill:my-skill

## 执行步骤
1. 步骤一
2. 步骤二

预置 Prompts

内置 Prompt 模板位于 config/agent/prompts/(打包在 npm 包中)

| Prompt | 说明 | |--------|------| | /git-commit | Git 提交 - 生成 Conventional Commits 风格的提交信息 | | /git-rollback | Git 回滚 - 安全回滚 Git 操作 | | /git-worktree | Git Worktree - 管理 Git Worktree | | /bmad-init | 项目初始化 - 初始化新项目 | | /feat | 功能开发 - 辅助功能开发 | | /workflow | 工作流 - 执行复杂工作流 |

项目结构

@ia-ccun/code-agent-cli/
├── src/                    # TypeScript 源码
│   ├── index.ts            # 入口文件
│   ├── config.ts           # 配置定义
│   ├── config-loader.ts    # 配置加载器
│   └── banner.ts           # 启动 Banner
├── bin/
│   └── cli.js              # CLI 入口
├── config/
│   └── agent/              # 预置配置
│       ├── prompts/        # 预置 Prompts
│       └── skills/         # 预置 Skills
├── scripts/
│   └── postinstall.js      # 安装脚本
└── package.json

文档

更多功能请参考 pi-coding-agent 文档

License

MIT