Expand description
Opens the CLI’s database for mutating commands, seeds the built-in and user-catalog
DCS/PLC templates, and runs the retention sweep. Read-only commands such as
bhtune check use a separate connection that skips bootstrap and retention.
Functions§
- open
- Opens (creating if necessary) the database at
path, running migrations, then upserts the built-in templates viabhtune_db::seed_builtin_templatesso a fresh database is immediately usable without a separate setup step. Ifuser_templatesisSome(the caller found and parsed a user catalog file – seecrate::config::load_user_templates), those templates are additionally upserted withTemplateOrigin::Catalogviabhtune_db::seed_templates.Nonemeans no user catalog file was found at all, which is not an error and simply skips this second seed pass – the common case, since most installs never createtemplates.toml. - open_
demo - Opens the Demo database without running the Full-mode live-orphan recovery sweep.
- open_
read_ only - Opens an existing database for inspection without creating directories, applying migrations, seeding templates, or running retention.