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
npm install -g lorehubVerify the installation:
lh --versionFirst Run
Launch LoreHub
Simply run:
lhThis 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 95Browse Your Lores
Return to browse mode to see your lore:
lhBasic Commands
Here are the essential commands to get started:
Browse Mode
lh browse # Open interactive browser
lh browse --current # Current realm onlyAdd 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 95Search
lh search "redis"
lh search "cache*" # Wildcard search
lh search "database decision" --semantic
lh search "auth" --type decreeKeyboard Shortcuts
In browse mode:
| Key | Action |
|---|---|
↑/↓ or j/k | Navigate lores |
/ | Filter (literal search) |
m | Toggle search mode |
d | Delete selected lore |
s | View similar lores |
? | Show help |
q or ESC | Exit |
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 statisticsWhat’s Next?
- Learn about Core Concepts like lores, realms, and search modes
- Explore all Commands in detail
- Read Guides for best practices
- Set up Integrations with your workflow
Last updated on