Skip to main content
Everything you can do in the UI is a command too, so you can drive sessions from scripts, make targets or other tools. Commands print JSON where a script needs it.

Run a job in a session and wait for it

Because the session holds the job, you can watch it live in Rakumux at the same time, and it keeps running if your script’s terminal goes away.

Wait for something to happen

rakumux session wait <name|id> --until U blocks until the session reaches a state, or until --timeout milliseconds pass (default 30000). It prints {"matched", "status", "lifecycle", "reported", "reason"}.

Read a session

rakumux session read <name|id> prints {"text", "rows", "cols", "cursor", "truncated"}. --source visible (the default) is the screen; recent and recent-unwrapped are the last --lines lines of history. --format ansi keeps colours.

List sessions

Each session carries its status, lifecycle, agent, git context, the agent’s latest output and your last prompt (agent_output, user_prompt), and its terminal size.

Over HTTP

For other languages, or anything that can’t run a command, the local HTTP API serves the same operations on 127.0.0.1, plus WebSockets for session events and live terminals. It starts on demand:
jq is used only by these examples; Rakumux doesn’t need it.