Skip to content

Commit bc44a6a

Browse files
Documented the local web GUI in the README.
1 parent 84a5635 commit bc44a6a

1 file changed

Lines changed: 43 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
| 🆕 | **Tokenizer-Aware Context** | Cached tokenizer backends with heuristic fallback for `/context`, `/status`, and compaction |
5757
| 🆕 | **Prompt Budget Preflight** | Preflight prompt-length validation, token-budget reporting, and auto-compact/context collapse before backend failures |
5858
| 🆕 | **LSP Runtime** | Local LSP-style code intelligence for definitions, references, hover, symbols, call hierarchy, and diagnostics |
59+
| 🆕 | **Local Web GUI** | Browser-based chat UI via `python -m src.gui` — modern dark theme, slash command palette, session browser, settings panel |
5960
| 🆕 | **Daemon Commands** | Local `daemon start/ps/logs/attach/kill` wrapper over background agent sessions |
6061
| 🆕 | **Background Sessions** | Local `agent-bg`, `agent-ps`, `agent-logs`, `agent-attach`, and `agent-kill` flows |
6162
| 🆕 | **Testing Guide** | Comprehensive [TESTING_GUIDE.md](TESTING_GUIDE.md) with commands for every feature |
@@ -85,6 +86,7 @@ Built on the public porting workspace from [instructkr/claw-code](https://github
8586
|---------|-------------|
8687
| 🤖 **Agent Loop** | Full agentic coding loop with tool calling and iterative reasoning |
8788
| 💬 **Interactive Chat** | Multi-turn REPL via `agent-chat` with session continuity |
89+
| 🖥️ **Local Web GUI** | Browser-based chat UI launched with `python -m src.gui` — sessions browser, slash command palette, live settings |
8890
| 🧰 **Core Tools** | File read / write / edit, glob search, grep search, shell execution |
8991
| 🔌 **Plugin Runtime** | Manifest-based plugins with hooks, aliases, virtual tools, and tool blocking |
9092
| 🪆 **Nested Delegation** | Delegate subtasks to child agents with dependency-aware topological batching |
@@ -169,6 +171,7 @@ Built on the public porting workspace from [instructkr/claw-code](https://github
169171
- [x] Local workflow runtime with workflow list/get/run tools and CLI/slash flows
170172
- [x] Local remote trigger runtime with create/update/run flows and CLI/slash inspection
171173
- [x] Local managed git worktree runtime with live cwd switching and worktree CLI/slash flows
174+
- [x] Local web GUI (FastAPI + vanilla JS SPA) with chat, sessions browser, slash command palette, and live settings (`python -m src.gui`)
172175
- [x] Tokenizer-aware context accounting with cached tokenizer backends and heuristic fallback
173176
- [x] Plugin runtime: manifest discovery, hooks, aliases, virtual tools, tool blocking
174177
- [x] Plugin lifecycle hooks: resume, persist, delegate phases
@@ -245,7 +248,11 @@ claw-code/
245248
│ ├── commands.py # Mirrored command inventory
246249
│ ├── tools.py # Mirrored tool inventory
247250
│ ├── runtime.py # Mirrored runtime facade
248-
│ └── reference_data/ # Mirrored inventory snapshots
251+
│ ├── reference_data/ # Mirrored inventory snapshots
252+
│ └── gui/ # Local web GUI (FastAPI + vanilla JS SPA)
253+
│ ├── __main__.py # `python -m src.gui` entry point
254+
│ ├── server.py # FastAPI app and JSON endpoints
255+
│ └── static/ # index.html, app.css, app.js
249256
└── tests/ # Unit tests
250257
├── test_agent_runtime.py
251258
├── test_agent_context.py
@@ -712,6 +719,41 @@ Features:
712719
713720
---
714721

722+
## 🖥️ Local Web GUI
723+
724+
If the terminal isn't your thing, launch the bundled browser GUI:
725+
726+
```bash
727+
python3 -m src.gui --cwd . --allow-write --allow-shell
728+
```
729+
730+
Your default browser opens to `http://127.0.0.1:8765` with a modern dark-themed chat UI.
731+
732+
| Flag | Description |
733+
|------|-------------|
734+
| `--host <addr>` | Bind address (default `127.0.0.1`) |
735+
| `--port <n>` | Port to listen on (default `8765`) |
736+
| `--cwd <path>` | Workspace directory the agent operates in |
737+
| `--model <name>` | Override the model name |
738+
| `--base-url <url>` | Override the OpenAI-compatible API base URL |
739+
| `--api-key <key>` | API key for the model server |
740+
| `--session-dir <path>` | Where saved sessions live |
741+
| `--allow-write` | Allow file write/edit tools |
742+
| `--allow-shell` | Allow shell execution |
743+
| `--no-browser` | Don't auto-open a browser tab |
744+
745+
The GUI surfaces:
746+
747+
- multi-turn chat with tool-call cards (collapsible JSON args + results)
748+
- saved sessions sidebar with one-click resume
749+
- slash command and skill pickers (`/` and `★` buttons, or `Cmd/Ctrl+K`)
750+
- live settings panel (model, base URL, working dir, permissions)
751+
- usage / cost meta in the composer footer
752+
753+
> **Note:** The GUI uses [FastAPI](https://fastapi.tiangolo.com/) and [Uvicorn](https://www.uvicorn.org/) under the hood. These get installed automatically if you install the package via `pip install -e .`. The core Python agent runtime itself remains dependency-free.
754+
755+
---
756+
715757
## 🔄 Session Persistence
716758

717759
Each `agent` run automatically saves a resumable session:

0 commit comments

Comments
 (0)