Configuration
CommandLane auto-generates pkb.config.json on first run. This guide covers all configuration options.
Default Configuration
{
"ai_classification_use_tinybert": false,
"ai_classification_model_path": ".models/tinybert-tasknote/",
"watcher_enabled_by_default": false,
"watcher_show_toggle_in_ui": true,
"storage": {
"backend": "sqlite",
"sqlite_db_path": "pkb_data.db"
}
}
Classification Settings
TinyBERT Fast Classification
Enable local ML classification (10-15x faster than LLM):
{
"ai_classification_use_tinybert": true,
"ai_classification_model_path": ".models/tinybert-tasknote/"
}
Benefits:
- 99% accuracy
- 13.3ms average classification time
- No API keys or internet required
- Pre-trained model included
When to use:
- Default for most users
- Offline environments
- High-volume capture (>100 entries/day)
LLM Fallback
Configure optional LLM fallback when TinyBERT is uncertain:
{
"ai_classification_use_llm": true,
"ai_classification_llm_model": "phi3:mini"
}
LLM classification takes 14-31s. Only enable if classification accuracy is critical.
Storage Settings
SQLite Configuration
{
"storage": {
"backend": "sqlite",
"sqlite_db_path": "pkb_data.db",
"enable_fts5": true,
"enable_vector_search": true
}
}
Options:
sqlite_db_path- Database file location (default:pkb_data.db)enable_fts5- Full-text search (default:true)enable_vector_search- Semantic search (default:true)
Export Settings
Optional markdown export:
{
"storage": {
"export_enabled": true,
"export_path": "exports/"
}
}
Watcher Settings
Configure background monitoring:
{
"watcher_enabled_by_default": true,
"watcher_show_toggle_in_ui": true,
"watcher_interval_seconds": 3,
"watcher_cooldown_seconds": 300,
"watcher_max_items": 5
}
Options:
watcher_enabled_by_default- Auto-start with UI (default:false)watcher_show_toggle_in_ui- Show enable/disable toggle (default:true)watcher_interval_seconds- Check frequency (default:3)watcher_cooldown_seconds- Min time between popovers (default:300)watcher_max_items- Max items per popover (default:5)
UI Settings
Customize the capture window:
{
"ui_enabled": true,
"ui_hotkey_keys": ["ctrl", "shift", "c"],
"ui_window_width": 600,
"ui_window_height": 80,
"ui_window_alpha": 0.95,
"ui_animation_duration_ms": 150
}
Options:
ui_enabled- Enable UI features (default:true)ui_hotkey_keys- Global hotkey combo (default:["ctrl", "shift", "c"])ui_window_width- Window width in pixels (default:600)ui_window_height- Window height in pixels (default:80)ui_window_alpha- Transparency 0.0-1.0 (default:0.95)ui_animation_duration_ms- Fade animation speed (default:150)
Search Settings
Tune hybrid search performance:
{
"search": {
"hybrid_weights": [0.3, 0.7],
"rrf_k": 50,
"max_results": 50
}
}
Options:
hybrid_weights-[keyword_weight, semantic_weight](default:[0.3, 0.7])rrf_k- Reciprocal Rank Fusion parameter (default:50)max_results- Max results per backend (default:50)
Tuning Tips:
- Increase keyword weight (e.g.,
[0.5, 0.5]) for exact phrase matching - Increase semantic weight (e.g.,
[0.2, 0.8]) for conceptual search - Lower
rrf_k(e.g.,30) to favor top-ranked results - Higher
rrf_k(e.g.,80) to blend results more evenly
Environment Variables
Override config settings with environment variables:
# UI Settings
$env:PKB_UI_ENABLED = "true"
$env:PKB_UI_HOTKEY_KEYS = "ctrl,shift,c"
$env:PKB_UI_WINDOW_WIDTH = "600"
# AI Settings
$env:OPENAI_API_KEY = "sk-..."
Advanced Configuration
Context-Aware Classification
Configure automatic PARA tagging based on active window:
{
"context": {
"enabled": true,
"contexts_file": "contexts.json"
}
}
See contexts.json.example for configuration format.
Performance Tuning
For large databases (>50k entries):
{
"storage": {
"sqlite_cache_size": 10000,
"sqlite_journal_mode": "WAL",
"sqlite_synchronous": "NORMAL"
},
"rag": {
"background_worker_enabled": true,
"batch_size": 100
}
}
Security Settings
{
"security": {
"max_text_length": 10000,
"validate_inputs": true,
"atomic_writes": true
}
}
Configuration Locations
CommandLane searches for configuration in this order:
./pkb.config.json(project directory)~/.config/animus/pkb.config.json(user config)- Environment variables (highest priority)
Validation
Test your configuration:
# Validate config file
pkb --validate-config
# Show current config (merged from all sources)
pkb --show-config
Common Configurations
Minimal (Offline, No AI)
{
"ai_classification_use_tinybert": true,
"ai_classification_use_llm": false,
"watcher_enabled_by_default": false
}
Performance Optimized
{
"ai_classification_use_tinybert": true,
"search": {
"hybrid_weights": [0.4, 0.6]
},
"storage": {
"sqlite_cache_size": 10000
}
}
Always-On Background
{
"watcher_enabled_by_default": true,
"ui_enabled": true,
"ai_classification_use_tinybert": true
}