hermes-agent/hermes_cli
Teknium a2a8092e90 feat(cli): add --ignore-user-config and --ignore-rules flags
Port from openai/codex#18646.

Adds two flags to 'hermes chat' that fully isolate a run from user-level
configuration and rules:

* --ignore-user-config: skip ~/.hermes/config.yaml and fall back to
  built-in defaults. Credentials in .env are still loaded so the agent
  can actually call a provider.
* --ignore-rules: skip auto-injection of AGENTS.md, SOUL.md,
  .cursorrules, and persistent memory (maps to AIAgent(skip_context_files=True,
  skip_memory=True)).

Primary use cases:
- Reproducible CI runs that should not pick up developer-local config
- Third-party integrations (e.g. Chronicle in Codex) that bring their
  own config and don't want user preferences leaking in
- Bug-report reproduction without the reporter's personal overrides
- Debugging: bisect 'was it my config?' vs 'real bug' in one command

Both flags are registered on the parent parser AND the 'chat' subparser
(with argparse.SUPPRESS on the subparser to avoid overwriting the parent
value when the flag is placed before the subcommand, matching the
existing --yolo/--worktree/--pass-session-id pattern).

Env vars HERMES_IGNORE_USER_CONFIG=1 and HERMES_IGNORE_RULES=1 are set
by cmd_chat BEFORE 'from cli import main' runs, which is critical
because cli.py evaluates CLI_CONFIG = load_cli_config() at module import
time. The cli.py / hermes_cli.config.load_cli_config() function checks
the env var and skips ~/.hermes/config.yaml when set.

Tests: 11 new tests in tests/hermes_cli/test_ignore_user_config_flags.py
covering the env gate, constructor wiring, cmd_chat simulation, and
argparse flag registration. All pass; existing hermes_cli + cli suites
unaffected (3005 pass, 2 pre-existing unrelated failures).
2026-04-22 19:58:42 -07:00
..
__init__.py
auth_commands.py
auth.py fix: add base_url_env_var to Anthropic ProviderConfig 2026-04-22 17:56:14 -07:00
backup.py
banner.py
callbacks.py
claw.py Normalize claw workspace paths for Windows 2026-04-22 18:15:27 -07:00
cli_output.py
clipboard.py
codex_models.py
colors.py
commands.py feat(gateway): expose plugin slash commands natively on all platforms + decision-capable command hook 2026-04-22 16:23:21 -07:00
completion.py
config.py fix(cli): guard fallback_model list format in save_config_value 2026-04-22 18:16:49 -07:00
copilot_auth.py
cron.py
curses_ui.py
debug.py style(debug): add missing blank line between LogSnapshot and helpers 2026-04-22 16:34:05 -05:00
default_soul.py
dingtalk_auth.py
doctor.py
dump.py
env_loader.py
gateway.py fix(gateway): recover stale pid and planned restart state 2026-04-22 16:33:46 -07:00
hooks.py
logs.py
main.py feat(cli): add --ignore-user-config and --ignore-rules flags 2026-04-22 19:58:42 -07:00
mcp_config.py
memory_setup.py
model_normalize.py
model_switch.py feat(/model): merge models.dev entries for lesser-loved providers (#14221) 2026-04-22 17:33:42 -07:00
models.py feat(/model): merge models.dev entries for lesser-loved providers (#14221) 2026-04-22 17:33:42 -07:00
nous_subscription.py
pairing.py
platforms.py
plugins_cmd.py
plugins.py feat(gateway): expose plugin slash commands natively on all platforms + decision-capable command hook 2026-04-22 16:23:21 -07:00
profiles.py
providers.py
runtime_provider.py
setup.py
skills_config.py
skills_hub.py
skin_engine.py fix(skins): don't inherit status_bar_* into light-mode skins 2026-04-22 13:20:02 -07:00
status.py
timeouts.py
tips.py
tools_config.py
uninstall.py
web_server.py feat(dashboard): track real API call count per session 2026-04-22 05:51:58 -07:00
webhook.py