CLI Reference
The Lore CLI (@lore/cli) lets you authenticate, capture knowledge, and manage workspaces from your terminal.
Installation
npm install -g @lore/cli
This installs the lore command globally.
Commands
lore login
Authenticate via browser SSO and select your active workspace.
lore login
Opens your browser to complete authentication. On success, a Personal Access Token and workspace list are saved to ~/.lore/config.json.
If you're running Lore locally, pass a custom URL:
lore login --url http://localhost:3001
lore setup is an alias for lore login.
lore capture
Send a text snippet to the Lore ingestion API.
lore capture "Redis failover: switch to replica-2, then promote via redis-cli"
You can also pipe content from stdin:
echo "Deploy note: always run migrations first" | lore capture
pbpaste | lore capture
cat incident-notes.txt | lore capture
Pass - explicitly to read from stdin:
lore capture -
Requires authentication (lore login) and an active workspace.
lore workspace list
Show all cached workspaces. The active workspace is marked with *.
lore workspace list
* acme-eng Acme Engineering owner
acme-platform Acme Platform editor
lore workspace use <slug>
Switch the active workspace.
lore workspace use acme-platform
lore workspace show
Display the currently active workspace.
lore workspace show
Workspace: Acme Engineering
Slug: acme-eng
Role: owner
Configuration
The CLI stores credentials and workspace state in ~/.lore/config.json:
{
"personalToken": "...",
"apiUrl": "https://lorehq.co",
"activeWorkspace": "acme-eng",
"workspaces": [
{ "slug": "acme-eng", "name": "Acme Engineering", "role": "owner" }
]
}
Environment variables
You can override config file values with environment variables. This is useful for CI/CD and automation:
| Variable | Description |
|---|---|
LORE_PAT | Personal Access Token (overrides personalToken in config) |
LORE_API_KEY | Alias for LORE_PAT (backwards compatibility) |
LORE_API_URL | API base URL (overrides apiUrl in config) |
LORE_WORKSPACE | Workspace slug (overrides activeWorkspace in config) |
Next steps
- API Reference — Programmatic access to documents and search
- MCP Integration — Connect AI agents to Lore