Blade 是一个面向真实工程任务的 AI 编程助手。CLI、Web、Headless 和 ACP 共享同一套 Session Runtime、工具、权限与持久化语义。
- CLI 模式: 在终端中使用,支持 Markdown 渲染和语法高亮
- Web UI 模式: 在浏览器中使用,完整的图形界面体验
- Headless 模式: 为脚本、CI 和自动化提供稳定 JSONL 事件
- ACP 模式: 接入支持 Agent Client Protocol 的编辑器和宿主
blade # CLI 模式
blade web # Web UI 模式
blade serve # 无头 HTTP 服务器
blade --headless --output-format jsonl "分析项目" # Headless AgentProvider、模型能力、上下文窗口和价格均从内置目录动态读取,不在文档中维护容易过期的 静态模型表。官方 Provider、云平台和自定义兼容渠道使用同一配置流程。
3 步配置向导:选择 Provider → 输入 API Key → 选择模型
- 敏感操作前请求确认
- 支持 glob 模式的权限规则
- 四种权限模式(default、autoEdit、plan、yolo)
- 文件操作: 读取、写入、编辑、搜索
- 代码分析: 语法检查、类型检查、测试运行
- 终端执行: 安全的命令执行环境
- Git 集成: 版本控制操作
- 网络搜索: 多提供商自动故障转移
- Plan 模式: 先规划后执行
- Subagents: 并行任务处理
支持 Model Context Protocol,可连接外部工具和服务。
# 安装
npm install -g blade-code
# CLI 模式
blade
# Web UI 模式
blade web
# 从 Provider Catalog 添加模型
# 在 Blade 中输入: /model add- 配置系统 - 模型与凭证配置
- 权限控制
- Workspace Trust
- 主题配置
- CLI 命令
- 工具列表
- Atomic ApplyPatch
- Native Read-Only Code Review
- Schema-Constrained Structured Output
- Durable Session Archive
- Portable Session Markdown Export
- Durable Pending Interactions
- Session Reasoning Effort
- Session Permission Mode
- Session Service Tier
- Session Response Verbosity
- Session Communication Style
- Trusted Custom Output Styles
- Trusted Contextual Project Rules
- Session User Shell Command
- TUI Terminal Input
- Fresh Independent Verification
- Host-Authoritative Goal Completion Verification
- 工具并发模型
- Session-scoped LSP
- MCP Elicitation
- MCP Roots 与 Sampling
- MCP Tool Call 生命周期
- MCP Tool Result 安全边界
- MCP Logging 与诊断
- MCP Server Instructions
- MCP Completion
- MCP Async Tasks
- MCP OAuth 生命周期
- MCP 动态工具目录
- MCP Resources、Prompts 与订阅
- MCP 故障恢复
- MCP Session 隔离
- Workspace Agent 资源隔离
- Workspace Plugin 生命周期
- Workspace 模型与 Provider 隔离
- Workspace Runtime 设置与环境隔离
- Session Runtime Residency
- 模型传输恢复
- Surface 输出背压与排序
- Runtime 协调关闭
运行 /model add 可查看当前安装版本支持的 Provider 和模型。自定义 OpenAI 或
Anthropic 兼容 endpoint 可配置为独立渠道,凭证与其他渠道隔离存储。
MIT License