Skip to content

Commit 62fdaef

Browse files
committed
update README
1 parent e3af401 commit 62fdaef

2 files changed

Lines changed: 120 additions & 3 deletions

File tree

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Codebot
22

3+
[English](README.md) | [中文](README_zh.md)
4+
35
Terminal-native AI coding agent. Built on [agentcore](https://github.com/voocel/agentcore), a minimal agent execution kernel.
46

57
```
@@ -23,9 +25,12 @@ Each layer has one job. No layer knows about the layers above it.
2325

2426
**Agent**
2527
- Streaming responses with extended thinking (off → xhigh)
26-
- Tool execution: read, write, edit, bash, grep, find, ls
28+
- Tool execution: read, write, edit, bash, grep, find, ls, web_search, web_fetch
29+
- Task management: task_create, task_get, task_update, task_list (SubAgent coordination)
30+
- SubAgent delegation with parallel/chain execution
2731
- Automatic context compaction when window fills up
2832
- Multi-provider: Anthropic, OpenAI, Gemini
33+
- MCP (Model Context Protocol) server integration
2934

3035
**Sessions**
3136
- Append-only JSONL persistence — crash-safe, human-readable
@@ -40,6 +45,10 @@ Each layer has one job. No layer knows about the layers above it.
4045

4146
**Interface**
4247
- Interactive TUI with real-time streaming and markdown rendering
48+
- Plan mode: agent proposes changes, user reviews and approves
49+
- AskUser: structured multi-choice questions from agent to user
50+
- Image paste (Ctrl+V) with selection (↑) and deletion (Delete)
51+
- Task progress display: progress bar + status icons above input
4352
- Non-interactive print mode for pipes and scripts (`-p`)
4453
- Slash commands: `/model`, `/compact`, `/plan`, `/resume`, `/copy`, ...
4554

@@ -77,11 +86,17 @@ codebot -policy-profile strict
7786
3. **Convention over configuration** — sensible defaults, explicit overrides
7887
4. **Secure by default** — balanced policy, audit trail, workspace boundaries
7988

89+
## Configuration
90+
91+
Config files: `~/.codebot/settings.json` (global) or `.codebot/settings.json` (project-level, takes precedence).
92+
93+
All fields are optional. See [settings.example.jsonc](settings.example.jsonc) for the full reference with comments.
94+
8095
## Requirements
8196

8297
- Go 1.25+
83-
- API key for at least one provider (`ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY`)
98+
- API key for at least one provider
8499

85100
## License
86101

87-
MIT
102+
MIT

README_zh.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Codebot
2+
3+
[English](README.md) | [中文](README_zh.md)
4+
5+
终端原生 AI 编程助手。基于 [agentcore](https://github.com/voocel/agentcore) 构建,一个极简的 Agent 执行内核。
6+
7+
```
8+
╭──────────────────────────────────────────────────────╮
9+
│ ◆ Codebot │
10+
│ anthropic/claude-sonnet-4.6 · ~/project (main) │
11+
│ │
12+
│ Enter send · Ctrl+J newline · Esc abort · /help │
13+
╰──────────────────────────────────────────────────────╯
14+
```
15+
16+
## 为什么
17+
18+
大多数 AI 编程工具要么是臃肿的框架,要么是薄薄的 API 封装。Codebot 介于两者之间:一个**完整的 Agent**,具备会话管理、安全策略和精致的 TUI。
19+
20+
核心思路:**agentcore 负责执行,codebot 负责编排。**
21+
22+
每一层只做一件事,下层不感知上层。
23+
24+
## 功能
25+
26+
**Agent**
27+
- 流式响应,支持扩展思考(off → xhigh)
28+
- 工具执行:read, write, edit, bash, grep, find, ls, web_search, web_fetch
29+
- 任务管理:task_create, task_get, task_update, task_list(SubAgent 协调)
30+
- SubAgent 委托,支持并行/链式执行
31+
- 上下文满时自动压缩
32+
- 多 Provider:Anthropic, OpenAI, Gemini
33+
- MCP(Model Context Protocol)服务器集成
34+
35+
**会话**
36+
- 仅追加 JSONL 持久化 — 崩溃安全、人类可读
37+
- 恢复会话(`-c` 最近,`-r` 选择),支持分叉、回放
38+
- 模型和思考级别按会话保存
39+
40+
**安全**
41+
- 三种策略:`strict` / `balanced` / `off`
42+
- 危险命令拦截(rm -rf, sudo, dd, ...)
43+
- 工作区范围的文件访问控制
44+
- 每次工具决策的 JSON 审计日志
45+
46+
**界面**
47+
- 交互式 TUI,实时流式输出和 Markdown 渲染
48+
- Plan 模式:Agent 提出修改方案,用户审核批准
49+
- AskUser:Agent 向用户发起结构化多选问题
50+
- 图片粘贴(Ctrl+V),支持选择(↑)和删除(Delete)
51+
- 任务进度展示:进度条 + 状态图标,固定在输入区上方
52+
- 非交互管道模式(`-p`
53+
- 斜杠命令:`/model`, `/compact`, `/plan`, `/resume`, `/copy`, ...
54+
55+
## 快速开始
56+
57+
```bash
58+
# 全局安装
59+
go install github.com/voocel/codebot/cmd/codebot@latest
60+
61+
# 或从源码构建
62+
git clone https://github.com/voocel/codebot.git
63+
cd codebot && go build -o codebot ./cmd/codebot
64+
```
65+
66+
## 使用
67+
68+
```bash
69+
# 交互式 TUI
70+
codebot
71+
72+
# 管道模式
73+
echo "explain main.go" | codebot -p
74+
75+
# 继续上次会话
76+
codebot -c
77+
78+
# 严格安全策略
79+
codebot -policy-profile strict
80+
```
81+
82+
## 设计原则
83+
84+
1. **复用优先** — agentcore 做 Agent 循环,codebot 不重复造轮子
85+
2. **拒绝过早抽象** — 每个接口至少有两个真实调用者
86+
3. **约定优于配置** — 合理默认值,显式覆盖
87+
4. **默认安全** — balanced 策略、审计追踪、工作区边界
88+
89+
## 配置
90+
91+
配置文件:`~/.codebot/settings.json`(全局)或 `.codebot/settings.json`(项目级,优先)。
92+
93+
所有字段可选,参考 [settings.example.jsonc](settings.example.jsonc) 了解完整配置项及说明。
94+
95+
## 环境要求
96+
97+
- Go 1.25+
98+
- 至少一个 Provider 的 API Key
99+
100+
## 许可证
101+
102+
MIT

0 commit comments

Comments
 (0)