Skip to main content

Module path

Module path 

Source
Expand description

Database file path resolution.

The storage engine needs to know where to put the SQLite file. This module resolves the path from three sources, in priority order:

  1. Explicit config: [store] path in mcpr.toml — user chose a specific location.
  2. Environment variable: MCPR_DB — useful for CI, Docker, or per-session overrides.
  3. Default: ~/.mcpr/store.db — all mcpr state lives under ~/.mcpr/.

The parent directory is created automatically if it doesn’t exist.

Functions§

ensure_parent_dir
Ensure the parent directory of the given path exists.
resolve_db_path
Resolve the database file path.