Search that scales
Content-synced FTS5 over every message. Query across projects, agents, and years of work — hundreds of thousands of rows stay responsive.
Coding agents already write everything to disk. Spaghetti indexes
~/.claude and ~/.codex into one local SQLite workspace —
searchable conversations, browsable artifacts, and an SDK you can build on.
Not another chat archive. A structured multi-agent index of what coding agents leave on disk — built for search, inspection, and tooling.
Content-synced FTS5 over every message. Query across projects, agents, and years of work — hundreds of thousands of rows stay responsive.
Claude Code, OpenAI Codex, and Grok side by side in one index. Agent tabs, source columns, and scoped reads keep native identities distinct.
SQLite under ~/.spaghetti. No accounts, no cloud sync, no phone-home. Your history never leaves the machine.
One napi-rs owner handles all built-in adapters, bounded reconciliation, SQLite projections, queries, and durable live changes.
The same pipeline powers the CLI. Scripts, Electron apps, and React UIs share @vibecook/spaghetti-sdk.
Static disk index, live filesystem deltas, and runtime hooks/channels — keep history warm while agents write without polluting the durable store.
Stats, search, and session browsing — the same output shape the shipped binary prints.
Illustrative output · your numbers come from your own ~/.claude and ~/.codex after install
Stream from disk, write once to SQLite, resume with fingerprints. Claude Code and Codex share a single source_id-tagged store — no per-agent databases.
Per-source adapters walk ~/.claude and ~/.codex; each owns classify + extract.
Buffered JSONL reads — Claude sessions and Codex rollouts never need to fit in RAM.
One SQLite connection, rows stamped with source_id, FTS rebuilt at finalize.
Store path, mtime, size, and byte offset for incremental warm starts per source.
Source-scoped lists, FTS5 search, and token totals (official or estimated) across agents.
Both planes share the durable index. The index is a pure function of files on disk — Spaghetti reads what agents leave behind and never holds a handle to an agent process.
Cold/warm full parse of agent homes into SQLite + FTS5. Schema v7 with composite project keys (source_id, slug).
Opt-in watchers for Claude and Codex files. Typed Change events after commit — { live: true } → api.live.
Hooks and channel sessions via plugins. Read-only relative to the index; if it matters historically, the agent wrote a file first.
RFC 011 gives discovery, decoding, SQLite writes, queries, live recovery, and durable changes one authority.
A napi-rs host with bounded source drivers, registered adapters, one rusqlite writer, read-only query workers, and durable subscriptions.
The retired TypeScript pipeline remains in source control only to compare accepted fixtures during migration.
SPAG_ENGINE,
SPAG_NATIVE_INGEST, and persisted engine: "ts"
values are ignored. A missing native addon is an actionable startup error.
From session transcripts to orchestration workflows — structured tables, not opaque blobs.
source_id, composite project PK, branches, token totals (official or ~ estimated)
Full JSONL / rollouts with FTS text; Claude usage columns · Codex token_count
Transcripts, agent types, nested workflow agents
Agent-orchestration runs with nested subagent graphs
Session todos, plan markdown, task metadata
MEMORY.md, persisted tool results, file history
sessions/**/rollout-*.jsonl, token_count events, tiktoken estimate
Claude settings, marketplaces, telemetry, session-env
Full-screen Ink TUI with bare spag, or one-shot commands when you
just need a fast answer. Same index either way.
spag
Interactive TUI
spag projects
List indexed projects
spag sessions .
Sessions for the current repo
spag messages . latest
Latest session transcript
spag search "…"
Full-text search
spag doctor
Health-check paths & plugins
One async API. Scripts, dashboards, and Electron apps all read the
same Rust-owned canonical index. React components live under
@vibecook/spaghetti-sdk/react.
import {
createObservationService,
} from '@vibecook/spaghetti-sdk';
const api = createObservationService({
dbPath: '/path/to/spaghetti-rs.db',
sources: [
{ adapterId: 'claude-code', roots: ['/home/me/.claude'] },
{ adapterId: 'codex', roots: ['/home/me/.codex'] },
],
live: true,
});
await api.initialize();
const sources = await api.getSourceIds();
const projects = await api.getProjectList();
const sessions = await api.getSessionList(
projects[0],
{ sourceId: projects[0].members[0].sourceId },
);
await api.dispose();
Ship the CLI for daily use, or embed the SDK in any Node project.
npm install -g @vibecook/spaghetti
spag