← All Docs

Getting Started

Install Lore, run the setup wizard, and make your first search.

Two Ways to Set Up

Lore is designed for both humans and AI agents. Choose the path that fits:

You, in a terminalAn AI agent
Setuplore setup — guided wizardlore setup --openai-key ... --email ...non-interactive flags
Add sourceslore sync add — guided presetslore sync add --name ... --path ... --project ...
Searchlore search "query" or lore browseMCP search tool (semantic + keyword)
Save knowledgeTell your AI "save this to lore"MCP ingest tool
Deep researchlore research "question"MCP research tool (async, returns job ID)
Use in a code repolore context add <project>Read .lore/context.md and propose corrections in .lore/sources/

Most people start by running the setup wizard, then hand off day-to-day usage to their AI agents via MCP. The Agent Guide covers agent-specific details.

Prerequisites

Install

npm install -g @getlore/cli

Setup Wizard

Run the interactive setup to configure everything:

lore setup

The wizard runs a preflight check, then walks through seven steps:

  1. API Keys — Enter your OpenAI and Anthropic keys. Lore validates each key against the live API and warns you if one is invalid
  2. Login — Sign in with your email via one-time code
  3. Data Directory — Create a local data directory (defaults to ~/.lore). Lore Cloud/Supabase handles cross-machine sync; Git is optional local history
  4. Welcome Document — Seeds your knowledge base so you can search immediately
  5. Sync Sources — Point Lore at directories to watch (meeting notes, project docs, research)
  6. Background Daemon — Start a daemon that watches for new files and indexes them automatically
  7. Agent Skills — Install instruction files for Claude Code, Gemini, Codex, etc.

After all steps, a health check verifies that configuration, authentication, database connectivity, and your data repo are working correctly.

If the optional data repo Git state gets stuck in a conflict, run lore sync repair. It rebuilds generated caches, imports deletion identities to Lore Cloud, and leaves real source-content conflicts for you to resolve intentionally.

Non-Interactive Setup (for agents)

AI agents and scripts can pass flags to skip all interactive prompts. This is a two-step flow because the user needs to retrieve a verification code from their email between steps.

# Step 1: Send OTP (saves config, sends verification email, exits)
lore setup \
  --openai-key sk-... \
  --anthropic-key sk-ant-... \
  --email user@example.com \
  --data-dir ~/.lore

# Step 2: Complete setup with the OTP code from the email
lore setup \
  --openai-key sk-... \
  --anthropic-key sk-ant-... \
  --email user@example.com \
  --code 123456 \
  --data-dir ~/.lore

Agents can also add a sync source in the same command:

lore setup ... --sync-path ~/notes --sync-project meetings

See the Agent Guide for the full agent workflow including secure key handling.

Add Your First Source

Point Lore at a directory of documents:

lore sync add

You'll be asked for a path and project name. Lore validates the directory, counts files, and derives a source name automatically.

Non-interactive (for agents and scripts)

lore sync add --name "Meeting Notes" --path ~/notes --project meetings

By default, Lore syncs all files in the directory (**/*). Supported formats include Markdown, JSON, JSONL, plain text, CSV, HTML, XML, PDF, and images — Claude extracts metadata automatically from each format. To restrict to specific file types, use --glob:

# Only Markdown files
lore sync add --name "Docs" --path ~/docs --glob "**/*.md" --project docs

# Only PDFs
lore sync add --name "Research Papers" --path ~/papers --glob "**/*.pdf" --project research

# Claude Code conversations (JSONL)
lore sync add --name "Conversations" --path ~/claude-conversations --glob "**/*.jsonl" --project dev

Sync and Search

# Sync configured sources (discovery is free, only new files cost API calls)
lore sync

# Search your knowledge base
lore search "user pain points"

# AI-powered deep research across multiple sources
lore research "What should we prioritize?"

# Browse interactively
lore browse

Put Project Context In A Code Repo

When you want Claude Code, Codex, Cursor, or another coding agent to see project knowledge as files:

cd ~/workspace/ridekick
lore context add ridekick

context add creates a local .lore/ working copy with context.md, source snapshots, correction metadata, and agent instructions. It includes all non-deleted project sources by default, uses copied snapshots instead of symlinks, and registers the repo for daemon refresh so clean snapshots stay current after sync cycles. If the project has no sources yet, Lore still creates the scaffold and fills it in after you ingest or sync sources for that project.

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.

Most users should not commit .lore/. Lore writes .lore/.gitignore automatically, and you can also add .lore/ to the repo root .gitignore for clarity.

Review proposed corrections with:

lore context status
lore corrections diff

See Project Context Working Copies for the full workflow.

To see repos with Lore context, run lore context list. To turn this off for a repo later, run lore context remove. It unregisters the repo from daemon refresh, removes only the generated .lore/ folder, and leaves canonical Lore unchanged.

Ingest from AI

Once Lore is connected as an MCP server, you can save knowledge directly from your AI conversations using natural language:

  • "Save this decision to lore"
  • "Ingest these meeting notes into the backend project"
  • "Remember that we chose Postgres over MongoDB for the data layer"

The AI uses the ingest tool behind the scenes. No CLI needed — just tell your AI what to save and which project it belongs to. See MCP Setup to connect Lore to your AI tools.

Upgrading

# Check if a newer version is available
lore update --check

# Install the latest version and restart the daemon
lore update

Lore will also notify you passively when an update is available (at most once per day).

If you use npx -y @getlore/cli instead of a global install, you always get the latest version automatically. But you'll still want to restart the daemon after an update:

lore sync restart

Next Steps