Licence
MIT
Version
0.5.15
Deps
0
Size
4.8 MB
Vulns
0
Weekly
0
Spaghetti
Turn your local Claude Code history into a searchable workspace.
Spaghetti is a local-first CLI and SDK for Claude Code data. It indexes ~/.claude into SQLite so you can search conversations, inspect projects and sessions, review plans/todos/subagents, and build your own tools on top of the same data.
╭ Spaghetti v0.5.0 ──────────────────────────────────────────────────────╮
│ │
│ ▄▀▀ █▀█ ▄▀▄ █▀▀ █ █ █▀▀ ▀█▀ ▀█▀ █ Projects 79 │
│ ▀▄▄ █▀▀ █▀█ █ █ █▀█ █▀ █ █ █ Sessions 1,247 │
│ ▄▄▀ █ █ █ ▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀ ▀ Messages 86,412 │
│ Tokens 66.3M │
│ untangle your claude code history ────────────────────── │
│ /search /stats /help │
│ ~/.claude · 512 MB · 28ms │
│ │
╰────────────────────────────────────────────────────────────────────────╯
Why people use it
- Find anything fast with full-text search over your Claude Code message history.
- Browse the important artifacts: projects, sessions, messages, plans, todos, memory files, and subagents.
- Stay local-first with a SQLite index stored on your machine.
- Build on top of it with a reusable TypeScript SDK and optional React exports.
Quick start
npm install -g @vibecook/spaghetti
spag
Or run a one-off command without installing globally:
npx @vibecook/spaghetti search "worker pool"
What you get
| Surface | Best for |
|---|---|
@vibecook/spaghetti |
Interactive terminal browsing plus one-shot CLI commands |
@vibecook/spaghetti-sdk |
Scripts, apps, and custom tooling over indexed Claude Code data |
| Native Rust ingest | Faster cold starts by default, with automatic TypeScript fallback |
Common commands
spag # launch the TUI
spag projects # list indexed projects
spag sessions . # sessions for the current repo
spag messages . latest # latest session transcript
spag search "refactor parser"
spag plan . latest
spag todos . latest
spag doctor
What Spaghetti indexes
- Claude Code projects and sessions from
~/.claude - Messages, plans, todos, memory files, and subagent transcripts
- Hook events and active channel sessions for observability workflows
- A local SQLite cache under
~/.spaghetti/cache
Built for two audiences
Terminal users
Launch spag for the full-screen TUI, or use subcommands when you just want a fast answer in the shell.
Tool builders
Use the SDK directly when you want to query the same indexed data from scripts or apps:
import { createSpaghettiService } from '@vibecook/spaghetti-sdk';
const spaghetti = createSpaghettiService();
await spaghetti.initialize();
const results = spaghetti.search({ text: 'worker thread' });
spaghetti.shutdown();
Repo map
packages/cli— published CLI packagepackages/sdk— parsing, indexing, query APIs, and React exportscrates/spaghetti-napi— native Rust ingest engineapps/playground— Electron demo appdocs— RFCs, design notes, and deeper implementation details
Requirements
- Node.js
>=18for end users ~/.claudefor real datapnpm+ Node.js 24 for local workspace development
Learn more
License
MIT — James Yong