List indexed projects with Agent column, session counts, message totals, tokens (official or ~ estimated for Codex), and last activity. TUI groups projects into per-agent tabs when multiple sources are present.
-s, --sort <key>active · sessions · messages · tokens · name (default: active)
-l, --limit <n>Limit rows
--jsonJSON output (includes sourceId, tokensEstimated)
spag projects --sort tokens --limit 20
spag p --json
List sessions for a project — agent, branch, message count, tokens, duration, summary. Scoped to the resolved project’s sourceId so Claude and Codex on the same repo stay separate.
-s, --sort <field>recent · tokens · messages · duration
-l, --limit <n>Default 20
-a, --allNo limit
--since <time>today · yesterday · "3 days ago" · ISO date
--jsonJSON output
spag sessions .
spag s spaghetti --sort tokens --limit 10
spag sessions . --since today
Read a session transcript with tool use, thinking blocks, and pagination. Assistant headers show CLAUDE or CODEX based on the project’s agent source.
-n, --limit <n>Default 50 messages
--offset <n>Start at message N
--last <n>Show last N messages
--compactOne line per message
--no-toolsHide tool-use details
--no-thinkingHide thinking blocks
--rawRaw JSON per message
--jsonFull JSON payload
spag messages . latest
spag m . latest --last 20 --compact
spag messages spaghetti a3f1 --no-thinking