More Updates
Changelogpaperctl sessions in the CLI
RSS

paperctl sessions in the CLI

·paperctl CLI

paperctl sessions brings list, get, and export to the CLI. Browse your captured sessions and stream them out as NDJSON without opening the console.

paperctl CLI now has a sessions command. Everything the console shows about your captured sessions is reachable from the terminal, and everything it exports can go straight to a file or a pipe.

List your org’s sessions, most recent first:

paperctl sessions list

Rows come back with sorting and filtering flags when you want them:

paperctl sessions list --limit 20 --sort total_cost_usd --direction desc
paperctl sessions list --since 2026-07-07T00:00:00Z

Inspect one session’s summary:

paperctl sessions get <session-id>

Both list and get take --json when you’d rather have the raw response for scripting.

Export is where the CLI earns its keep. A single session streams out as NDJSON, one JSON record per line:

paperctl sessions export <session-id> --out session.ndjson

The default granularity is one span-level record per turn. Pass --detail traces for full trace and span fidelity. Skip --out and the export streams to stdout, so it pipes:

paperctl sessions export <session-id> | jq '.trace_id' | sort -u

Bulk exports take a time window, or --all if you want everything the server holds (it clamps to a trailing 30 days):

paperctl sessions export --since 2026-07-01T00:00:00Z --out july.ndjson
paperctl sessions export --all --out everything.ndjson

One guardrail worth knowing: a bare paperctl sessions export with no session ID, no window, and no --all is refused. You always say what you’re exporting, so a mistyped command never dumps everything by accident.

Reads don’t depend on the daemon being up. If paperd is stopped, pass --org-slug and the commands still work against your selected gateway.

Update to the latest paperctl CLI and run paperctl sessions --help to see the full surface.

Start with paper

Turn every session into knowledge at team scale.

Get started