remaimber
CLAUDE.md0 starsChanged 11 days agoMITView on GitHub
Go CLI + MCP server for archiving coding-agent conversations (Claude Code, Codex, pi) into SQLite with FTS5. - cmd/remaimber/ — CLI entry point (cobra), MCP server - internal/db/ — SQLite connection, schema, queries - internal/importer/ — JSONL scanning, parsing, importing (one file per agent: parser.go/scanner.go for Claude Code, pi.go, codex.go) - internal/homedir/ — home resolution that survives a scrubbed environment - internal/mover/ — move/copy conversations between projects - internal/remote/ — sync with other machines (ssh, S3) - internal/setup/ — Claude…
- Commits and pushes
The file
Files
remaimber
Go CLI + MCP server for archiving coding-agent conversations (Claude Code, Codex, pi) into SQLite with FTS5.
Build & Test
make build # builds to bin/remaimber
make install # installs to ~/.local/bin/remaimber
make test # runs all testsProject Structure
cmd/remaimber/— CLI entry point (cobra), MCP serverinternal/db/— SQLite connection, schema, queriesinternal/importer/— JSONL scanning, parsing, importing (one file per agent:parser.go/scanner.gofor Claude Code,pi.go,codex.go)internal/homedir/— home resolution that survives a scrubbed environmentinternal/mover/— move/copy conversations between projectsinternal/remote/— sync with other machines (ssh, S3)internal/setup/— Claude Code configuration, and the per-agent status reportinternal/types/— shared type definitions
Agent integrations
- The repo root is one plugin for both Claude Code and Codex:
.claude-plugin/and.codex-plugin/are the two manifests over the sameskills/,hooks/,.mcp.jsonandscripts/ensure-installed.sh. The marketplaces are.claude-plugin/marketplace.jsonand.agents/plugins/marketplace.json, both pointing at./.skills/is shared with pi too package.json(pimanifest) +pi/extensions/— pi package. On pi 1.0+ the extension also registers the MCP server (pi.registerMcpServer, feature- detected so older pi still loads it), withdeferredexposure so the tools are loaded throughtool_searchinstead of declared on every request
One plugin, not one per agent, because Codex loads Claude Code plugins too: it
reads .claude-plugin/plugin.json, and its external-agent import copies a Claude
Code setup's enabled plugins and marketplaces across. Separate plugins meant
Codex could end up running the Claude Code one, with hooks it does not have and
no skills. So hooks/hooks.json uses only what both agents support: the events
SessionStart, PreCompact, Stop and SessionEnd (no Claude-only Notification),
async, statusMessage, timeouts in seconds, and CLAUDE_PLUGIN_ROOT, which
Codex sets alongside PLUGIN_ROOT. Slash commands are skills for the same reason:
Claude Code invokes a plugin skill as /rmb:recall like a command, and Codex has
no commands/.
Bump version in both manifests when the plugin changes: Codex caches an
installed plugin by version, and Claude Code does too. Both have a
validator worth running — claude plugin validate . and the plugin-creator
skill's validate_plugin.py for Codex.
remaimber setup wires up every agent it finds (internal/setup/agents.go) by
running that agent's own plugin install — the plugin carries hooks, MCP and
skills, so there is nothing left for setup to write. --agent limits it,
--dry-run prints without doing, --no-plugin takes the older Claude Code route
(hooks in settings.json plus claude mcp add). Both routes at once write the
hooks twice, so setup refuses the second. doctor prints the same per-agent
report.
Claude Code does not read mcpServers from settings.json. User-scope MCP
servers live in ~/.claude.json, which claude mcp add --scope user owns — that
file also holds Claude Code's own state, so it is not ours to rewrite. A server
written into settings.json is silently inert, which is how the search tools went
missing for months without a symptom other than an agent saying the tool does not
exist.
In Codex, $rmb:recall mentions a skill directly, and the model can load one
implicitly from its description.
On Codex the plugin needs ≥ 0.148.0, where asynchronous command hooks landed.
Below that the async hooks are skipped with skipping async hooks, not supported
yet. Dropping "async": true for shell backgrounding (... &) would remove the
floor, at the cost of the agent no longer accounting for the work it started.
remaimber update replaces the binary with the newest release, and the import
sweep checks once a day (internal/selfupdate). The check rides on
import-if-stale rather than its own hook: adding a command to hooks.json
changes every hook's hash, and Codex makes the user re-trust them when that
happens.
remaimber prune bounds the archive (internal/db/prune.go), in three grades:
tool output (over half the bytes, already excluded from search), all messages
but keep the summaries, or whole sessions. Automatic pruning runs from the same
sweep as the update check, and only when REMAIMBER_RETENTION is set. Every removal is
tombstoned in pruned_sessions and ImportFile skips those ids: deleting a
session removes the row that records the import, so without it the next sweep
reads the transcript back in. remaimber forget <id> lifts one.
remaimber sync (internal/remote) pulls other machines' transcripts over ssh
or from S3, and can push this machine's to S3. S3 is mainly read: assume some
other system copies session directories there, so a location is read in the
agents' native layout - a home holding .claude/projects, .codex/sessions,
.pi/agent/sessions, or with --agent one agent's directory - and push writes
that same layout rather than one of its own. It moves transcript files,
not rows, and imports them with the ordinary importer from a temporary copy, so
there is no mirror on disk and no second parser. Keys are
<agent>/<path under that agent's root> on every transport
(importer.RemoteKey/RemoteSessionFile). Etags live in remote_objects,
recorded only after a successful import or upload so a failure retries. A
pulled session carries sessions.origin; a session belongs to whichever origin
recorded it first, so a local one is never relabelled, and push sends only the
local agent directories, so nothing pulled is republished. Pull etags are keyed
by origin, push etags by destination. Both transports
shell out (ssh running a POSIX sh script, the aws CLI) rather than linking
clients, so credentials resolve as they do for the user's own tools.
Summarization runs through whichever CLI REMAIMBER_LLM names — claude
(default), codex, pi — or an OpenAI-compatible URL, or not at all with
off, for a machine whose sessions are pulled and summarized elsewhere. off
is a setting, not an unreachable backend: nothing is attempted, so no failure is
recorded and doctor does not report a stuck backlog. Each agent CLI is
invoked ephemerally (--no-session-persistence, --ephemeral, --no-session):
a persisted summarization session would be imported as a conversation of its
own, so the archive would fill with its own summaries.
Release
./scripts/release.sh v0.2.0
git push origin main && git push origin v0.2.0Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

