luminaria
v0.6.3
Published
Luminaria — AI productivity platform CLI (Memo, sync, and more)
Maintainers
Readme
luminaria
Claude Code session sync plugin for Luminaria.
Automatically syncs your Claude Code sessions to your Luminaria knowledge base
after every coding session, using Claude Code's SessionEnd hook.
Requirements
- Node.js 18+
- A Luminaria account with an API key
Installation
npm install -g luminariaSetup
Run the interactive setup to configure your API key and install the hook:
luminaria setupThis will:
- Ask for your Luminaria API key (get one from Settings > API Keys)
- Set the server URL (defaults to production)
- Save config to
~/.luminaria/config.json - Automatically add the
SessionEndhook to~/.claude/settings.json
After setup, sessions sync automatically when they end.
Usage
Automatic (hook mode)
Once setup is complete, luminaria runs automatically when a Claude Code
session ends. No manual action needed. Errors are logged to stderr and never
interrupt your coding session.
Sync all existing sessions
Import all Claude Code sessions at once:
luminaria --allSync a specific file
luminaria --path ~/.claude/projects/my-project/session-abc123.jsonlHelp
luminariaConfiguration
Config is stored at ~/.luminaria/config.json:
{
"api_key": "luminaria_...",
"server_url": "https://api.luminaria.so"
}Two Claude accounts on one machine
Every Claude account on a machine writes its sessions to the same
~/.claude/projects/ folder. To send each account's sessions to its own Memo
account, give each Claude account its own Memo API key:
luminaria accounts # Claude accounts found here, and which key each syncs with
luminaria accounts add be79dcd9 # first 8+ characters of the ID; asks for the key
luminaria accounts remove be79dcd9 # back to the default keyThe plugin tells the accounts apart the way Claude does:
- Claude Desktop sessions: Desktop files each one under the account that ran it, and the plugin reads that.
- Terminal sessions (not in Desktop's list): when a session ends, the
end-of-session sync reads the account signed in to
claudein a terminal (~/.claude.json, or$CLAUDE_CONFIG_DIR/.claude.json) and remembers it in~/.luminaria/session-accounts.json. Later syncs use that. - Anything else — terminal sessions from before this version, or ones
that never went through the end-of-session sync — uses the top-level
api_key. The current terminal sign-in is not used for them: it says who is signed in now, not who ran an older session.
An account without its own key uses the top-level api_key. With no
top-level key, its sessions are skipped and the sync says so.
After accounts add, the next luminaria sync sends that account's sessions
to its own Memo account, including ones already synced with the default key.
Those earlier copies stay in the default Memo account: delete them there if
you don't want them in both.
The sync remembers where each session went (the default key, or an
account's own key), not the key itself. Replacing a key with a new one for
the same Memo account, through setup or accounts add, doesn't re-send
anything. If a new key belongs to a different Memo account, only new and
changed sessions go there.
Keys are saved in config.json:
{
"api_key": "luminaria_...",
"accounts": {
"be79dcd9-...": { "api_key": "luminaria_...", "label": "work" }
}
}Each Claude account also needs its own Memo connector in Claude, signed in to the matching Memo account, for Memo search inside Claude.
How it works
- Claude Code fires a
SessionEndhook event when a session closes - The plugin reads the session transcript (JSONL file)
- It POSTs the content to Luminaria's
/api/v1/syncendpoint - Luminaria creates atoms in your knowledge graph, deduplicating by UUID
Re-syncing the same session is safe — existing atoms are skipped, new ones are added.
Hook configuration
The setup command adds this to ~/.claude/settings.json:
{
"hooks": {
"SessionEnd": [
{
"type": "command",
"command": "luminaria"
}
]
}
}License
MIT
