dbmd-cli-0.2.1 is not a library.
dbmd — the reference command-line tool for db.md, the open database in
plain files.
This binary is a thin wrapper: it parses arguments (clap), builds the
global [Context], dispatches to the matching subcommand body in [cmd],
and maps the result to the stable exit-code convention. All toolkit logic
lives in dbmd-core — keep main.rs, [cli], and the dispatch free of
business logic so the subcommand-body agents only ever touch cmd/<name>.rs.
Agent-primary ergonomics (SPEC.md § Tooling), enforced at this layer:
--jsonis a global flag; every subcommand honors it. Errors render as{"error": {"code", "message", "hint"}}on stderr under--json.--color <auto|always|never>defaults toauto, which means off (pipe-safe). Color is never auto-detected from a TTY.- No interactive prompts anywhere; flags only.
- Exit codes are a documented contract (see [
error]). clap owns exit code2for argument-parse failures;--help/--versionexit0.