Skip to content

Add 'bm config' command group (get/set/list) for managing config.json from the CLI #991

Description

@groksrc

Problem

Every user-facing config option today requires hand-editing ~/.config/basic-memory/config.json or knowing the BASIC_MEMORY_* env-var naming convention. There is no CLI surface for configuration at all — the immediate trigger was cli_output_style (#967): the answer to "how do I default to plain output?" is "open a JSON file in an editor."

This also hurts agents and support: docs and issue replies have to explain JSON editing instead of giving a one-line command.

Proposal

A bm config command group:

bm config list                        # all settings with current values, env overrides marked
bm config get cli_output_style
bm config set cli_output_style plain
bm config unset cli_output_style      # revert to default

Design notes:

  • Validate through the model: set should round-trip through BasicMemoryConfig so invalid values fail with the Pydantic error (e.g. cli_output_style only accepts rich|plain), not get written blindly.
  • Show effective values: get/list should surface when an env var is overriding the file value, since that is a classic support footgun.
  • Guardrails: refuse (or require a flag) to set complex/structured fields like projects — those have dedicated commands. A small allowlist of scalar user-facing settings is fine for v1.
  • Atomic writes: reuse the atomic config write path (b3bdd59 made config.json writes atomic).
  • bm config list overlaps nicely with the feat(mcp): add basic_memory_diagnostics tool for version and system info #963 diagnostics tool (same redaction rules should apply: never print cloud_api_key, mask database_url credentials).

Related

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv1.0Targeted for the v1.0 release

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions