Skip to content

Latest commit

 

History

History
104 lines (77 loc) · 3.54 KB

File metadata and controls

104 lines (77 loc) · 3.54 KB

tcarust

终端里的 AI 编码助手。快速。强大。Rust 编写。

tcarust

Rust Anthropic Dify OpenAI

📖 English

TypeScript Version


✨ 什么是 tcarust?

基于终端的 AI 编码助手,通过自然语言对话帮你读写代码、执行命令、分析和解决复杂问题。

🚀 功能特性

  • 🔌 多 LLM 支持 — OpenAI、Anthropic、Google AI、Azure OpenAI、自定义端点
  • 🛠️ 内置工具 — Bash 执行、文件编辑、Glob 搜索、JSON 编辑、代码知识图谱 (tree-sitter)
  • 🤖 多智能体 — Coordinator、Coder、Reader、Reviewer 协同处理复杂任务
  • 🧠 思维模型 — 原生支持 Claude thinking 扩展推理
  • 💾 智能记忆 — 对话智能压缩,不超出 token 限制
  • 技能系统/slash 命令:git commit、深度研究、网页抓取、PDF 分析
  • 🖥️ 交互式 TUI — 语法高亮、文件搜索、丰富终端界面

📦 安装

git clone https://github.com/21pounder/terminal-coding-agent.git
cd terminal-coding-agent
cargo install --path cli

前置要求: Rust 1.75+ 及任一 LLM 提供商的 API Key

⚙️ 配置

在项目根目录创建 tca.json 或全局 ~/.config/tca/config.json

{
  "protocol": "anthropic",
  "api_key": "your-api-key",
  "base_url": "https://api.anthropic.com",
  "model": "claude-sonnet-4-20250514"
}

也可以用环境变量:

export ANTHROPIC_API_KEY=your-key

支持:openai · anthropic · google_ai · azure_openai

🎯 使用

tcarust
> 修复 src/auth.rs 中 token 没有刷新的 bug
> 给注册表单加上输入验证
> 解释路由系统是怎么工作的

📁 项目结构

core/           # 核心库 — 智能体循环、LLM 客户端、工具系统
├── agent/      #   智能体核心、提示词、配置、对话管理
├── agents/     #   多智能体(协调者、编码者、阅读者、审查者)
├── llm/        #   LLM 客户端(OpenAI、Anthropic)
└── tools/      #   内置工具定义

cli/            # CLI — TUI、交互模式、工具实现
├── interactive/#   终端 UI 组件
├── tools/      #   bash、edit、glob、json_edit
└── config/     #   配置加载器

📄 许可证

MIT OR Apache-2.0