Your AI sessions, portable across every machine you code on.

memarium is the npm CLI that syncs your Claude Code and VS Code Copilot Chat sessions to a private GitHub repo, then lets you resume any session on any machine. Pair it with the optional memarium Claude Code plugin for in-session digest + recall.

npm install -g memarium Claude Code · Copilot Chat MIT
Install View on GitHub

The pain it solves

You start debugging a Kubernetes pod on your laptop, hit lunch, walk to a meeting on a different floor, open your desktop — and your Claude session is stuck on the laptop. So you start over: paste the logs, re-explain the cluster topology, hope the new session catches up before you've burned an hour of context.

Or: your Friday-afternoon session debugged a flaky test, you ship the fix, then on Monday morning a different machine starts a new session and re-derives the same root cause from scratch.

memarium keeps every session under ~/.memarium/session-repo/ and pushes it to your private GitHub repo. Any machine that's pulled can memarium resume <sessionId> and pick up where another machine left off — same context, same files-read, same decisions, same dead ends.

Two superpowers

memarium sync

Walks ~/.claude/projects/ and your VS Code Copilot Chat storage, copies new sessions into the spool (with the original .jsonl preserved alongside rendered .md + .raw.json), commits, and pushes to a per-device branch on your private GitHub repo.

Multi-device aware: each laptop pushes to its own branch and a GitHub Action deterministically merges them onto main. Optional encryption via a transparent git clean/smudge filter — your repo can be private without trusting GitHub with raw text.

memarium resume <id>

Copies a session's .jsonl from the spool into ~/.claude/projects/<encoded-cwd>/<newId>.jsonl and prints the cd <project> && claude --resume <newId> command to run.

Each resume is a fork — the new copy gets a fresh sessionId so two devices resuming the same source can continue in parallel without colliding when their spools sync up. The fork's origin is recorded so digest tooling can later group same-source threads.

Cross-device resume — an illustrative scenario

Friday, 4pm, on your laptop. You're three hours into debugging a flaky Kubernetes integration test. Claude has read 14 files, run a dozen kubectl commands, ruled out three suspected root causes, and finally narrowed it to a clock-skew assumption between two pods. You're tired. You quit.

Saturday morning, on your desktop. You sit down with coffee and run:

memarium sync                            # pull anything new from your other machines
memarium list-sessions --since 2d        # find yesterday's session
memarium resume 1f2c3d                   # copy + emit `claude --resume`

memarium fetches your laptop's branch, finds yesterday's session in the spool, copies the .jsonl into the desktop's ~/.claude/projects/, rewrites /Users/laptop-me paths to /Users/desktop-me (configured once via memarium config --map-path), and prints:

Session forked: 1f2c3d-... → 8a7b6c5d-...
Continue with:
  cd /Users/desktop-me/work/k8s-cluster && claude --resume 8a7b6c5d-...

You run that. Claude opens with all 14 files still in context, the three ruled-out hypotheses still in the conversation, and the clock-skew lead waiting for your next prompt. You don't re-explain. You don't re-derive. You just pick up where Friday you left off — on a different machine, from a different chair, with the second cup of coffee.

Install

Requires Node 20+.

npm install -g memarium
memarium init

The wizard walks you through the private GitHub repo URL, optional encryption setup, and per-device branch naming. After that, memarium sync on any machine pushes new sessions and pulls everyone else's, and memarium resume <id> lets you continue any of them locally.

Want digest + recall on top? Install the optional Claude Code plugin:

/plugin marketplace add june9593/memarium-plugin
/plugin install memarium

Plugin and CLI share ~/.memarium/session-repo/ — install one, both, or neither, in any order.

CLI commands

CommandWhat it does
memarium initInteractive wizard. Clones your private repo to ~/.memarium/session-repo/, sets up the device branch.
memarium syncExtract new Claude Code + Copilot sessions on this machine, commit, push.
memarium list-sessions [--project] [--since] [--device]List sessions in the spool, filterable for resume.
memarium resume <sessionId>Fork a spool session into ~/.claude/projects/, print claude --resume command.
memarium config [--map-path FROM=TO]Read or modify ~/.memarium/config.json (e.g. cross-device path map).
memarium list · show · catBrowse the spool from the shell.
memarium crypt <action>Manage the git clean/smudge encryption filter.
memarium workflowInstall the cross-device merge GitHub Action.
memarium doctorHealth check (CLI / npm / git-crypt / plugin / spool format).
memarium upgradenpm install -g memarium@latest wrapper.

Files written

Everything lives under ~/.memarium/:

book/ (chronicles + topics + the catalog) is written by the optional Claude Code plugin, not the npm CLI. The CLI never spawns an LLM — it's pure transport + I/O.

Sibling project: memarium plugin

The companion Claude Code plugin is what turns synced sessions into a searchable book. It adds two slash commands:

The plugin works without the npm CLI (digest local sessions only) and the npm CLI works without the plugin (sync + resume only). Together they give you both cross-device and cross-time portability.

Project links

MIT licensed · Built by @june9593 · 168 vitest tests · Optional encryption via git clean/smudge filter.