Skip to content

v1.108.51 - config set / unset CLI (typed JSONC write-back)

Choose a tag to compare

@jgravelle jgravelle released this 10 Jun 20:36
· 21 commits to main since this release

Adds a write path for configuration so tooling (and the jMunch Console) can change settings, not just read them.

jcodemunch-mcp config set <key> <value> writes a key back to the global config.jsonc preserving comments; config unset <key> clears it so the built-in default applies.

  • <value> is JSON-parsed (true, 7, 0.5, ["a","b"], {"k":1}, null) or kept as a bare string for string-typed keys.
  • Coerced + type-checked against CONFIG_TYPES; unknown keys, wrong types, and the read-only version key are rejected.
  • --json emits {success, key, value|changed, message|error} (exit 1 on error).

Under the hood: a general typed JSONC writer (set_key / set_config_value / coerce_config_value / unset_*) that generalizes set_bool_key to every value type, with a comment/bracket/string-aware value scanner so it replaces multi-line array/object values in place (including the // "field",-commented languages/meta_fields template arrays). Writes are re-parsed and the edited key is confirmed before the change is kept; on any failure the file is rolled back.

Additive: config show / --json / --check / --init / --upgrade are unchanged. 16 new tests; full suite 4536 passed / 10 skipped.

Install (PyPI publishing temporarily paused):

pip install https://github.com/jgravelle/jcodemunch-mcp/releases/download/v1.108.51/jcodemunch_mcp-1.108.51-py3-none-any.whl