CLI
Install with npm install -g postrun. Every command is postrun <command>; postrun help lists them.
| Command | What it does |
|---|---|
postrun setup | Set up Claude Code, start recording, open the review app. |
postrun status | Whether it is recording, and where the review app is. |
postrun open | Open the review app in your browser. |
postrun sessions | List recorded sessions. |
postrun export | Write one session as a redacted HTML report. |
postrun delete | Delete one session for good. |
postrun start, stop, restart | Run or stop the background process. |
postrun autostart | Start Postrun when you log in, or not. |
postrun doctor | Check everything, with a fix for each problem. |
postrun uninstall | Take Postrun out of Claude Code and stop it. |
postrun version | Print the version. |
postrun setup
postrun setup [--port <n>] [--autostart | --no-autostart] [--no-open] [--yes]
Safe to run any number of times: after installing, after updating Postrun, or after installing Claude Code or Cline. It:
- Copies the hook script to
~/.postrun/bin/capture-hook.sh, so updating or moving Postrun never breaks recording. - Merges Postrun's hooks and telemetry settings into
~/.claude/settings.json, backing the file up once first. If your settings already send Claude Code telemetry to another endpoint, it leaves that alone and records from hooks only (no cost or token counts). If Claude Code is not installed, it says so and skips this step. - Checks for Cline's sessions folder.
- Picks free ports: if 1234 or 4318 is used by another program, it moves to the next free one and remembers it.
- Starts the background process, or restarts it when a different version or different ports are running.
- Asks whether to start at login (default yes), and opens the review app.
| Flag | Effect |
|---|---|
--port <n> | Port for the review app. Default 1234. Remembered for next time. |
--autostart | Start at login without asking. |
--no-autostart | Do not start at login. Turns it off if it was on. |
--no-open | Do not open the browser. |
--yes, -y | Accept the defaults without asking. |
Without a terminal (for example in a script), setup asks nothing and takes the defaults.
postrun status
postrun status
Prints whether Postrun is recording, its pid, the review app address and how many sessions are stored. Exits 0 when running, 3 when not running.
postrun open
Opens the review app in your default browser and connects that browser: the link carries this computer's key after #, which the app keeps and removes from the address bar. If it cannot open a browser, it prints the link to open yourself. Run it once in each browser you use.
postrun sessions
postrun sessions [--agent claude-code|cline]
Lists stored sessions, newest first: start time, agent and id, then the first line of the first prompt, then steps, turns, failures, cost and working folder.
postrun stats
postrun stats [--json]
Prints how you use Postrun, counted on this computer only: sessions recorded (by agent), days active in the last 30, and how often each feature was used in the last 30 days and in all. It shows counts only, with no sessions, paths or text, so it is safe to paste to someone. --json prints the same as JSON. Nothing is sent anywhere. See Security.
postrun export
postrun export <session-id> [-o <file>] [--force]
Writes one redacted, self-contained HTML report to the current folder and lists every value it masked. Redaction cannot be switched off. The file is written with mode 0600. See Exporting and redaction.
| Flag | Effect |
|---|---|
-o <file>, --out <file> | Output path. Default postrun-<agent>-<date>-<short id>.html. |
--force | Overwrite an existing file. |
postrun share
postrun share <session-id> [--expires 1|7|30|90] [--yes]
Uploads the redacted report postrun export would write to app.postrun.app and prints an unlisted link. Lists what redaction masked and asks first; --yes skips the question. Needs postrun login once. See Share links.
| Flag | Effect |
|---|---|
--expires <days> | How long the link works: 1, 7, 30 or 90. Default 30. |
--yes | Upload without asking. |
postrun feedback
postrun feedback
postrun feedback --rating 4 --message "Support Cursor next" --yes
Sends a rating from 1 to 5 and a message to the Postrun team. At a terminal it asks for each, shows exactly what will be sent, and asks before sending. Nothing about your sessions is included. Your email goes along when you give one (or when this computer is signed in), so a reply can reach you.
| Flag | Effect |
|---|---|
--rating <1-5> | How useful Postrun is to you. |
--message "<text>" | What Postrun should do next. |
--email <address> | Where a reply should go. |
--usage | Attach your usage summary (counts only, the same text as postrun stats). |
--yes | Send without asking. |
postrun login and logout
postrun login [--with-token] [--no-open]
postrun logout
login connects this computer to your Postrun account so it can make share links: it opens the browser to approve the computer, then saves the sign-in in ~/.postrun/account.json (mode 0600). --with-token reads a token made in Settings from the terminal or stdin instead, for a computer without a browser. --no-open prints the link instead of opening it.
logout signs this computer out on app.postrun.app as well and deletes the file. Links already made keep working until they expire or you turn them off.
postrun delete
postrun delete <session-id>
postrun delete <session-id> --yes
Without --yes, prints what would be deleted and changes nothing. With --yes, deletes the session from the store with secure delete on, removes its raw capture files, and keeps its id so Postrun never records it again. It does not touch the agent's own copy under ~/.claude/projects or ~/.cline/data/sessions, and says so.
The review app's Delete button does the same. See Deleting a session.
postrun start, stop and restart
postrun start
postrun stop
postrun restart
start runs Postrun in the background and waits until the review app answers. If it is already running, it says so. If it cannot start, it prints the last lines of ~/.postrun/postrun.log.
stop stops it. Claude Code's hook keeps saving events while Postrun is stopped, and the next start catches up on every session it missed, without cost data. To stop recording altogether, pause it in Settings instead. stop only signals the process in ~/.postrun/postrun.pid after checking that it really is Postrun; a stale file is removed and nothing else is touched.
The background process runs the telemetry receiver, both recorders and the review app together, and logs to ~/.postrun/postrun.log (rotated at 5 MB).
postrun autostart
postrun autostart # show whether it is on
postrun autostart on
postrun autostart off
On macOS this is a launch agent, ~/Library/LaunchAgents/app.postrun.recorder.plist. On Linux it is a systemd user service, ~/.config/systemd/user/postrun.service. Either one starts Postrun at login and restarts it a minute after a crash; postrun stop is respected until the next login. If you change Node version (for example with nvm), run postrun autostart on again.
postrun doctor
postrun doctor
Checks, without changing anything:
- your Node version;
- the data folder and its permissions;
- whether the background process is running and answering;
- whether Claude Code is set up and the hook script is in place and current;
- whether telemetry is reaching Postrun;
- when Claude Code was last recorded;
- whether Cline is found;
- whether the store opens;
- start at login.
Each problem comes with one fix. Exits 1 when there is a problem. If you report an issue, include what postrun doctor prints.
postrun uninstall
postrun uninstall [--yes] [--keep-data | --delete-data]
Stops Postrun, turns off start at login, and takes Postrun's hooks and settings out of ~/.claude/settings.json. A setting you had before Postrun is kept, and everything else in the file is left as it is. Then it asks whether to delete ~/.postrun, defaulting to no.
| Flag | Effect |
|---|---|
--yes, -y | Do not ask before starting. |
--keep-data | Keep your recorded sessions without asking. |
--delete-data | Delete ~/.postrun without asking. |
To remove the command itself afterwards: npm uninstall -g postrun.
Environment variables
You should not need these. They exist for tests and unusual setups.
| Variable | Default |
|---|---|
POSTRUN_HOME | ~/.postrun, the folder for everything Postrun stores |
POSTRUN_DB | ~/.postrun/postrun.db |
POSTRUN_CAPTURE_DIR | ~/.postrun/captures |
POSTRUN_CLAUDE_SETTINGS | ~/.claude/settings.json |
POSTRUN_CLINE_DIR | ~/.cline/data/sessions |
POSTRUN_SHARE_SERVER | https://app.postrun.app, where postrun login and share links go |
POSTRUN_KEEP_CAPTURES | Unset. 1 keeps raw capture files instead of removing them 24 hours after a session goes quiet. |
Ports are kept in ~/.postrun/config.json and changed with postrun setup --port.
Exit codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | The command failed, or doctor found a problem. The message says why. |
2 | Bad usage: an unknown command or flag, or a missing value. |
3 | status only: Postrun is not running. |
Working on Postrun
From a checkout of the repository, pnpm postrun <command> runs the command from source. The older scripts are still there for development:
pnpm dev:core # the server on 127.0.0.1:1234, serving the last built UI
pnpm dev:ui # Next dev server on 127.0.0.1:3000, with /api proxied to 127.0.0.1:1234
pnpm capture # the recorder in the foreground
pnpm ingest --agent claude-code|cline <source>
pnpm adapter:cc <session-folder> > steps.json
pnpm adapter:cline <session-id> > steps.json
pnpm test # every package
pnpm test:install # pack, install into a throwaway home, and check everything end to end