Export project or session data as JSON or Markdown.
-s, --session <id>Export one session only
-f, --format <fmt>json · markdown (default: json)
-o, --output <path>Write to file (default: stdout)
--include-toolsInclude full tool-result bodies
spag export . --format markdown -o session.md
spag x spaghetti -s latest --include-tools
View Claude Code hook events captured by the Spaghetti hooks plugin. Does not require a full index rebuild.
-f, --followStream like tail -f
--filter <type>e.g. PreToolUse
-l, --limit <n>Last N events (default 50)
--clearClear recorded events
--jsonJSON output
spag hooks --follow
spag h --filter PreToolUse --limit 100
Talk to active Claude Code sessions via the channels plugin (loopback WebSocket). Requires the channel plugin to be installed and a live session.
-f, --followStream messages in real time
-s, --session <id>Target session UUID prefix or index
-a, --allApply to all sessions
-l, --limit <n>History entries before follow
--cleanupRemove stale session discovery files
spag chat --follow
spag c -s a3f1 "what's the status?"
Install, uninstall, or check Spaghetti’s Claude Code plugins (hooks, channels).
spag plugin list
spag plugin install hooks
Health-check data paths, plugin state, and common setup issues.
spag doctor
Show or set the active ingest engine (rs / ts). Persists to ~/.spaghetti/config.json.
spag engine
spag engine rs
SPAG_ENGINE=ts spag stats
Check for and install CLI updates from npm.
spag update
Print uninstall instructions for the CLI and related state under ~/.spaghetti.