CLI Reference
Every command supports --json for machine-readable output on stdout. Human-readable output goes to stderr.
Commands
| Command | Description |
|---|---|
lore | Launch interactive TUI |
lore init | Initialize .lore/ repository |
lore ingest <path|url> | Ingest file or URL into raw/ |
lore compile [--force] | Compile changed raw sources into wiki articles (hash-based incremental, lock-guarded) |
lore index [--repair] | Rebuild FTS5 index + index.md (optional manifest repair from raw/) |
lore query "<q>" [--no-file-back] [--normalize-question] | BFS/DFS + LLM Q&A |
lore search "<term>" [--limit N] | FTS5/BM25 search |
lore path "<A>" "<B>" | Shortest path between articles |
lore explain "<concept>" | Deep-dive on a concept |
lore lint | Wiki health checks + structured diagnostics |
lore watch | Watch raw/ and wiki/ and auto-compile raw changes |
lore angela [install|run] | Git commit capture |
lore export <format> [--out dir] | Export wiki |
lore mcp | Start MCP server |
lore status | Repo health dashboard |
lore settings | Configure API keys and model |
Common Flags and Behaviors
--json: structured machine output on stdout.- human mode: operational summaries on stderr; primary text output on stdout where relevant.
lore ingest --json: includes duplicate indicator when content already exists.lore compile: uses hash-based incremental compile, skipping unchanged extracted content viamanifest.jsonextractedHashvalues.lore compile --force: bypasses hash skipping and recompiles all valid raw entries.lore compile: guarded by.lore/compile.lockto prevent concurrent runs.lore index --repair: reconstructs missing manifest entries before rebuild.lore lint --json: includes line-awarediagnostics[]entries withrule,severity,file, optionalline, andmessage.lore watch: debounces raw changes, runs compile automatically, and queues one additional pass when changes land during compile.lore query --normalize-question: conservative typo cleanup while preserving technical tokens.
Guide links:
lore init: Quickstartlore ingest: Ingesting Contentlore compile: Compiling Your Wikilore search: Searching and Queryinglore query: Searching and Queryinglore explain: Explain Commandlore lint: Linting and Healthlore watch: Compiling Your Wikilore export: Exportinglore angela: Lore Angelalore mcp: MCP Serverlore settings: Configuration- troubleshooting workflows: Troubleshooting
- repository operating patterns: Best Practices
Examples:
lore ingest ./docs/architecture.md --json
lore index --repair --json
lore query "teh qurey about src/core/mcp.ts" --normalize-question --json
Settings Command
Interactive mode:
lore settings
Non-interactive mode:
lore settings list [--scope global|repo|all] [--json]
lore settings get [key] [--scope global|repo|all] [--json]
lore settings set <key> <value> [--scope global|repo|all]
lore settings unset <key> [--scope global|repo|all]
Common keys:
- Global:
openrouterApiKey,replicateApiToken,cloudflareAccountId,cloudflareToken - Repo:
model,temperature,maxTokens(optional),webExporter
Notes:
lore settings unset maxTokens --scope reporemoves the explicit token cap.- When
maxTokensis unset, Lore omitsmax_tokensin LLM requests.
Run Logs
lore ingest,lore compile, andlore querycreate JSONL logs in.lore/logs/<runId>.jsonl.- Human mode prints run start/end summaries (including
runIdand log path) to stderr. - JSON mode includes
runIdandlogPathin command output. - Logs are rotated automatically; configure retention with
LORE_LOG_MAX_FILES.
Notes for Automation
- Prefer
--jsonfor scripting. - Prefer
lore lint --jsonand treatdiagnosticsseverity=errorfindings as hard failures. - For deterministic maintenance pipelines, run in this order:
lore ingest ...lore compilelore index --repairlore lint --json
Exit Codes
0-- success1-- error