>_allthecodes
LoginGitHub下载 Beta

核心引擎

allthecodes

参考 Claude Code 的交互模型、工具系统和 agent 工作流,用 Rust 重新构建的高性能 AI 编程助手。不是逐文件翻译,而是重新整理工程结构、运行时边界、IPC、Rust TUI、权限模型和工具系统。

Rusttokioratatuiaxumtree-sitterreqwest
架构对比

Rust vs TypeScript

allthecodes 与 TypeScript 原版的核心架构差异

维度TypeScript 原版allthecodes (Rust)
运行时Node.js / Bun无(静态二进制)
启动npx @anthropic-ai/claude-code./allthecodes
TUI 框架React/Ink(虚拟 DOM)ratatui + crossterm(即时渲染)
模块系统npm + TypeScript 模块Cargo workspace + 40 crate
并发模型事件循环 + Promisetokio 多线程 async/await
内存安全运行时 GC编译时所有权检查
分发方式npm 包 (npx)单一静态二进制
工具系统

50+ 内置工具

覆盖文件操作、Shell 执行、Web 访问、Agent 编排、MCP 集成、桌面控制等完整能力

文件工具

ReadWriteEditGlobGrep

Shell 工具

BashBashInteractive

Web 工具

WebFetchWebSearch

Agent 工具

AgentAgentDelegateTeamSpawnSendMessage

MCP 工具

由 MCP 服务器动态暴露

Computer Use

ScreenshotMouseMoveTypeKeyDrag

查询工具

AskUserSendUserMessage

规划工具

PlanModeBrief
运行模式

六种模式,灵活切换

从交互式 TUI 到无头 IPC,适应不同使用场景

模式CLI 标志典型场景
TUI默认交互式开发,推荐日常使用
Print-p "prompt"单次问答,管道集成
JSON--output-format json程序化调用,SDK 集成
Headless--headless自定义前端,自动化测试
Daemon--daemon后台常驻,团队协作
Web--web --web-port 3001浏览器访问,远程开发
权限系统

三重权限保障

工具级 + 沙箱级 + Auto Mode 安全分类器,确保每一次操作都经过充分决策

1
validate_input()
2
check_permissions()
3
Sandbox 策略
4
执行

Auto

安全分类器实时评估,高风险操作提示确认

ACD

始终提示用户确认每次工具调用

Bypass

自动放行所有操作(受信环境)

模型接入

6 大 Provider

统一的流式 API 客户端,支持所有主流 AI 模型提供商

Provider认证方式特殊功能
Anthropic DirectANTHROPIC_API_KEYPrompt caching, Thinking
AWS BedrockAWS SigV4IAM 认证
Google VertexGCP 服务账号区域部署
OpenAI 兼容OPENAI_API_KEY通用兼容层
AzureAZURE_API_KEYAzure 部署
OpenAI CodexOPENAI_CODEX_AUTH_TOKENCodex CLI 兼容
Crate 地图

40 个 Crate

按职责分组的 Rust workspace 模块

应用层

allthecodesallthecodes-startup

核心引擎

allthecodes-engineallthecodes-query

工具系统

allthecodes-toolsallthecodes-mcpallthecodes-computer-useallthecodes-safetyallthecodes-sandbox

API 通信

allthecodes-apiallthecodes-modelsallthecodes-gateway

基础设施

allthecodes-configallthecodes-authallthecodes-typesallthecodes-utilsallthecodes-keybindingsallthecodes-observabilityallthecodes-langfuse

会话与技能

allthecodes-sessionallthecodes-skillsallthecodes-servicesallthecodes-compact

扩展

allthecodes-pluginsallthecodes-browserallthecodes-lsp-serviceallthecodes-tasksallthecodes-teamsallthecodes-shell-commandallthecodes-voice

IPC & 守护

allthecodes-ipcallthecodes-ipc-protocolallthecodes-ipc-transportallthecodes-ipc-adaptersallthecodes-ipc-clientallthecodes-daemonallthecodes-weballthecodes-worktreeallthecodes-bootstrap
构建

从源码构建

确保已安装 Rust toolchain

bash
cargo --version
cargo build --workspace --release
target/release/allthecodes --version
target/release/allthecodes