轻量 Coding Agent — 从 SylastraClaws 分出的精简版本。
提供一个顺手的 coding agent 工具,只做三件事:
- 调用 LLM 理解需求
- 读写文件(通过 betools MCP)
- 执行命令
从 183K 行原始代码精简而来。
main.go # 入口:--first-run / --fast-run / agent
cmd/firstrun/main.go # --first-run 命令(独立入口)
cmd/fastrun/main.go # --fast-run 命令(独立入口)
internal/
├── helpers.go # ConfigPath、LoadConfig
├── firstrun/firstrun.go # --first-run: 交互式 API key 配置
└── fastrun/
├── fastrun.go # --fast-run: 从已有工具导入配置
├── kimi.go # Kimi Code CLI 配置读取
├── codex.go # Codex CLI 配置读取
├── claude.go # Claude CLI 配置读取
└── opencode.go # OpenCode 配置读取
pkg/
├── config/config.go # 配置系统(Config、ModelConfig、SecureString)
├── logger/ # 日志(zerolog)
├── providers/
│ ├── types.go # LLMProvider 接口
│ ├── protocoltypes/types.go # LLM 通信数据类型
│ ├── common/common.go # HTTP 客户端、消息序列化
│ ├── messageutil/ # 消息过滤工具
│ ├── openai_compat/ # OpenAI 兼容协议 LLM 调用
│ └── factory_provider.go # 提供者工厂
├── bus/ # 消息总线(用于通道通信)
├── channels/interfaces.go # 通道接口定义
└── commands/ # 命令定义
# 配置 API Key
go run . --first-run "sk-xxx,gpt-4o"
# 或从已有工具导入
go run . --fast-run kimi
go run . --fast-run codex
# 启动 agent(开发中)
go run . agentMIT — 原始项目 PicoClaw 的代码保留其贡献者版权。