CLI Reference
Complete reference for all Lore CLI commands.
Setup & Auth
| Command | Description |
|---|
lore setup | Guided wizard — configure API keys, sign in, create data repo |
lore setup --openai-key <key> --anthropic-key <key> --email <email> | Non-interactive setup (sends OTP, exits) |
lore setup ... --code <code> | Complete non-interactive setup with OTP code |
lore auth login | Sign in with email OTP |
lore auth login -e user@example.com | Sign in with specified email |
lore auth login -e user@example.com --send-only | Send OTP and exit |
lore auth login -e user@example.com --code <code> | Verify OTP non-interactively |
lore auth logout | Clear session |
lore auth whoami | Show current authentication status |
Search & Research
| Command | Description |
|---|
lore search <query> | Hybrid search (semantic + keyword) |
lore search <query> --mode semantic | Vector similarity only |
lore search <query> --mode keyword | Full-text search only |
lore search <query> --project <name> | Filter to project |
lore search <query> --since 7d | Only sources from last 7 days |
lore search <query> --since "last week" --before 2025-01-01 | Date range filter |
lore search <query> --sort recent | Sort by date instead of relevance |
lore research <query> | AI-powered deep research (standard depth) |
lore research <query> --depth quick | Quick research (~30-60s, 3-5 sources) |
lore research <query> --depth deep | Exhaustive research (~4-8 min) |
lore ask <question> | AI-powered Q&A — searches sources, synthesizes answer with citations |
lore browse | Interactive TUI browser with edit, search, and re-indexing |
Project Briefs
| Command | Description |
|---|
lore brief <project> | View the current brief for a project |
lore brief generate <project> | Generate or refresh a project brief |
lore brief generate <project> --focus "UX" | Generate with a specific focus area |
lore brief list | List all briefs with staleness info |
lore brief history <project> | Show version history |
lore brief diff <project> | Compare latest brief with previous version |
Project briefs are living synthesis documents that evolve as new sources enter. They track current state, key evidence with citations, open questions, and project trajectory. Briefs auto-update when new content is ingested into a project (with a 5-second debounce), so they stay current without manual intervention.
Project Context & Corrections
| Command | Description |
|---|
lore context add <project> | Add project knowledge into ./.lore/ for coding agents |
lore context add <project> --target <repo> | Add Lore context to a specific repo or workspace |
lore context add <project> --limit <n> | Add a smaller working copy for a narrow task |
lore context list | Show repos with daemon-managed Lore context |
lore context status | Show clean, modified, missing, stale, deleted, and conflicted snapshots |
lore context remove | Remove the generated .lore/ working copy from the repo |
lore corrections list | List active and recent correction proposals |
lore corrections diff [id] | Show colorized correction diffs; omit id to show all active diffs |
lore corrections approve <id> | Apply a reviewed correction to canonical Lore and re-index one source |
lore corrections reject <id> | Discard a proposal and refresh/remove the working snapshot; restore is an alias |
lore corrections reconcile <id> | Use AI to create a merged proposal for conflicted corrections |
lore browse --context-target <repo> | Open Browse with that repo's correction inbox |
lore context add includes all non-deleted project sources by default, writes copied snapshots instead of symlinks, and registers the repo for daemon refresh. It also writes .lore/.gitignore so generated context stays out of the host repo unless you intentionally change that. Empty projects are allowed: Lore creates the scaffold now and the daemon populates it after sources for that project exist.
A repo-local .lore/ working copy currently tracks one Lore project. Running lore context add <other-project> replaces clean context; active proposals must be reviewed or explicitly discarded with --force.
lore context remove is the safe off switch. It unregisters daemon refresh, removes only the generated working copy, refuses to discard active proposals unless you pass --force, and leaves canonical Lore unchanged.
Ingest
| Command | Description |
|---|
lore ingest "content" | Ingest inline content |
lore ingest --file ./notes.md | Ingest from a file |
echo "..." | lore ingest | Ingest from stdin/pipe |
lore ingest "content" -p myproject -t "My Title" | With project and title |
lore ingest --file doc.md --type meeting --url https://... | With metadata |
Log
| Command | Description |
|---|
lore log "message" -p <project> | Add a log entry |
lore log update <id> <message> | Update a log entry |
lore log delete <id> | Delete a log entry |
lore log show -p <project> | Show log entries |
lore log clear -p <project> | Clear all log entries for a project |
Log entries are lightweight status updates, decisions, and progress notes. They are searchable via search and included in project briefs, but hidden from list_sources by default.
Sync & Sources
| Command | Description |
|---|
lore sync | Sync all configured sources |
lore sync --dry-run | Preview what would sync |
lore sync add | Add a source directory (interactive) |
lore sync add --name "Notes" --path ~/notes --project notes | Add non-interactively (syncs all files) |
lore sync add --name "Docs" --path ~/docs --glob "**/*.md" --project docs | Add with specific file type filter |
lore sync enable <name> | Enable a sync source |
lore sync disable <name> | Disable a sync source |
lore sync remove <name> | Remove a sync source |
lore sync list | List configured source directories |
lore sync start | Start background sync daemon |
lore sync stop | Stop background sync daemon |
lore sync restart | Restart daemon (picks up new config) |
lore sync status | Show daemon status, last sync info, and context refresh counts |
lore sync logs | View daemon log file (last 50 lines) |
lore sync logs -f | Follow daemon logs in real-time |
lore sync watch | Watch directories and sync in foreground (live output) |
lore sync repair | Repair generated data-repo metadata and deletion cache state |
lore sync repair --dry-run | Preview safe repairs without changing files |
lore sync repair --no-push | Apply local repairs without pushing optional Git history |
Supported file formats: Markdown, JSON, JSONL, plain text, CSV, HTML, XML, PDF, and images (JPEG, PNG, GIF, WebP). The default glob is **/* (all files). Use --glob to restrict to specific types.
Lore Cloud/Supabase is the primary sync layer. Git in LORE_DATA_DIR is optional local history; generated files such as sources/.paths.json and deleted-hashes.json are caches and should not block daemon refresh. If lore sync status reports repair-needed Git state, run lore sync repair.
Documents
| Command | Description |
|---|
lore docs list | List all indexed documents |
lore docs list --deleted | List soft-deleted documents (with deletion dates) |
lore docs get <id> | View a document by ID |
lore docs create <content> -p <project> | Create a note or insight |
lore docs delete <id> | Soft-delete a document (recoverable) |
lore docs restore <id> | Restore a soft-deleted document |
Deleted documents are excluded from search, briefs, and list results. They can be restored at any time with lore docs restore.
Projects
| Command | Description |
|---|
lore projects | List all projects with source counts |
lore projects archive <name> | Archive a project |
lore projects delete <name> | Delete a project and all its documents |
MCP Server
| Command | Description |
|---|
lore mcp | Start the MCP server (for AI tool integration) |
Skills
| Command | Description |
|---|
lore skills list | List available agent skills |
lore skills install <name> | Install a skill |
lore skills show <name> | Show skill details |
Browse TUI
lore browse opens a split-pane terminal UI with Vim-style navigation.
List view:
| Key | Action |
|---|
j / k | Navigate up/down |
Enter | Open document in full view |
/ | Hybrid search (semantic + keyword) |
: | Regex search (grep local files) |
a | Ask a question (AI-powered Q&A) |
R | Research mode (agentic deep research) |
p | Filter by project |
c | Filter by content type |
t | Change content type |
L | Toggle log entries |
m | Move document to another project |
i | Edit document title |
e | Edit in $EDITOR — saves changes to disk and re-indexes (summary, embedding) in the background |
u | Open the correction inbox for the current context target |
s | Sync now |
Tab | Toggle flat/grouped view |
Ctrl-p | Show all projects |
Ctrl-c | Clear type filter |
Del | Delete document or project |
q / Esc | Quit |
? | Help |
Document view:
| Key | Action |
|---|
j / k | Scroll |
/ | Search within document (regex) |
n / N | Next/previous match |
y | Copy to clipboard |
e | Edit in $EDITOR |
q / Esc | Back to list |
Updates
| Command | Description |
|---|
lore update | Check for and install the latest version, restart daemon |
lore update --check | Check for updates without installing |
Environment Variables
These can be set via environment or via lore setup (stored in ~/.config/lore/config.json):
| Variable | Description |
|---|
OPENAI_API_KEY | Required for embeddings |
ANTHROPIC_API_KEY | Required for research agent and sync |
SUPABASE_URL | Supabase project URL (has default) |
SUPABASE_PUBLISHABLE_KEY | Supabase publishable key (has default) |
SUPABASE_SERVICE_KEY | Service key — bypasses RLS, env-only |
LORE_DATA_DIR | Data directory path (default: ~/.lore) |
LORE_AUTO_GIT_PULL | Auto git pull every 5 min (default: true) |
LORE_AUTO_INDEX | Auto-index new sources (default: true) |