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 and OpenAI Codex side by side in one index. Agent tabs in the TUI, an Agent column in lists, and source-scoped session reads so slugs never collide.
SQLite under ~/.spaghetti. No accounts, no cloud sync, no phone-home. Your history never leaves the machine.
Claude bulk path is a napi-rs addon with rayon parallelism. Pure TypeScript for Codex and as automatic fallback — zero configuration.
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.
Planes 1–2 share the durable index. Plane 3 is a separate event stream — runtime events never write SQLite.
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.
Rust and TypeScript write the same schema. A fixture-based ingest-diff harness keeps them honest in CI.
napi-rs addon with rayon-parallel project parse and a dedicated rusqlite writer thread. Roughly 2× faster cold start on multi-GB histories.
Full streaming pipeline with worker threads. Ground truth for Claude, exclusive path for Codex today, automatic fallback when native is unavailable.
token_count + tiktoken estimate fallbackSPAG_ENGINE=tsengine option → SPAG_ENGINE env → legacy SPAG_NATIVE_INGEST →
~/.spaghetti/config.json → default rs.
Each engine uses its own DB file so switching never forces a re-ingest.
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 factory. One API. Scripts, dashboards, and Electron apps all read
the SQLite index the CLI builds. React components live under
@vibecook/spaghetti-sdk/react.
import {
createSpaghettiService,
createCodexSource,
} from '@vibecook/spaghetti-sdk';
const api = createSpaghettiService({
additionalSources: [createCodexSource()],
live: true,
});
await api.initialize();
const sources = api.getSourceIds(); // ['claude-code','codex']
const projects = api.getProjectList();
const sessions = api.getSessionList(
projects[0].slug,
{ sourceId: projects[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