← All Docs

CLI Reference

Complete reference for all Lore CLI commands.

Setup & Auth

CommandDescription
lore setupGuided 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 loginSign in with email OTP
lore auth login -e user@example.comSign in with specified email
lore auth login -e user@example.com --send-onlySend OTP and exit
lore auth login -e user@example.com --code <code>Verify OTP non-interactively
lore auth logoutClear session
lore auth whoamiShow current authentication status

Search & Research

CommandDescription
lore search <query>Hybrid search (semantic + keyword)
lore search <query> --mode semanticVector similarity only
lore search <query> --mode keywordFull-text search only
lore search <query> --project <name>Filter to project
lore search <query> --since 7dOnly sources from last 7 days
lore search <query> --since "last week" --before 2025-01-01Date range filter
lore search <query> --sort recentSort by date instead of relevance
lore research <query>AI-powered deep research (standard depth)
lore research <query> --depth quickQuick research (~30-60s, 3-5 sources)
lore research <query> --depth deepExhaustive research (~4-8 min)
lore ask <question>AI-powered Q&A — searches sources, synthesizes answer with citations
lore browseInteractive TUI browser with edit, search, and re-indexing

Project Briefs

CommandDescription
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 listList 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

CommandDescription
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 listShow repos with daemon-managed Lore context
lore context statusShow clean, modified, missing, stale, deleted, and conflicted snapshots
lore context removeRemove the generated .lore/ working copy from the repo
lore corrections listList 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

CommandDescription
lore ingest "content"Ingest inline content
lore ingest --file ./notes.mdIngest from a file
echo "..." | lore ingestIngest 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

CommandDescription
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

CommandDescription
lore syncSync all configured sources
lore sync --dry-runPreview what would sync
lore sync addAdd a source directory (interactive)
lore sync add --name "Notes" --path ~/notes --project notesAdd non-interactively (syncs all files)
lore sync add --name "Docs" --path ~/docs --glob "**/*.md" --project docsAdd 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 listList configured source directories
lore sync startStart background sync daemon
lore sync stopStop background sync daemon
lore sync restartRestart daemon (picks up new config)
lore sync statusShow daemon status, last sync info, and context refresh counts
lore sync logsView daemon log file (last 50 lines)
lore sync logs -fFollow daemon logs in real-time
lore sync watchWatch directories and sync in foreground (live output)
lore sync repairRepair generated data-repo metadata and deletion cache state
lore sync repair --dry-runPreview safe repairs without changing files
lore sync repair --no-pushApply 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

CommandDescription
lore docs listList all indexed documents
lore docs list --deletedList 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

CommandDescription
lore projectsList 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

CommandDescription
lore mcpStart the MCP server (for AI tool integration)

Skills

CommandDescription
lore skills listList 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:

KeyAction
j / kNavigate up/down
EnterOpen document in full view
/Hybrid search (semantic + keyword)
:Regex search (grep local files)
aAsk a question (AI-powered Q&A)
RResearch mode (agentic deep research)
pFilter by project
cFilter by content type
tChange content type
LToggle log entries
mMove document to another project
iEdit document title
eEdit in $EDITOR — saves changes to disk and re-indexes (summary, embedding) in the background
uOpen the correction inbox for the current context target
sSync now
TabToggle flat/grouped view
Ctrl-pShow all projects
Ctrl-cClear type filter
DelDelete document or project
q / EscQuit
?Help

Document view:

KeyAction
j / kScroll
/Search within document (regex)
n / NNext/previous match
yCopy to clipboard
eEdit in $EDITOR
q / EscBack to list

Updates

CommandDescription
lore updateCheck for and install the latest version, restart daemon
lore update --checkCheck for updates without installing

Environment Variables

These can be set via environment or via lore setup (stored in ~/.config/lore/config.json):

VariableDescription
OPENAI_API_KEYRequired for embeddings
ANTHROPIC_API_KEYRequired for research agent and sync
SUPABASE_URLSupabase project URL (has default)
SUPABASE_PUBLISHABLE_KEYSupabase publishable key (has default)
SUPABASE_SERVICE_KEYService key — bypasses RLS, env-only
LORE_DATA_DIRData directory path (default: ~/.lore)
LORE_AUTO_GIT_PULLAuto git pull every 5 min (default: true)
LORE_AUTO_INDEXAuto-index new sources (default: true)