mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-10-20 05:15:31 +00:00
Add profile management so users can run multiple fully isolated Hermes instances on the same machine. Each profile gets its own HERMES_HOME with independent config.yaml, .env, memory, sessions, skills, gateway, cron, and logs. New files: - hermes_cli/profiles.py: profile CRUD (create, list, clone, delete) - tests/hermes_cli/test_profiles.py: 40 tests covering profiles - tests/hermes_cli/test_gateway_pid_scoping.py: 3 gateway isolation tests Key changes: - hermes_cli/main.py: --profile/-p flag pre-parsed before any module imports (critical: 30+ modules cache HERMES_HOME at import time). New 'profile' subcommand with create/list/delete/show actions. - hermes_cli/gateway.py: find_gateway_pids() now uses the HERMES_HOME- scoped PID file instead of a greedy ps aux scan. This prevents 'hermes gateway stop' for one profile from killing another profile's gateway. - hermes_cli/banner.py: shows active profile name in CLI banner when not using the default profile. Usage: hermes profile create work # new empty profile hermes profile create work --clone default # clone config+keys hermes -p work setup # configure the profile hermes -p work # chat in work profile hermes -p work gateway start # isolated gateway hermes profile list # see all profiles Design: - Profiles live at ~/.hermes/profiles/<name>/ (separate from default) - Default profile is ~/.hermes (backward compatible, zero migration) - --profile sets HERMES_HOME before any imports, so all downstream code (config, memory, sessions, gateway PID, systemd service names, cron, etc.) naturally scopes to the profile - Systemd service names are already hash-scoped per HERMES_HOME - Token-scoped locks prevent two profiles from binding the same bot Full suite: 5278 passed, 0 new failures. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| auth.py | ||
| banner.py | ||
| callbacks.py | ||
| checklist.py | ||
| claw.py | ||
| clipboard.py | ||
| codex_models.py | ||
| colors.py | ||
| commands.py | ||
| config.py | ||
| cron.py | ||
| curses_ui.py | ||
| default_soul.py | ||
| doctor.py | ||
| env_loader.py | ||
| gateway.py | ||
| main.py | ||
| models.py | ||
| pairing.py | ||
| plugins.py | ||
| profiles.py | ||
| runtime_provider.py | ||
| setup.py | ||
| skills_config.py | ||
| skills_hub.py | ||
| skin_engine.py | ||
| status.py | ||
| tools_config.py | ||
| uninstall.py | ||