Playing via the CLI
1. Orientation
This guide is for the player — the person at a keyboard, connecting to a running
Aether engine and playing a session. It is not for the engine operator who runs
npm start, or the GM running the game (see gm-manual.md). The CLI
is presentation-only: it transmits your typed commands and renders the events the engine
streams back. Reference: spec 043.
Remote play is live. The OIDC browser sign-in flow and the
aether logincommand are shipped. Remote play works end-to-end. The loopback bypass (--insecure) is still available for local dev. Rich rendering — an Ink-based UI, slash autocomplete, animated spinners — lands in slice 3.
2. Concepts
| Term | Definition |
|---|---|
aether-cli |
The Connect-RPC client. Thin presentation layer; no engine logic lives here. It lives in the workspace at packages/aether-cli (not yet published to a registry). |
| Loopback bypass | On localhost, the gateway authenticates you automatically (no token), when started with AETHER_EXPOSE_LOOPBACK=1 — which npm start sets. |
| Session resume | If the CLI disconnects mid-play, reconnecting replays the events you missed, in order, up to the server’s ring-buffer capacity (default 1000). The CLI records the last event it saw per character at ~/.config/aether/state.json. |
| Slash command | Out-of-character commands prefixed with /. The server publishes the catalog on connect; the CLI prints it, and /help lists it in-session. |
| Bearer token / identity-key | For remote play, a token issued after Google sign-in authenticates you and binds a character to your identity. Not used on the loopback path. |
| Session-0 wizard | When --create is passed to aether play, the engine opens a creation lobby and drives class, ability score, and inventory selection before handing off to a normal play session. For character JSON field guidance, see character-creation.md. |
This version prints events as plain text and reads stdin lines as commands. Rich rendering — an Ink-based UI, slash autocomplete, animated spinners — lands in slice 3.
3. Workflow (local)
-
Start the engine (operator). In one terminal at the repo root:
npm startThis boots the HTTPS Connect-RPC gateway on
localhostwith the loopback bypass. -
Connect to play a character. In a second terminal:
npm run play -w @garrettmanley/aether-cli -- <character> --insecure # equivalently: npx ts-node packages/aether-cli/src/cli.ts play <character> --insecureOn
localhostthere is no sign-in.--insecureaccepts the gateway’s self-signed dev cert (localhost only; use--ca <gateway-cert.pem>to verify it instead). Add--server https://localhost:8443if the gateway isn’t on443. -
First-time player — create a new character. If the character does not yet exist as a file, pass
--createto open the Session-0 wizard over the wire:npm run play -w @garrettmanley/aether-cli -- <newname> --insecure --createDrive the wizard (class → ability scores → inventory). When the wizard completes, reconnect without
--createto begin play:npm run play -w @garrettmanley/aether-cli -- <newname> --insecure -
Play. Your typed lines are sent as
PlayerInput; the engine cycles through intent classification, mechanical resolution, and prose generation; the resulting events stream back. Slash commands work too —/session0,/roll,/gm, etc. -
Reconnect after a drop. Re-run the same command. The CLI replays missed events from your last seen sequence (
~/.config/aether/state.json).
Remote login (
aether login). The server side follows the device-code pattern:aether login --server <url>will open<url>/auth/start?cli=1in your browser; you complete Google sign-in; the success page shows a one-time device code; you enter that code at the CLI prompt, and the CLI exchanges it once at<url>/auth/cli/poll?claim_id=<code>for a bearer, then sends it asAuthorization: Beareron Hello. The code is generated by the server after you sign in and shown only in your browser, so a phished sign-in link cannot be used to steal your session.
4. Examples
4.1 Connecting
$ npm run play -w @garrettmanley/aether-cli -- Sylvanwen --insecure
WARNING: --insecure disables TLS verification (loopback dev only).
Connected as Sylvanwen · session 1f9c… · server <version>
Slash commands: /session0 /roll /gm /accept …
Type to act; lines beginning with "/" are slash commands. Ctrl-D to quit.4.2 Playing through a session
Input. At the prompt you type:
I cast Wild Shape and become a brown bear, then charge the goblin.Output.
[SYSTEM] Reading your intent...
[SYSTEM] Composing the scene...
[NARRATIVE] You feel your shape shift, fur sprouting along your arms,
your hands becoming clawed paws. The goblin looks up just as you barrel
toward it on all fours.
[STATUS_BAR] Sylvanwen (Brown Bear, HP 34/34) — Goblin's turn next.[SYSTEM] lines are progress markers, [NARRATIVE] is the engine’s prose, and
[STATUS_BAR] is the status line (plain text in this version; richer rendering in slice 3).
4.3 Reconnecting after a drop
Re-run play; the CLI resumes from where it left off:
[RESUME_GAP] ... # only if more events elapsed than the buffer holds
[NARRATIVE] The goblin lunges at the bear with its scimitar...
[STATUS_BAR] Sylvanwen (Brown Bear, HP 28/34) — your turn.Events that fell out of the ring buffer are recoverable only from the campaign’s ledger.
5. Pitfalls
- SSH no longer works. As of spec 043 the SSH gateway is removed;
ssh <character>@hostreturns connection-refused. Useaether play <character>. --insecureis localhost-only. It disables TLS verification; the CLI refuses it for any non-loopback host. For a real cert, pass--ca <gateway-cert.pem>.- Don’t run two CLIs for the same character at once.
MessageBusscopes (LOCAL,BLIND) target a single session at a time; two clients fragment your event stream. To spectate from elsewhere, ask the GM for god-view delegation. - The audit log is a feature. Every connection, command, and disconnect is logged to
logs/overseer.jsonlserver-side — your evidence that an action attributed to you was actually you.
6. Reference: command summary
| Command | Effect |
|---|---|
aether play <character> [--server <url>] [--ca <cert.pem>] [--insecure] [--token <bearer>] |
Connect and play. On localhost the loopback bypass authenticates you; resumes from the per-character cursor. |
aether play <name> --create [--server <url>] [--insecure] |
First-time-player bootstrap: opens the Session-0 wizard over the wire (class → ability scores → inventory). Reconnect without --create to begin play. |
aether login --server <url> |
Remote OIDC sign-in. Browser OIDC + one-shot bearer poll; persists token to ~/.config/aether/token mode 0600. |
Until the package is published, run the CLI from the workspace:
npm run play -w @garrettmanley/aether-cli -- … or
npx ts-node packages/aether-cli/src/cli.ts …. In-game slash commands are a server-side
surface — type /help in-session to see what your role can invoke.
7. References
- Spec 043: transport v2 — design.
- Runbook: transport v2 operations — engine operator’s MOP.
- Runbook: E2 live playthrough — manual acceptance procedure.
- Character creation guide — authoring the character JSON fields the wizard populates.
- Player manual — in-game commands and gameplay (transport-agnostic).
- Player onboarding — first-time orientation.
- GM manual — for the person running the game.
- ADR-0010 — why the transport changed.