No description
- Go 100%
Two-column layout (OLD on the left, NEW on the right) made "-" lines
sit flush against column 0 while "+"/context lines indented to
column 4, reading as misaligned in the transcript even though
content lines aligned correctly. Flatten to a single column: every
row shows its line number in the same place — OLD for "-", NEW for
"+" and context — and the existing red/green colour + sigil carry
the old-vs-new distinction. Hunk gutter ("...") and content offset
fall out of the same column width.
|
||
|---|---|---|
| .forgejo/workflows | ||
| cmd/legion | ||
| internal | ||
| pkg/legionapi | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
legion-cli
Control-plane CLI and TUI for the Legion fleet.
This repo houses:
cmd/legion— thelegionbinary (subcommands:info,ps,spawn,tell,attach,pause,resume,stop,destroy).pkg/legionapi— Go client library for the Legion WSS gateway (Inbound/Outboundwire types + aClientthat multiplexes RPCs and subscriptions over one WebSocket).internal/tui— Bubble Tea views for the interactive dashboard + per-agent attach (transcript, timeline, brain-mesh, task board).
Build
go build -o bin/legion ./cmd/legion
Cross-compile for another OS/arch with the usual GOOS/GOARCH.
Run
export LEGION_GATEWAY=wss://gateway.example.com/api/v1/ws
export LEGION_TOKEN=...
legion ps # list agents
legion spawn alice --model fast
legion tell alice "summarise today's news"
legion # interactive TUI (no args)
Flags --gateway and --token are the explicit form; the env vars above are the recommended ergonomic.
Relationship to the daemon
The CLI is a pure WS client. It does not import any daemon-internal package — the wire protocol (Inbound / Outbound / method names) is defined in pkg/legionapi/protocol.go and must stay byte-compatible with the gateway server's copy in the legion repo's internal/gateway/protocol.go. The two move in lockstep when the protocol evolves.
Releases
Tagged releases (vX.Y.Z) build linux/amd64 and darwin/arm64 binaries via the Forgejo workflow at .forgejo/workflows/build.yml.
License
Same as the parent legion repo.