Skip to Content
LoreHub is now in open beta! 🎉
DocsGetting Started

Getting Started

Get LoreHub up and running in minutes.

Requirements

LoreHub requires Node.js 18 or higher and works on macOS, Linux, and Windows.

Installation

npm install -g lorehub

Verify the installation:

lh --version

First Run

Launch LoreHub

Simply run:

lh

This opens the interactive browse interface.

Initial Setup

On first launch, LoreHub will:

  • Create a config directory at ~/.lorehub
  • Initialize a SQLite database
  • Download the embedding model (all-mpnet-base-v2) for semantic search

Add Your First Lore

Try adding some knowledge:

lh add "Use environment variables for configuration, not hardcoded values" -t wisdom -c 95

Browse Your Lores

Return to browse mode to see your lore:

lh

Basic Commands

Here are the essential commands to get started:

Browse Mode

lh browse # Open interactive browser lh browse --current # Current realm only

Add Lores

# Interactive mode (recommended) lh add # Inline mode lh add "Your wisdom here" lh add "Use Redis for session storage" --type decree lh add "User auth tokens expire after 1 hour" --confidence 95
lh search "redis" lh search "cache*" # Wildcard search lh search "database decision" --semantic lh search "auth" --type decree

Keyboard Shortcuts

In browse mode:

KeyAction
↑/↓ or j/kNavigate lores
/Filter (literal search)
mToggle search mode
dDelete selected lore
sView similar lores
?Show help
q or ESCExit

Configuration

LoreHub stores configuration in ~/.lorehub/config.json:

{ "searchMode": "hybrid", "semanticSearchThreshold": 0.5, "defaultConfidence": 80 }

Environment Variables

  • LOREHUB_DB - Database file location (default: ~/.lorehub/lorehub.db)
  • LOREHUB_SEARCH_MODE - Default search mode (literal/semantic/hybrid)

Understanding Realms

LoreHub automatically tracks each codebase as a “realm”. When you add lores, they’re associated with the current directory’s git repository.

lh realm # Show current realm info lh realm list # List all tracked realms lh realm stats # Detailed statistics

What’s Next?

Last updated on