CLI reference
The six brewping subcommands, their timeouts and exit codes.
macOS
The CLI talks to the running service over the Unix socket at ~/.brewping/agent.sock. It must be run on the same machine that is hosting the session.
Usage
text
brewping <command> [arguments]
start Start a session
status Show service and session state
send <text> Send text into the running session
stop Stop the session
attach Attach this terminal to the session
agent Run the agent daemon
Unrecognised commands print this usage and exit with code 1.Commands
| Command | Detail | Timeouts |
|---|---|---|
| start | Starts a PTY session, reusing an existing agent when possible | 60s overall; 200ms polling; 90s for the restart request |
| status | Prints Status / PID / Session / HTTP. Exit code 0 if running, 1 otherwise | 5s socket timeout |
| send <text> | Writes text into the session. Empty text is rejected | 60s socket timeout |
| stop | Stops the session and waits for the exited state | 30s request timeout; up to 20s waiting for exit |
| attach | Streams the live terminal. Ctrl+D detaches, session keeps running | 10s ack timeout; 20ms poll; replays last 131072 bytes |
| agent | Runs the built-in agent daemon | — |
Examples
bash
# Start, then confirm it is up
brewping start
brewping status
# Drive it from a script
brewping send "Add rate limiting to the auth middleware"
# Follow along in a real terminal, then detach with Ctrl+D
brewping attach
# Tear down
brewping stopSession states
| State | Meaning |
|---|---|
| starting | Process launched, not yet ready |
| running | Session is live and accepting input |
| exited | Process ended; an exit code is recorded |
| failed | Session could not be brought up |