hermes-agent/hermes_cli
teknium1 4be783446a fix: wire worktree flag into hermes CLI entry point + docs + tests
Critical fixes:
- Add --worktree/-w to hermes_cli/main.py argparse (both chat
  subcommand and top-level parser) so 'hermes -w' works via the
  actual CLI entry point, not just 'python cli.py -w'
- Pass worktree flag through cmd_chat() kwargs to cli_main()
- Handle worktree attr in bare 'hermes' and --resume/--continue paths

Bug fixes in cli.py:
- Skip worktree creation for --list-tools/--list-toolsets (wasteful)
- Wrap git worktree subprocess.run in try/except (crash on timeout)
- Add stale worktree pruning on startup (_prune_stale_worktrees):
  removes clean worktrees older than 24h left by crashed/killed sessions

Documentation updates:
- AGENTS.md: add --worktree to CLI commands table
- cli-config.yaml.example: add worktree config section
- website/docs/reference/cli-commands.md: add to core commands
- website/docs/user-guide/cli.md: add usage examples
- website/docs/user-guide/configuration.md: add config docs

Test improvements (17 → 31 tests):
- Stale worktree pruning (prune old clean, keep recent, keep dirty)
- Directory symlink via .worktreeinclude
- Edge cases (no commits, not a repo, pre-existing .worktrees/)
- CLI flag/config OR logic
- TERMINAL_CWD integration
- System prompt injection format
2026-03-07 21:05:40 -08:00
..
__init__.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py feat: implement Z.AI endpoint detection for API key validation 2026-03-07 09:43:37 -08:00
banner.py feat: show update-available notice in CLI banner 2026-03-07 07:35:36 -08:00
callbacks.py refactor: reorganize agent and CLI structure for improved clarity 2026-02-21 23:17:18 -08:00
clipboard.py fix: clipboard image paste on WSL2, Wayland, and VSCode terminal 2026-03-05 20:22:44 -08:00
codex_models.py refactor(auth): transition Codex OAuth tokens to Hermes auth store 2026-03-01 19:59:24 -08:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py feat: add /insights command with usage analytics and cost estimation 2026-03-06 14:04:59 -08:00
config.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
doctor.py fix(doctor): recognize OPENAI_API_KEY custom endpoint config 2026-03-06 19:47:09 -08:00
gateway.py fix: resolve systemd restart loop with --replace flag (#576) 2026-03-07 18:08:12 +00:00
main.py fix: wire worktree flag into hermes CLI entry point + docs + tests 2026-03-07 21:05:40 -08:00
models.py chore: update OpenRouter model list 2026-03-06 00:52:45 -08:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
runtime_provider.py feat: add z.ai/GLM, Kimi/Moonshot, MiniMax as first-class providers 2026-03-06 18:55:18 -08:00
setup.py Merge PR #575: fix(setup): prevent OpenRouter model list fallback for Nous provider 2026-03-07 16:22:13 -08:00
skills_hub.py fix: review fixes — path traversal guard, trust_style consistency, edge cases 2026-03-06 01:40:01 -08:00
status.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
tools_config.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00