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 fix(auth): unify credential source removal — every source sticks (#13427) 2026-04-21 01:52:49 -07:00
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 fix: remove codex spark model support 2026-04-20 04:51:44 -07:00
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 feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
dump.py
env_loader.py fix(cli): ensure project .env is sanitized before loading 2026-04-22 05:51:44 -07:00
gateway.py fix(gateway): recover stale pid and planned restart state 2026-04-22 16:33:46 -07:00
hooks.py feat: shell hooks — wire shell scripts as Hermes hook callbacks 2026-04-20 20:53:51 -07:00
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 fix(fal): extend whitespace-only FAL_KEY handling to all call sites 2026-04-21 02:04:21 -07:00
pairing.py
platforms.py
plugins_cmd.py feat(plugins): make all plugins opt-in by default 2026-04-20 04:46:45 -07:00
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 feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
runtime_provider.py fix(kimi-coding): add KIMI_CODING_API_KEY fallback + api_mode detection for /coding endpoint 2026-04-21 19:48:39 -07:00
setup.py feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
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 feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
timeouts.py
tips.py feat(delegate): orchestrator role and configurable spawn depth (default flat) 2026-04-21 14:23:45 -07:00
tools_config.py feat(plugins): pluggable image_gen backends + OpenAI provider (#13799) 2026-04-21 21:30:10 -07:00
uninstall.py
web_server.py feat(dashboard): track real API call count per session 2026-04-22 05:51:58 -07:00
webhook.py