CCode
Description
**开源多模型 AI 编程 CLI 助手** — 对标 Claude Code 的交互体验,不绑定单一 LLM 提供商。 > **C** = **C**odeYang(作者)、**C**hina(中国开发者出品)、**C**ode(编程助手) []
Installation
claude install-skill https://github.com/1207575273/CCode README
CCode
**开源多模型 AI 编程 CLI 助手** — 对标 Claude Code 的交互体验,不绑定单一 LLM 提供商。
**C** = **C**odeYang(作者)、**C**hina(中国开发者出品)、**C**ode(编程助手)
[](./LICENSE) [](https://www.npmjs.com/package/ccode-cli)
项目背景
改名说明
本项目原名 **ZCli / ZCode**,于 2026 年 3 月更名为 **CCode**。
更名原因:
- undefined
如果你之前使用过旧版,只需将 `~/.zcli/` 重命名为 `~/.ccode/` 即可平滑迁移。
为什么做这个
Claude Code 是目前最好的 AI 编程 CLI 工具,但它有一个硬约束:**只能用 Claude 模型**。对于需要在不同场景下切换模型的开发者来说,这意味着要在多个工具之间反复切换,丢失上下文和工作流的连贯性。
CCode 的目标是:**让开发者在终端中自由选择 Claude / GPT / Gemini / GLM / DeepSeek / 本地 Ollama 等任意模型,获得一致的 AI 辅助编码体验。** 同时完全兼容 Claude Code 的生态(CLAUDE.md 指令文件、MCP 协议、插件系统)。
核心理念
- undefined
当前状态
CCode 处于活跃开发阶段(v0.0.1),核心 Agent 能力已稳定,日常用于驱动自身的开发(self-hosting)。
主要特性
| 特性 | 说明 |
|---|---|
| 多模型支持 | Claude / OpenAI / Gemini / GLM / DeepSeek / Ollama,运行时切换 |
| 内置工具集 | read / write / edit / glob / grep / bash + 子 Agent 派发 |
| MCP 支持 | stdio / SSE / streamable-http,动态注册外部工具 |
| Skills 系统 | 自研 Skill 体系 + 兼容 Claude Code 插件生态(superpowers 等) |
| 对话持久化 | JSONL 会话文件 + --resume 恢复 + /fork 分支 |
| Token 计量 | 四维 token 记录 + 多币种计价 + /usage 实时统计 |
| 指令文件 | CCODE.md / CLAUDE.md 多层级注入,完全兼容 Claude Code |
目录结构
claude_cli_z01/
docs/ # 需求与设计文档
cCli/ # 项目代码
src/ # 核心源码(Agent Loop / Tools / Providers / UI)
tests/ # 测试
环境要求
| 工具 | 版本 |
|---|---|
| Node.js | >= 20 |
| pnpm | >= 9 |
推荐使用 nvm 管理 Node.js 版本:
nvm install 20 nvm use 20
快速开始
1. 安装依赖
cd cCli
pnpm install
2. 开发模式启动(推荐)
pnpm dev
直接运行 TypeScript 源码,无需构建,修改代码后重启即可生效。
3. 构建后运行
pnpm build
node dist/bin/ccode.js
界面操作
| 操作 | 说明 |
|---|---|
| 直接打字 | 在底部输入框输入消息 |
Enter |
发送消息 |
Escape |
中断当前回复 |
Ctrl+C |
双击退出 |
斜杠指令
| 指令 | 说明 |
|---|---|
/help |
查看所有指令 |
/model |
交互式切换模型 |
/model |
直接切换到指定模型 |
/clear |
清空当前对话 |
/resume |
恢复历史会话 |
/fork |
从某条消息分支对话 |
/usage |
查看 Token 用量和费用 |
/mcp |
查看 MCP Server 连接状态 |
/skills |
列出可用 Skill |
/gc |
清理过期会话和用量记录 |
/gc --days 0 |
清理全部会话(保留 0 天) |
/gc --dry-run |
预览将清理的数据量 |
其他命令
# 运行测试
pnpm test
# 监听模式测试(开发时)
pnpm test:watch
# TypeScript 类型检查
pnpm typecheck
# 构建
pnpm build
配置
CCode 的配置文件位于 `~/.ccode/` 目录下,首次启动时自动创建。
config.json — 主配置
路径:`~/.ccode/config.json`
{
"defaultProvider": "anthrop
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, a
AI community Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI community Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui).
AI community TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构
AI community mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI community Multica
Make humans and AI agents work as one team — open-source and self-hostable.
AI community