CLI (b7)
The way an AI agent drives buster7 from a shell
b7 is the command that lets an AI agent drive buster7 from a shell. It
gives the agent everything it needs in plain commands: make a terminal, send an
instruction, read the screen, and clean up when it is done.
It talks to the same server as the app, so a session made from the CLI shows up on the app's board just the same, and the other way round.
Getting the CLI
Use bin/b7 from the distributed zip. Put it somewhere on your PATH, or call
it where it sits.
./bin/b7 statusHow it finds the server
b7 looks for the server and the token in this order. If you have already set
the connection in the app, it connects there with no arguments at all.
- The
--server/--tokenarguments - The environment variables
BUSTER7_SERVER/BUSTER7_TOKEN .buster7.local(a JSON file kept in the repository;b7 server setupwrites it)- The app's settings (the address and token saved on macOS)
- The default,
127.0.0.1:8787
To see where it would connect, run b7 server status. To write the connection
into a file, run b7 server setup.
The shape of the output
On success, the result is one line of JSON on standard output. --pretty
formats it. The items in a list come through exactly as the server returned
them, so nothing is lost when the server grows new fields.
On failure, standard error carries this shape:
{"error":{"kind":"server","message":"bad_session_id: nope"}}Exit codes are split by kind, so an agent can branch without reading the body.
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | The server returned an error |
| 2 | Wrong usage |
| 3 | Could not reach the server |
| 4 | Wrong token |
| 5 | Unreadable response |
To take only the result, use 2>/dev/null.