Lore Documentation

Everything you need to get started with Lore, the AI coding agent that remembers your project.

Installation

Lore ships as a single binary. No dependencies, no runtime, no IDE required.

Download

Grab the latest release for your platform:

PlatformArchitectureFile
Windowsx64lore_windows_amd64.zip
WindowsARM64lore_windows_arm64.zip
macOSIntellore_darwin_amd64.tar.gz
macOSApple Siliconlore_darwin_arm64.tar.gz
Linuxx64lore_linux_amd64.tar.gz
LinuxARM64lore_linux_arm64.tar.gz

Install (macOS / Linux)

# Extract and move to your PATH
tar -xzf lore_*.tar.gz
sudo mv lore /usr/local/bin/
lore --version

Install (Windows)

# Extract the zip, then add the folder to your PATH
# Or just run lore.exe directly from the extracted folder
.\lore.exe --version

Authentication

After purchasing a plan, you'll receive a license key. Authenticate your CLI:

lore auth login --key YOUR-LICENSE-KEY-UUID

Check your current auth status:

lore auth status

This shows your tier, token cap, and current usage. To log out:

lore auth logout
How to get your license key: After paying on the checkout page, your license is created automatically. Visit /v1/license/retrieve?email=YOUR_EMAIL on the API to retrieve your key, or check your email.

Quick start

Three commands to go from zero to productive:

# 1. Authenticate
lore auth login --key YOUR-KEY

# 2. Initialize your project (scans codebase, builds wiki)
cd your-project/
lore init

# 3. Start coding
lore

That's it. Lore scans your project, builds a wiki, and you're chatting with full project context. Every session after this starts with all prior knowledge loaded automatically.

Wiki memory

Lore's core differentiator. A .lore/ directory at your project root that stores everything Lore learns about your codebase. It's human-readable, git-tracked, and yours forever.

How it works

When you run lore init, Lore scans your project directory (skipping node_modules, .git, etc.), collects file structure and code samples, and generates wiki pages covering your architecture, conventions, and patterns.

Every time you exit a session (/exit), Lore compiles the conversation into wiki updates. New decisions get recorded. New patterns get documented. The wiki grows organically.

Next session, Lore loads the wiki automatically. Session 50 has the full context of sessions 1 through 49.

Wikilinks

Lore uses [[wikilinks]] to reference wiki pages. When it mentions [[architecture/overview]], it's pulling context from your wiki. If a referenced page exists but wasn't loaded at session start, Lore loads it dynamically mid-conversation.

Session lifecycle

# The lifecycle of every session:
1. Init     Scan project, generate wiki (first time only)
2. Start    Load index + conventions + architecture (~500-2000 tokens)
3. Chat     Full project knowledge, dynamic wikilink loading
4. Changes  Model generates code, diff preview, you approve, snapshot, apply
5. Exit     Wiki compile, update/create pages, log entry, session summary
6. Next     Full context from all previous sessions. Zero re-explanation.

Teach mode

Lore doesn't just write code. It teaches you what it did and why. Three depth levels:

LevelWhat you get
briefOne-line explanation of the approach
standardReasoning, patterns used, trade-offs considered
deepFull breakdown with alternatives, edge cases, and learning resources

Set it via slash command or config:

# During a session
/teach standard

# Or set a default in config
# ~/.lore/config.toml
[teach]
mode = "standard"

Learning docs are auto-saved to .lore/learnings/ with YAML front-matter. Export as PDF:

lore export-learning --all       # combined PDF with TOC
lore export-learning my-topic   # single learning doc

Diff preview + rollback

Every code change Lore proposes gets a visual diff before you approve it. You always see exactly what's changing.

When a change is proposed, you get four options:

[a]pply    Apply the changes
[p]review  See a detailed line-by-line diff
[r]eject   Discard the changes
[t]each    Explain what this code does

Before every apply, Lore creates a git snapshot commit (prefixed lore-snapshot:). If something goes wrong:

lore history            # see recent snapshots
lore rollback           # interactive restore
lore rollback --last    # restore most recent snapshot

Budget + cost metering

Lore shows your token spend in real-time and enforces hard budget caps.

# See your spending
/cost      # today / weekly / monthly / session breakdown
/budget    # budget status with progress bar

Configure your monthly cap in ~/.lore/config.toml:

[budget]
monthly_cap = 5.00    # hard cap in USD
warn_at = 80          # warning at 80% usage

When you hit the cap, requests are blocked until the next month. The monthly counter resets automatically on the first of each month.

Server-side usage tracking ensures your tier's token limit is also enforced at the API level.

Self-check

After applying code changes, Lore can automatically run your build/test command to verify nothing broke.

# Toggle during a session
/selfcheck on
/selfcheck off

Lore auto-detects your project type:

File detectedCommand run
go.modgo build ./...
package.jsonnpm run build
Cargo.tomlcargo build
requirements.txtpython -m py_compile

If the build fails, Lore offers to fix the error automatically (up to 3 retries). After 3 failures, it auto-rolls back to the pre-apply snapshot.

CLI commands

CommandDescription
loreStart interactive REPL (default)
lore initScan project and generate wiki
lore auth loginAuthenticate with license key
lore auth statusShow current tier and usage
lore auth logoutClear stored license key
lore historyShow git snapshots
lore rollbackInteractive snapshot restore
lore rollback --lastRestore most recent snapshot
lore export-learning <slug>Export single learning as PDF
lore export-learning --allExport all learnings as combined PDF
lore --versionShow version

Slash commands

Use these inside the interactive REPL:

CommandDescription
/exit / /quitExit with wiki compile + session summary
/clearClear chat display
/costCost breakdown (today / weekly / monthly / session)
/budgetBudget status with progress bar
/wiki statusPage count, sizes, stale flags, health
/wiki search <query>Search wiki (case-insensitive, highlighted)
/wiki read <page>Render page with related wikilinks
/wiki lintCheck broken file refs + wikilinks
/teachShow current teach mode
/teach off|brief|standard|deepSet teach mode
/learningsList saved learning docs
/selfcheck on|offToggle self-check
/historyShow git snapshots
/rollbackRestore to a snapshot
/helpShow all commands

Configuration

Lore uses a TOML config file at ~/.lore/config.toml:

# API connection
api_url = "https://lore-proxy.lore-api.workers.dev"
license_key = "your-license-key-uuid"

# Budget
[budget]
monthly_cap = 5.00    # USD, 0 = unlimited
warn_at = 80          # percentage

# Teach mode default
[teach]
mode = "off"          # off | brief | standard | deep

# Display
[display]
show_token_meter = true

# Self-check
[selfcheck]
enabled = true

Wiki structure

The .lore/ directory at your project root:

.lore/
  index.md              # Master catalog (auto-generated)
  log.md                # Append-only session timeline
  schema.md             # Wiki maintenance rules
  conventions.md        # Naming, patterns (auto-generated)
  architecture/
    overview.md         # System architecture (auto-generated)
  entities/             # Domain entities
  decisions/            # Architecture decision records
  bugs/                 # Bug records
  learnings/            # Teach mode output (auto-saved)

All wiki pages are Markdown, human-readable, and git-tracked. You can edit them manually and Lore will respect your changes in the next session.

Tip: Commit your .lore/ directory to git. It's part of your project's knowledge base and should be shared with your team.