README: document o CLI and o tui

This commit is contained in:
Ollie Agent 2026-08-04 18:59:48 +02:00
parent 8ffbf3b699
commit c2b1e130e9
1 changed files with 45 additions and 2 deletions

View File

@ -166,7 +166,49 @@ exec 3<>/mnt/ollie/route; echo 'redesign the auth system' >&3; cat <&3; exec 3>&
No SSH tunneling, no port forwarding, no API gateway. One mount and every
session, every tool, every config value is accessible as if local.
### Shell composability
### Pipe `o`: a composable CLI
The `o` script (`data/scripts/o`) wraps the 9P namespace into a composable CLI:
```sh
o read chat # stream chat output
o prompt # interactive multi-line REPL
o tail # tail chat with block-marker filtering
o readloop statewait # block until state changes
```
Context is set once, then every command addresses the right agent:
```sh
eval $(o env mysession myagent)
o read state # → session/mysession/agent/myagent/state
o prompt # REPL for session/mysession/agent/myagent
```
### `o tui`: an agent terminal in 20 lines of tmux
`o tui` composes `o tail` and `o prompt` into a single tmux layout — no
framework, no widgets, no IPC. It's two shell commands in two panes:
```
┌──────────────────────────────────┐
│ o tail | grep │ ← chat stream
│ │
├──────────────────────────────────┤
│ o prompt │ ← input REPL
└──────────────────────────────────┘
Agent state shown in tmux status bar
```
The prompt REPL supports multi-line input (send with `.` on its own line),
slash commands (`/stop`, `/model`, `/quit`, etc.), and readline editing.
Agent state updates the tmux status bar in real time via `statewait`, with
color-coded background — green for idle, orange for calling, blue for thinking.
This is the entire "frontend": two `o` subcommands, two tmux splits, one
background `statewait` reader. No SDK, no widget toolkit, no event loop.
It's the Plan 9 principle in miniature — shell composition over framework
bloat.
Because operations are file I/O, they compose with the full Unix toolkit:
@ -356,7 +398,8 @@ full variant specification.
| Capability | How |
|---|---|
| **Run an agent** | `olliesrv` → any frontend (ellie, KDE, acme) |
| **Run an agent** | `olliesrv` → any frontend (ellie, KDE, acme, `o tui`) |
| **Terminal TUI** | `o tui` — tmux + two shell commands, no widgets |
| **Remote execution** | Set `remote=user@host` in session config |
| **Multi-agent** | `subagent_spawn` from within a session, or shell scripts |
| **Code completion** | Read/write `/complete` for fill-in-the-middle |