Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Database

Nexus uses a single SQLite database at ~/.local/share/nexus/nexus.db.

Configuration

  • WAL mode for concurrent reads
  • 64 MB cache (cache_size = -65536)
  • 256 MB mmap (mmap_size = 268435456)
  • Parameterized queries only — no string interpolation

Tables

TablePurpose
filesIndexed home directory entries (path, name, size, category, hash, timestamps)
files_ftsFTS5 virtual table for full-text search (indexes path and name)
scansScan history (start time, end time, file count, status)
config_toolsDiscovered tools in ~/.config (name, path, language)
config_filesIndividual config files with blake3 content hashes
config_snapshotsBackup metadata (timestamp, tool, size)
snapshot_filesGzip-compressed file contents (BLOBs)
file_changesFilesystem change log from the watcher daemon
ai_queriesAI query history (query, response, model, tokens)

The files_fts table uses SQLite FTS5 for instant full-text search. It indexes file paths and names, supporting:

  • Phrase queries: "nvim config"
  • Prefix queries: rust*
  • Boolean operators: nvim AND lua
  • Column filtering: path:projects

Migrations

All schema migrations are versioned in the core::db module and run automatically on first database open.