弧
 ](https://github.com/Ashutosh0x/arc-cli/releases)      
     
一个对代码库进行推理的本地代理CLI。一个二进制。无运行时。离线工作。
______________________________________________________________________
安装
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/Ashutosh0x/arc-cli/main/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/Ashutosh0x/arc-cli/main/install.ps1 | iex
# From source
cargo install --git https://github.com/Ashutosh0x/arc-cli它做什么
ARC是一个终端原生AI编码代理。你把它指向一个代码库,描述你想要什么,它就会自主地计划、编写和验证更改。
它连接到Claude、Gemini、OpenAI、Groq、xAI Grok或Ollama(完全离线)。你选择提供者。切换到live with /provider groq如果一个失败了,它就会转移到下一个。
arc chat # start a session
/plan "add OAuth2 login" # generate a plan, review it, accept or reject
/provider groq # switch to Groq (Llama 3.3 70B)
/model grok-4-1-fast-non-reasoning # switch model
/checkpoint # snapshot current state
/rewind 3 # undo to checkpoint 3
/compact # compress context window
arc review # PR critique via 6 specialized agents为什么不选择Claude Code或Gemini CLI?
| ARC | 克劳德代码 | Gemini CLI | |
|---|---|---|---|
| 用 | Rust | Node.js | Node.js编写 |
| 冷启动 | \` | 调用图——谁调用什么,BFS深度1-5 | |
arc graph architecture | 架构概述:层、集群、热点 | ||
arc graph impact | 地图git diff→ 受影响的符号+风险评分 | ||
arc graph query | 执行类似Cypher的图形查询 | ||
/plan [task] | 生成并审查修改计划 | ||
/provider [name] | 交换机提供商直播(anthropic、groq、xai、openai) | ||
/model [name] | 切换模型(例如grok-4-1快速推理) | ||
/checkpoint | 保存会话状态 | ||
/rewind [id] | 还原以前的检查点 | ||
/compact | 压缩上下文窗口 | ||
/status | 显示当前提供程序、型号、邮件计数 | ||
/memory [k] [v] | 持久键值存储 | ||
/fork [name] | 将对话划分为不同的部分 | ||
/security-review | 扫描差异以查找漏洞模式 | ||
/copy | 选取并复制代码块 |
代码智能
ARC与 代码库存储器mcp 通过持久知识图提供结构化代码智能。
arc graph index # index your project (seconds for typical repos)
arc graph search ".*Handler.*" # find all handler functions
arc graph trace authenticate --direction inbound # who calls authenticate()?
arc graph architecture # languages, packages, routes, hotspots
arc graph impact # what breaks from your uncommitted changes?
arc graph query 'MATCH (f:Function)-[:CALLS]->(g) WHERE f.name = "main" RETURN g.name'| 度量 | 无图 | 有图 |
|---|---|---|
| 每个查询的上下文标记 | ~412000 | ~3400 |
| 符号查找 | 50-500ms(grep) | \<1ms |
| 解析的语言 | 5 | 64 |
| 调用图 | 否 | 是,BFS深度1-5 |
| 死码检测 | 否 | 是,~150ms |
| 会话内存 | 重置 | 持久化(SQLite) |
Diff评论键绑定
当ARC提出文件更改时,您可以交互式地查看它们:
| 关键 | 行动 |
|---|---|
y / Enter | 接受此更改 |
n / Esc | 拒绝此更改 |
a | 接受所有剩余 |
d | 拒绝所有剩余的 |
e | 打开 $EDITOR |
j / k | 滚动浏览较大的差异 |
文档
贡献
看 贡献.md代码库强制执行 #![forbid(unsafe_code)], cargo fmt,以及 cargo clippy 每一个PR。
许可证
麻省理工学院
