← 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)

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 walks through seven steps:

  1. API Keys — Enter your OpenAI and Anthropic keys
  2. Login — Sign in with your email via one-time code
  3. Data Repository — Create a local data directory (defaults to ~/.lore). If gh CLI is available, it auto-creates a private GitHub repo for cross-machine sync
  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.

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

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

  • MCP Setup — Connect Lore to Claude Code, Claude Desktop, Cursor, etc.
  • Agent Guide — How AI agents should use Lore (non-interactive setup, MCP tools, workflows)
  • MCP Tools Reference — All 9 tools with parameters