Documentation
All documents

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

CommandDetailTimeouts
startStarts a PTY session, reusing an existing agent when possible60s overall; 200ms polling; 90s for the restart request
statusPrints Status / PID / Session / HTTP. Exit code 0 if running, 1 otherwise5s socket timeout
send <text>Writes text into the session. Empty text is rejected60s socket timeout
stopStops the session and waits for the exited state30s request timeout; up to 20s waiting for exit
attachStreams the live terminal. Ctrl+D detaches, session keeps running10s ack timeout; 20ms poll; replays last 131072 bytes
agentRuns 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 stop

Session states

StateMeaning
startingProcess launched, not yet ready
runningSession is live and accepting input
exitedProcess ended; an exit code is recorded
failedSession could not be brought up