CMEM Pro (manual / headless)
Use this when you already have a cmem.ai account and need to wire CMEM Pro without the interactive installer (CI, a second machine, or a box you SSH into). The usual path is stillnpx claude-mem install.
What the installer does
Three stages:- Runtime — Bun/uv if needed, IDE plugin files, worker deps.
- Sign in — skipped only for
--provider claude(that path never talks to cmem.ai). Otherwise the CLI does not ask for an email:POST https://cmem.ai/api/installer/oauth/startwith{ source: "npx-installer", device_name: <hostname> }- prints a device code
XXXX-XXXXand opensauthorization_url - polls
https://cmem.ai/api/pro/trial/polluntil authenticated
- Provider — CMEM Pro is pre-selected. Choosing it opens
checkout_url(trial/claim), polls untilstatus: "ready", then writes settings and restarts the worker.
--provider openrouter with a personal key is a different path: empty CLAUDE_MEM_OPENROUTER_BASE_URL (or https://openrouter.ai/api/v1). Never send a personal sk-or- key to https://cmem.ai/api/inference.
Settings the installer writes
Credentials are staged, then activated. File:~/.claude-mem/settings.json.
Staged (sync + trial metadata)
Cloud sync is on only when the token, user id, and hub URL are all non-empty. See Cloud Sync.
Activated (this is what makes observations run)
The worker talks to cmem.ai through the generic OpenRouter client. There is no separate CMEM provider implementation.memory_key and setup_token are often the same (cm_pro_…). If the poll returns a distinct memory_key, use that for CLAUDE_MEM_OPENROUTER_API_KEY and keep setup_token only on CLAUDE_MEM_CLOUD_SYNC_TOKEN.
Manual recipe (you already have tokens)
- From cmem.ai → Connect (or an installer pairing), copy
setup_token,user_id,hub_url, andmemory_key(if missing, usesetup_token). - Merge staged + activated keys into
~/.claude-mem/settings.json. Placeholders only:
chmod 600 ~/.claude-mem/settings.json- Restart the worker so it is not holding old in-memory provider/sync state:
- Verify (port is
CLAUDE_MEM_WORKER_PORTor~/.claude-mem/.worker.port):
openrouter, and sync configured: true plus hub.reachable: true.
- First real observation should store via model
cmem-observer. Gateway success clearsCLAUDE_MEM_PRO_FALLBACK_AT. A terminal quota/key error from the gateway sets that timestamp and memory falls back to the Anthropic plan.
Fallback is event-driven, not a calendar date. Do not treat
CLAUDE_MEM_PRO_TRIAL_ENDS_AT as the switch. The switch is CLAUDE_MEM_PRO_FALLBACK_AT.What not to mix
Never send a personal OpenRouter key to the cmem gateway.
Next steps
- Installation — interactive three-stage installer
- Cloud Sync — what the sync trio replicates
- OpenRouter provider — personal OpenRouter keys (not cmem.ai)

