AI编码器
快速、轻量级的人工智能辅助开发,可在任何地方运行
AI Coder是一个速度极快、资源高效的CLI,用于AI驱动的编码,将GPT模型的强大功能直接带到您的终端。考虑到性能和简单性,它在从Raspberry Pi到高端工作站的所有设备上都能完美运行。
✨ 为什么是AI程序员?
🚀 快速燃烧
- 在大多数计算机上启动时间不到一秒(在低端计算机上约为2秒)
- 在Raspberry Pi 3上使用\ Help me refactor this Python function
[PLAN] AI: I'll analyze the function and suggest improvements...
### 规划模式(安全探索)
/plan toggle
*** Planning mode enabled (read-only) [PLAN] > ls -la Planning mode: Read-only tools only
### 文件操作
Edit the auth.py file to add JWT validation
└─ AI wants to call: edit_file File: src/auth.py Changes: - Add validate_jwt_token function - Update authenticate method
Approve? [a]llow once [s]ession [d]eny
## 🛠️ 配置
### 环境变量
export OPENAI_BASE_URL="http://localhost:4999" export OPENAI_API_KEY="your-api-key" export OPENAI_MODEL="gpt-5" # Default: gpt-5-nano export DEBUG=1 # Enable debug mode export YOLO_MODE=1 # Bypass approvals
### 自定义工具
// mcp_tools.json { "tools": [ { "name": "deploy_app", "command": "kubectl", "args": ["apply", "-f", "manifest.yaml"], "description": "Deploy application to Kubernetes" } ] }
## 🎨 主题和定制
### 可用主题
- **露娜** -优雅的紫色主题
- **海洋** -平静的蓝色调
- **森林** -天然绿色调色板
- **日落** -暖橙色/红色日落
- **原创** -经典终端颜色
### 切换主题
/theme ocean
✅ Applied theme: ocean
## 🔧 发展
### 从源头构建
git clone https://github.com/elblah/dt-aicoder cd dt-aicoder uv tool install . aicoder
### 运行测试
Comprehensive test suite
./run-tests.sh
## 📚 文档
- **[配置指南](docs/configuration.md)** -详细的设置选项
- **[插件开发](docs/plugins/README.md)** -构建自定义扩展
- **[MCP工具](docs/mcp/configuration_guide.md)** -外部工具集成
- **[计划模式](docs/planning_mode.md)** -安全勘探功能
## 🏗️ 建筑
AI Coder采用模块化、可扩展的架构构建:
aicoder/ ├── core/ # Application core ├── tool_manager/ # Tool execution & approval ├── plugin_system/ # Extensible plugin framework ├── streaming/ # Real-time response handling └── themes/ # Visual customization
## 🔌 插件系统-扩展您的工作流程
AI Coder的模块化架构使构建和共享自定义插件变得容易。无论您是想添加新工具、与外部服务集成还是定制用户体验,插件系统都能满足您的需求。
### 🚀 简易插件开发
只需几行代码即可创建强大的插件:
Example: Custom notification plugin
class NotifyPlugin: def on_ai_response(self, message): # Send desktop notifications for AI responses subprocess.run(['notify-send', 'AI Response', message[:100]])
def on_command_complete(self, command, result): # Notify when long-running commands finish if command.duration > 60: subprocess.run(['notify-send', 'Command Complete', command.name])
### 📦 可用插件
- **📋 计划插件** -一体化规划模式 `/plan toggle` 视觉任务跟踪
- **🎨 主题插件** -动态色彩主题(月亮、海洋、森林、日落)
- **🔔 通知插件** -AI响应和命令完成的桌面通知
- **🔤 Char筛选器插件** -内容过滤和净化
- **更多。..**
### 🔧 高级功能
- **工具集成**:添加AI可以调用的自定义工具
- **主题支持**:创建自定义配色方案
- **事件挂钩**:响应AI响应、命令完成、错误
- **配置**:每个插件配置文件
### 📚 插件资源
- **[插件开发指南](docs/plugins/README.md)** -完整的开发教程
- **[插件示例](docs/plugins/examples/)** -即用型插件模板
- **[API 参考](docs/plugins/api.md)** -插件系统API文档
### 🌟 社区插件
与社区分享您的插件!提交一个pull请求,将您的插件添加到官方存储库,或独立共享。
**为什么是插件?**
- **定制**:根据您的工作流程定制AI Coder
- **整合**:连接您最喜欢的工具和服务
- **自动化**:自动化重复性任务和工作流程
- **生产力**:添加快捷方式和高级用户功能
在几分钟内开始使用我们的 [插件开发指南](docs/plugins/README.md)!
## 🌟 演出
|平台| CPU使用率|内存|启动时间|
|----------|-----------|---------|--------------|
|树莓派3B |\<5%|~25MB|~1s|
|现代笔记本电脑|\<1%|~30MB|\<1s|
|Docker容器|\<2%|~30MB|~1s|
## 许可证
Apache 2.0