About Blade Code
Blade Code is an MCP server published by echoVic in the Developer Tools category: aI-powered CLI coding agent with 20+ built-in tools, MCP support, and multi-model providers.
The repository has 180 stars and 29 forks, with the last commit 4 days ago. Recent commit activity is the strongest signal that reported issues will get attention.
Install
git clone https://github.com/echoVic/blade-codeThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Blade Code
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 7 hours ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
🗡️ Blade Code
新一代 AI 编程助手 — CLI + Web + Headless
English | 简体中文
📸 界面预览
✨ 核心特性
- 🤖 多模型统一运行时 — 基于 pi-ai 统一 38+ Provider(OpenAI/Anthropic/DeepSeek/Google/Bedrock…),模型元数据动态获取
- 🧠 自动记忆 — 跨会话持久化项目知识,自动学习构建命令、代码模式、调试洞察
- 🌐 三种运行模式 — CLI 终端 / Web UI / Headless JSONL,场景灵活切换
- 📊 多项目任务看板 — 绑定项目、自动派发、阻塞处理、验收归档
- 🛠️ 20+ 内置工具 — 文件编辑、代码搜索、Shell 执行、Git 操作、Web 抓取等
- 🌍 原生浏览器自动化 — Session 隔离的 Chromium、ARIA 快照与安全 ref 交互; Web 会自动展示 Agent 页面与鼠标操作,同时支持 CLI、Headless 和 ACP
- 📋 结构化工作流 — Task 委托、Goal 模式、Spec/Plan、Subagent 与 Agent Teams 编排
- 🔗 开放扩展 — MCP 协议、插件系统、Skills、Hooks
- 🔒 安全可控 — 四级权限模式(default/autoEdit/plan/yolo)+ 工具白/黑名单
- 💰 成本可观测 — 每轮 token、缓存读写与预估费用随会话持久化,中断或重开后仍可追溯;
/cost实时查看、Web 日志时间轴逐轮回看、Headless JSONL 输出token_usage,缓存失效自动归因 - 🎨 现代 UI — React + Ink 终端 / React + Vite Web,支持 Thinking 模式
🚀 快速开始
# 快速体验(需要 Node.js >= 22.19.0)
npx blade-code
# 全局安装
npm install -g blade-code
# 可选:安装 Agent Browser 所需的固定版本 Chromium
blade browser install
blade browser status
# 启动 CLI
blade
# 启动 Web UI
blade web
# Headless 模式(CI / sandbox)
blade --headless --output-format jsonl "分析这个仓库"
首次启动会自动进入模型配置向导:选择 Provider → 选择模型 → 输入 API Key。
⚙️ 配置
配置文件:~/.blade/config.json(全局)或 .blade/config.json(项目级)。
{
"currentModelId": "primary",
"models": [
{
"id": "primary",
"provider": "deepseek",
"model": "deepseek-v4-pro"
}
]
}
- 凭证独立存储:
~/.blade/auth.json(权限0600),不进入版本控制 - 模型元数据(contextWindow、maxTokens、pricing)自动从 pi-ai catalog 获取,无需手动填写
- Provider 的 Base URL 仅在使用自定义代理时才需在
overrides.baseUrl中指定
🧰 命令速览
| 命令 | 说明 |
|---|---|
blade |
交互式 CLI |
blade web |
Web UI(浏览器) |
blade serve |
无头 HTTP 服务器 |
blade browser install |
安装原生 Browser Tool 所需的固定版本 Chromium |
blade browser status |
检查 Playwright 与 Chromium 运行状态 |
blade mcp |
管理 MCP 服务器 |
blade doctor |
环境诊断 |
blade --headless "..." |
完整 agent loop(非交互) |
blade --print "..." |
单轮打印模式 |
交互式命令(会话内)
| 命令 | 说明 |
|---|---|
/model add |
添加新模型 |
/model switch |
切换当前模型 |
/cost |
查看当前会话费用 |
/compact |
手动压缩上下文 |
/btw "..." |
询问不写入主会话的旁路问题 |
/memory list |
列出记忆文件 |
/tasks |
查看任务列表 |
/goal "..." |
启动 Goal 模式 |
🏗️ 架构概览
Blade/
├── packages/cli/ # blade-code 核心(npm 包)
│ ├── src/
│ │ ├── agent/ # 无状态 Agent 核心 + 执行循环
│ │ ├── services/pi/ # pi-ai 运行时适配层
│ │ ├── tools/ # 工具系统(TypeBox schema)
│ │ ├── server/ # Web 服务器(Hono)
│ │ ├── context/ # 上下文压缩与 token 管理
│ │ ├── config/ # 配置系统
│ │ ├── store/ # 状态管理(Zustand)
│ │ ├── ui/ # 终端 UI(React + Ink)
│ │ └── schema/ # TypeBox runtime 封装
│ └── web/ # Web UI(React + Vite)
└── docs/ # 用户文档(Docsify)
📖 文档
🌐 在浏览器里使用 Blade
Pilion Browser 是一个作为 ACP 客户端的桌面浏览器。在它的 Agent 面板里选择 Blade:Pilion 会启动 blade --acp,转发你配置的模型 API Key(DeepSeek、Anthropic、OpenAI、Gemini、xAI、OpenRouter 等),并把自己的标签页作为 MCP 工具(browser_snapshot、browser_screenshot、导航、点击、输入)交给 Blade,全程带操作前审批与人工接管。首次会按需安装 blade-code(需要 Node.js ≥ 22.19.0)。macOS、Windows、Linux 的安装包见 Pilion Releases。
🤝 贡献
git clone https://github.com/echoVic/blade-code.git
cd blade-code && bun install && bun run dev
💬 交流
⭐ Star History
📄 许可证
README fetched from the repository 7 hours ago. The original is authoritative.