v0.1.1 — on npm local-first

Permanent memory
for Claude Code.

Claude Code forgets between sessions. CloudCtx gives it total recall — every conversation indexed locally, searchable in milliseconds, survives compaction. One command. Full memory.

$ npm install -g cloudctx
MIT licensed
Node 18+
SQLite + FTS5
CloudCtx cloud mascot
<50ms
FTS5 search across history
100%
Local — nothing leaves your machine
0
Config files. Just init.
Messages. SQLite scales past millions.
FEATURES

Three things that fix Claude Code forever.

No more re-explaining your project every session. No more losing context to compaction. No more hunting for threads from last Tuesday.

01 Persistent memory

Every message, searchable. Forever.

Every conversation gets indexed into a local SQLite database with FTS5 full-text search. Past errors, old decisions, that clever fix from three weeks ago — all one query away.

Claude searches it automatically — CloudCtx injects instructions into your CLAUDE.md, so your agent stops guessing and starts remembering.

  • FTS5 full-text search across every session
  • Raw SQL for power users
  • Tool calls, git branch, cwd, tokens — all indexed
~/project — cloudctx query
$ cloudctx query "redis connection timeout"
Searching 12,847 messages across 184 sessions...
[2026-03-22 · api-server]
"...your Redis client isn't setting a retry strategy. Add maxRetriesPerRequest: 3 and a retryStrategy that backs off exponentially..."
[2026-04-01 · worker-queue]
"The timeout was TCP keepalive — set socket: { keepAlive: 5000 }..."
+ 3 more results
02 Compaction recovery

Compaction becomes a non-event.

When Claude Code compresses your context — manually via /compact or automatically when things get long — critical details vanish. CloudCtx detects compaction and re-injects the last 40 messages from your database straight back into the conversation.

Your agent picks up exactly where it left off. No "I don't have context about what we were doing." No restart. No lost momentum.

Without CloudCtx
fix redis timeout
add connection pool
migrations setup
⚠ compaction
...most context lost
"What were we working on?"
With CloudCtx
fix redis timeout
add connection pool
migrations setup
⟲ recovered 40 msgs
full context restored
"Continuing on migrations..."
03 Thread launcher

Long-running copilots, not throwaway chats.

Bookmark threads by name. Resume them from an interactive TUI. Every thread becomes a domain-specific copilot — a meta-ads campaign agent, a web design collaborator, a quote builder that remembers last week's negotiation.

Arrow keys navigate. Enter resumes. d deletes. No hunting through session IDs. No stale terminal tabs. Just the threads you work on, sorted by last activity.

cloudctx launch — and you're back in.
cloudctx launch
CloudCtx — Select a thread to resume
↑↓ navigate   ⏎ select   d delete   q quit
❯ meta-ads-copilot2026-04-16
  web-design-copilot2026-04-15
  linkedin-posting-agent2026-04-14
  quote-builder2026-04-12
  data-cleaner2026-04-11
  api-refactor-v22026-04-09
ARCHITECTURE

Local-first. Hook-driven. Zero magic.

CloudCtx installs two Claude Code hooks, parses your existing JSONL session files, and stays out of the way. Your data never leaves your machine.

📂
~/.claude/projects/**/*.jsonl
Claude Code's native conversation files (we only read)
⚙️
cloudctx seed / sync
Parses JSONL → structured tables + FTS5 index
💾
~/.cloudctx/conversations.db
SQLite + FTS5 — sessions, messages, tool_uses, docs, threads
🪝
UserPromptSubmit hook
Fires every prompt — injects memory reminder or compaction recovery
Claude Code remembers
Searches history automatically, survives compaction, resumes threads
SCHEMA
sessions
One row per conversation
messages
Every message + metadata
tool_uses
Tool calls extracted
docs
Ingested reference docs
saved_threads
Named bookmarks
messages_fts
FTS5 full-text search
CLI

Twelve commands. All you'll ever need.

Deliberately small surface area. Everything does one thing well.

cloudctx --help
init Set up DB, hooks, CLAUDE.md
query FTS search across history
sql Read-only SQL
sync Incremental sync
seed Full re-import
status Database stats
import Import from another DB
reset Clean uninstall
launch Interactive thread picker
launch --save Bookmark a thread
docs ingest Ingest reference docs
docs search FTS over docs
CloudCtx

Ready in thirty seconds .

Two commands. Works with your existing Claude Code setup. Seeds your full history immediately.

install
$ npm install -g cloudctx
$ cloudctx init
Created ~/.cloudctx/conversations.db
Seeded 12,847 messages from 184 sessions
Installed UserPromptSubmit + SessionEnd hooks
Added memory block to ~/.claude/CLAUDE.md
Ready. Claude Code now has persistent memory.
Requires Node.js 18+ and Claude Code installed.
FAQ

Common questions

Does CloudCtx send my conversations anywhere?

No. Everything lives in ~/.cloudctx/conversations.db on your local machine. No telemetry, no cloud sync, no API calls. The only network traffic happens if you explicitly run cloudctx docs ingest <url>.

Does it modify my Claude Code conversation files?

No. CloudCtx only reads the JSONL files in ~/.claude/projects/. It writes to its own database and adds hooks + a CLAUDE.md block. Run cloudctx reset and everything it added is gone.

How big does the database get?

SQLite handles millions of rows comfortably. Tens of thousands of messages land in well under 100 MB. FTS5 queries stay under 50ms at that scale.

Does it work with my existing history?

Yes — cloudctx init walks every JSONL file in ~/.claude/projects/ and indexes it. Months of old conversations become searchable immediately.

Is it open source?

MIT licensed. Source on GitHub. Issues and PRs welcome.