CLI Reference
Command-line interface for searching, reading, writing, and managing knowledge bases.
All commands support --format json for agent consumption.
Search
# Keyword search
pyrite search "immigration policy"
# Scoped to a KB, type, and mode
pyrite search "immigration" --kb=timeline --type=event --mode=hybrid
# Semantic search (vector similarity)
pyrite search "career transition" --mode=semantic
Read
# Get an entry by ID
pyrite get stephen-miller
# Find what links to an entry
pyrite backlinks stephen-miller --kb=research
# Browse by time
pyrite timeline --from=2025-01-01 --to=2025-06-30
# List collections
pyrite collections list --kb=research
Write
# Create an entry
pyrite create --kb=research --type=person --title="Jane Doe" \
--body="Senior policy advisor." --tags="policy,doj"
Admin
# Re-index after editing files directly
pyrite index sync
# Check for stale or missing entries
pyrite index health
# Auto-discover KBs by kb.yaml presence
pyrite kb discover
Schema management
# Show type versions and field changes
pyrite schema diff --kb=research
# Apply migrations to entries
pyrite schema migrate --kb=research
Deploy
# Self-host on a VPS
git clone https://github.com/markramm/pyrite.git && cd pyrite
bash deploy/selfhost/setup.sh kb.example.com
Install extras
pip install pyrite # Core
pip install "pyrite[all]" # Everything
pip install "pyrite[ai]" # LLM providers
pip install "pyrite[semantic]" # Vector search