🚧 Expanding soon — full Local SQLite documentation is in progress.
What is the local brain?
When you run bossmode init, the CLI seeds a local SQLite database at ~/.bossmode/brain.db. This database stores:
- Your standing orders
- Buyer profiles and voice calibration
- Directive history and audit feed
- Agent execution logs
- Local signal cache
- Guardian state
The local brain is the single source of truth for local-mode operation. In cloud-connected mode, it syncs bidirectionally with your Convex instance.
Database location
The directory also contains:
~/.bossmode/
brain.db # SQLite database
config.json # CLI configuration
logs/ # Execution logs
exports/ # Report exports
Schema overview
The local brain mirrors the Convex schema. Key tables:
| Table | Description |
|---|
standing_orders | Active and archived standing orders |
directives | All issued directives and their status |
agent_moves | Individual capo execution log |
approvals | Approval gate queue |
signals | Ingested and scored signals |
buyer_profiles | AvatarCzar buyer models |
audit_feed | Full immutable audit log |
daily_reports | Generated report cache |
Direct SQLite access
For power users who want to query directly:
sqlite3 ~/.bossmode/brain.db
# List recent directives
SELECT id, directive, capo, status, created_at
FROM directives
ORDER BY created_at DESC
LIMIT 10;
# Count approvals by status
SELECT status, COUNT(*) FROM approvals GROUP BY status;
Backup and restore
# Backup
bossmode backup --output ~/bossmode-backup-$(date +%Y%m%d).db
# Or direct SQLite copy
cp ~/.bossmode/brain.db ~/bossmode-backup.db
# Restore
bossmode restore --input ~/bossmode-backup.db
Sync to cloud
When you add your operator token, the local brain syncs to Convex automatically:
bossmode sync --token $BOSSMODE_API_TOKEN
Sync is bidirectional. Local changes propagate to cloud. Cloud changes (from other devices or the web app) propagate locally.
SQLite to Convex
The Convex schema in convex/schema.ts mirrors the SQLite structure. If you fork BossMode and modify the schema, update both to keep sync working.