Skip to content

Data Storage

All Lore data stays on your machine by default. Optional sync copies encrypted sessions into git stores you control. There is no hosted service.

~/.lore/
├── lore.db # SQLite database
├── config.yaml # Configuration
├── logs/ # Daemon logs
├── sync/ # Global personal store (git repo, encrypted)
└── sync-keys/ # Derived encryption keys (file backend, 0600)

When sync is enabled, encrypted sessions live in git:

LocationContents
refs/lore/sessionsPer-repo store, held inside the project’s own git repository. Contains only that repo’s sessions, encrypted. The ref lives outside refs/heads and is never checked out.
~/.lore/syncGlobal personal store, a standalone git repo synced to a private remote. Holds all of your sessions across every tool and repo, encrypted.
~/.lore/sync-keys/Derived encryption keys when the file backend is used (use_keychain = false). Files are written with 0600 permissions. With the keychain backend, keys are stored in the OS keychain instead.

Session content in both stores is gzipped and encrypted with AES-256-GCM before it is written to git. See Security for details.

The SQLite database contains:

  • sessions: ID, tool, timestamps, working directory, message count, machine ID
  • messages: ID, session ID, role (user/assistant), content, timestamp
  • session_links: Maps session IDs to git commit SHAs
  • tags: Labels attached to sessions
  • annotations: Notes/bookmarks on sessions
  • summaries: Session summaries for quick reference
  • memories: Read-only mirror of a coding tool’s per-project memory store

The memories table holds a read-only mirror of a coding tool’s per-project memory store (currently Claude Code). Lore reads the tool’s memory folder and reflects it into the database, scoped per project; it never creates, modifies, or deletes the source files. The mirror is refreshed on read whenever you run lore memories or query the memory MCP tools, so it always matches the current folder. See Cross-Tool Memory for details.

Message content is indexed using SQLite FTS5 for fast full-text search.

Terminal window
# View statistics
lore db stats
# Reclaim unused space
lore db vacuum
# Delete old sessions
lore db prune --older-than 90d --dry-run
lore db prune --older-than 90d --force

Delete a single session:

Terminal window
lore delete <session-id>

This removes the session, its messages, and any commit links.

The database is a single SQLite file. To backup:

Terminal window
cp ~/.lore/lore.db ~/.lore/lore.db.backup