Skip to content

[Bug] hermes config set cannot blank a value — rejects empty strings and falsy values #4277

@SHL0MS

Description

@SHL0MS

Problem

hermes config set KEY "" prints usage and exits instead of setting the key to empty. Same for hermes config set KEY 0.

hermes_cli/config.py:2043:

if not key or not value:
    print("Usage: hermes config set <key> <value>")
    sys.exit(1)

not value is True when value is "", 0, False, or None. Users cannot clear stale settings via the CLI — they must manually edit config.yaml.

Reported by a user who needed to blank OPENROUTER_API_KEY after migrating from OpenClaw to a local Ollama endpoint. The suggested workaround (hermes config env OPENROUTER_API_KEY "") also doesn't exist as a CLI command — save_env_value() is internal only.

Suggested fix

# Before
if not key or not value:

# After  
if not key or value is None:

This allows hermes config set model.provider "" and hermes config set verbose 0 while still rejecting missing arguments.

Impact

  • Severity: Medium — blocks users from clearing stale config values via CLI
  • Effort: One line

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions