2026-09-13 07:25:02 +00:00
# GrokBoy
2026-09-13 07:57:57 +00:00
Minimal local **GrokBot-like** CLI agent. Phase **P3** : optional Playwright DOM browser tools.
2026-09-13 07:25:02 +00:00
## Status
| Phase | Status |
|-------|--------|
| P0 streaming chat | done |
2026-09-13 07:42:59 +00:00
| P1 shell / files + ReAct | done |
2026-09-13 07:51:13 +00:00
| P2 completion / loop guard / truncation | done |
2026-09-13 07:57:57 +00:00
| P3 browser (Playwright DOM) | done (optional) |
2026-09-13 07:25:02 +00:00
No Docker desktop, no Codex/LazyBoy fork.
## Setup (macOS)
```bash
export GROKBOY_API_KEY=your_key # or XAI_API_KEY
# optional:
# export GROKBOY_BASE_URL=https://api.x.ai/v1
2026-09-13 07:42:59 +00:00
# export GROKBOY_MODEL=grok-4.6
2026-09-13 07:51:13 +00:00
# export GROKBOY_CONTEXT_CHARS=100000
2026-09-13 07:25:02 +00:00
cd ~/GrokBoy
cargo run -p grokboy -- chat
```
2026-09-13 07:57:57 +00:00
### Optional: Playwright browser tools
Browser tools are always registered but **fail closed** until you install the helper:
```bash
cd ~/GrokBoy/tools/playwright
npm install
npx playwright install chromium
```
Then the agent can use `browser_navigate` , `browser_snapshot` , `browser_click` , `browser_type` , `browser_eval` (DOM/selector/role — not screenshot-first).
2026-09-13 07:25:02 +00:00
## Commands
2026-09-13 07:42:59 +00:00
- `grokboy chat` — interactive streaming chat (no tools)
2026-09-13 07:51:13 +00:00
- `grokboy run "<prompt>"` — one-shot agent with tools
2026-09-13 07:42:59 +00:00
- `grokboy run --session <id> "<prompt>"` — continue a saved session
2026-09-13 07:57:57 +00:00
- `grokboy smoke` — offline checks (no API key / no Chromium required)
2026-09-13 07:25:02 +00:00
- `grokboy help`
2026-09-13 07:57:57 +00:00
Tools: `shell` , `list_dir` , `read_file` , `write_file` , `report_done` , `report_blocked` ,
`browser_navigate` , `browser_snapshot` , `browser_click` , `browser_type` , `browser_eval` .
2026-09-13 07:51:13 +00:00
2026-09-13 07:57:57 +00:00
Sessions are stored under `~/.grokboy/sessions/<id>.json` (may include `last_browser_url` ).
2026-09-13 07:42:59 +00:00
2026-09-13 07:51:13 +00:00
The agent stops on `report_done` / `report_blocked` , blocks identical tool rounds (× 3), and truncates old context when over budget.
2026-09-13 07:25:02 +00:00
## 繁體中文
2026-09-13 07:57:57 +00:00
本機終端機 coding assistant。P3 可選 Playwright DOM 瀏覽器工具(非截圖優先)。
2026-09-13 07:25:02 +00:00
```bash
export GROKBOY_API_KEY=你的金鑰
cd ~/GrokBoy
2026-09-13 07:42:59 +00:00
cargo run -p grokboy -- smoke
2026-09-13 07:57:57 +00:00
# 可選瀏覽器:
cd tools/playwright & & npm install & & npx playwright install chromium
cargo run -p grokboy -- run "打開 example.com 並 snapshot"
2026-09-13 07:25:02 +00:00
cargo run -p grokboy -- chat
```
## Layout
```
2026-09-13 07:57:57 +00:00
crates/grokboy-core/ # config, model, tools, browser, agent, session
crates/grokboy/ # CLI binary
tools/playwright/ # optional Node Playwright helper (JSONL)
2026-09-13 07:25:02 +00:00
docs/ACCEPTANCE.md
```