hermes - 💡(How to fix) Fix [Feature]: hermes config get <key> and config unset <key> — complete the config CRUD surface

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

The config subcommand can write a single value (hermes config set <key> <value>) but there's no way to read a single resolved value or remove a key you previously set. config_command() (hermes_cli/config.py:5712) dispatches show, edit, set, path, env-path, check, migrate — but no get and no unset.

RAW_BUFFERClick to expand / collapse

Problem or Use Case

The config subcommand can write a single value (hermes config set <key> <value>) but there's no way to read a single resolved value or remove a key you previously set. config_command() (hermes_cli/config.py:5712) dispatches show, edit, set, path, env-path, check, migrate — but no get and no unset.

This bites in two concrete ways:

  1. The docs already promise config get — but it doesn't exist. Issue #30195 reports that hermes config get <key> is referenced in 3 guides yet isn't a valid command, and the current remediation (PR #30390) is to delete the doc references. Implementing the command instead would make the docs correct and give users the capability they already expect.

  2. No scriptable read, no non-interactive undo. To read one resolved value for a shell script / CI you'd have to config show (a curated, prettified subset — config.py:5413 — that doesn't echo arbitrary dotted keys) or parse YAML yourself. To undo a config set, the only options today are config edit (opens $EDITOR — useless in scripts/CI) or hand-editing the YAML.

Proposed Solution

Add two subcommands to config_command() (hermes_cli/config.py:5712) and register them in the argparse subparsers next to the existing config subcommands:

  • config get <key> — resolve a dotted key against the merged/effective config and print the value to stdout (exit 0); exit 1 if unset. Use the same nested traversal that _set_nested() (config.py:3275) already implements for writes — add the read counterpart. Print scalars raw (script-friendly); optionally --json for structured values.

  • config unset <key> — delete the dotted key from the raw user config.yaml and re-write via the existing atomic_yaml_write path that set_config_value() uses (config.py:5674-5675). Also clear any mirrored env value via the _config_to_env_sync map (config.py:5679) the way set_config_value() writes it (config.py:5702-5703), so set/unset stay symmetric. No-op (or exit 1) with a clear message if the key wasn't present.

This closes the obvious set-but-no-get/unset asymmetry, makes the config CLI fully scriptable, and realigns the documentation referenced in #30195 instead of removing it.

Alternatives Considered

  • Delete the doc references (PR #30390): removes a capability users already reach for; the command is the more useful fix.
  • config edit: opens $EDITOR — not usable in scripts/CI/automation.
  • config show: a hand-curated, prettified subset (config.py:5413); it neither resolves arbitrary dotted keys nor supports removal.
  • Parsing config.yaml by hand: brittle, and doesn't reflect merged defaults the way a resolved get would.

Notes

This is core CLI surface (an extension of the existing config command family), not a new capability or integration — so per CONTRIBUTING's "should it be a skill or a tool?" guidance it belongs in-tree, not on the Skills Hub. Small and self-contained; happy to send a PR if the direction looks good.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Feature]: hermes config get <key> and config unset <key> — complete the config CRUD surface