2026-02-02 19:01:51 -08:00
|
|
|
"""
|
|
|
|
|
Interactive setup wizard for Hermes Agent.
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
Modular wizard with independently-runnable sections:
|
|
|
|
|
1. Model & Provider — choose your AI provider and model
|
|
|
|
|
2. Terminal Backend — where your agent runs commands
|
2026-03-22 04:55:34 -07:00
|
|
|
3. Agent Settings — iterations, compression, session reset
|
|
|
|
|
4. Messaging Platforms — connect Telegram, Discord, etc.
|
|
|
|
|
5. Tools — configure TTS, web search, image generation, etc.
|
2026-02-02 19:01:51 -08:00
|
|
|
|
|
|
|
|
Config files are stored in ~/.hermes/ for easy access.
|
|
|
|
|
"""
|
|
|
|
|
|
2026-03-11 09:09:58 -07:00
|
|
|
import importlib.util
|
2026-02-21 03:32:11 -08:00
|
|
|
import logging
|
2026-02-02 19:01:51 -08:00
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
from typing import Optional, Dict, Any
|
|
|
|
|
|
2026-03-30 17:34:43 -07:00
|
|
|
from hermes_constants import get_optional_skills_dir
|
|
|
|
|
|
2026-02-21 03:32:11 -08:00
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
PROJECT_ROOT = Path(__file__).parent.parent.resolve()
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
|
|
|
|
def _model_config_dict(config: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
|
|
current_model = config.get("model")
|
|
|
|
|
if isinstance(current_model, dict):
|
|
|
|
|
return dict(current_model)
|
|
|
|
|
if isinstance(current_model, str) and current_model.strip():
|
|
|
|
|
return {"default": current_model.strip()}
|
|
|
|
|
return {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _set_model_provider(
|
|
|
|
|
config: Dict[str, Any], provider_id: str, base_url: str = ""
|
|
|
|
|
) -> None:
|
|
|
|
|
model_cfg = _model_config_dict(config)
|
|
|
|
|
model_cfg["provider"] = provider_id
|
|
|
|
|
if base_url:
|
|
|
|
|
model_cfg["base_url"] = base_url.rstrip("/")
|
|
|
|
|
else:
|
|
|
|
|
model_cfg.pop("base_url", None)
|
|
|
|
|
config["model"] = model_cfg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _set_default_model(config: Dict[str, Any], model_name: str) -> None:
|
|
|
|
|
if not model_name:
|
|
|
|
|
return
|
|
|
|
|
model_cfg = _model_config_dict(config)
|
|
|
|
|
model_cfg["default"] = model_name
|
|
|
|
|
config["model"] = model_cfg
|
|
|
|
|
|
|
|
|
|
|
feat(auth): same-provider credential pools with rotation, custom endpoint support, and interactive CLI (#2647)
* feat(auth): add same-provider credential pools and rotation UX
Add same-provider credential pooling so Hermes can rotate across
multiple credentials for a single provider, recover from exhausted
credentials without jumping providers immediately, and configure
that behavior directly in hermes setup.
- agent/credential_pool.py: persisted per-provider credential pools
- hermes auth add/list/remove/reset CLI commands
- 429/402/401 recovery with pool rotation in run_agent.py
- Setup wizard integration for pool strategy configuration
- Auto-seeding from env vars and existing OAuth state
Co-authored-by: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com>
Salvaged from PR #2647
* fix(tests): prevent pool auto-seeding from host env in credential pool tests
Tests for non-pool Anthropic paths and auth remove were failing when
host env vars (ANTHROPIC_API_KEY) or file-backed OAuth credentials
were present. The pool auto-seeding picked these up, causing unexpected
pool entries in tests.
- Mock _select_pool_entry in auxiliary_client OAuth flag tests
- Clear Anthropic env vars and mock _seed_from_singletons in auth remove test
* feat(auth): add thread safety, least_used strategy, and request counting
- Add threading.Lock to CredentialPool for gateway thread safety
(concurrent requests from multiple gateway sessions could race on
pool state mutations without this)
- Add 'least_used' rotation strategy that selects the credential
with the lowest request_count, distributing load more evenly
- Add request_count field to PooledCredential for usage tracking
- Add mark_used() method to increment per-credential request counts
- Wrap select(), mark_exhausted_and_rotate(), and try_refresh_current()
with lock acquisition
- Add tests: least_used selection, mark_used counting, concurrent
thread safety (4 threads × 20 selects with no corruption)
* feat(auth): add interactive mode for bare 'hermes auth' command
When 'hermes auth' is called without a subcommand, it now launches an
interactive wizard that:
1. Shows full credential pool status across all providers
2. Offers a menu: add, remove, reset cooldowns, set strategy
3. For OAuth-capable providers (anthropic, nous, openai-codex), the
add flow explicitly asks 'API key or OAuth login?' — making it
clear that both auth types are supported for the same provider
4. Strategy picker shows all 4 options (fill_first, round_robin,
least_used, random) with the current selection marked
5. Remove flow shows entries with indices for easy selection
The subcommand paths (hermes auth add/list/remove/reset) still work
exactly as before for scripted/non-interactive use.
* fix(tests): update runtime_provider tests for config.yaml source of truth (#4165)
Tests were using OPENAI_BASE_URL env var which is no longer consulted
after #4165. Updated to use model config (provider, base_url, api_key)
which is the new single source of truth for custom endpoint URLs.
* feat(auth): support custom endpoint credential pools keyed by provider name
Custom OpenAI-compatible endpoints all share provider='custom', making
the provider-keyed pool useless. Now pools for custom endpoints are
keyed by 'custom:<normalized_name>' where the name comes from the
custom_providers config list (auto-generated from URL hostname).
- Pool key format: 'custom:together.ai', 'custom:local-(localhost:8080)'
- load_pool('custom:name') seeds from custom_providers api_key AND
model.api_key when base_url matches
- hermes auth add/list now shows custom endpoints alongside registry
providers
- _resolve_openrouter_runtime and _resolve_named_custom_runtime check
pool before falling back to single config key
- 6 new tests covering custom pool keying, seeding, and listing
* docs: add Excalidraw diagram of full credential pool flow
Comprehensive architecture diagram showing:
- Credential sources (env vars, auth.json OAuth, config.yaml, CLI)
- Pool storage and auto-seeding
- Runtime resolution paths (registry, custom, OpenRouter)
- Error recovery (429 retry-then-rotate, 402 immediate, 401 refresh)
- CLI management commands and strategy configuration
Open at: https://excalidraw.com/#json=2Ycqhqpi6f12E_3ITyiwh,c7u9jSt5BwrmiVzHGbm87g
* fix(tests): update setup wizard pool tests for unified select_provider_and_model flow
The setup wizard now delegates to select_provider_and_model() instead
of using its own prompt_choice-based provider picker. Tests needed:
- Mock select_provider_and_model as no-op (provider pre-written to config)
- Call _stub_tts BEFORE custom prompt_choice mock (it overwrites it)
- Pre-write model.provider to config so the pool step is reached
* docs: add comprehensive credential pool documentation
- New page: website/docs/user-guide/features/credential-pools.md
Full guide covering quick start, CLI commands, rotation strategies,
error recovery, custom endpoint pools, auto-discovery, thread safety,
architecture, and storage format.
- Updated fallback-providers.md to reference credential pools as the
first layer of resilience (same-provider rotation before cross-provider)
- Added hermes auth to CLI commands reference with usage examples
- Added credential_pool_strategies to configuration guide
* chore: remove excalidraw diagram from repo (external link only)
* refactor: simplify credential pool code — extract helpers, collapse extras, dedup patterns
- _load_config_safe(): replace 4 identical try/except/import blocks
- _iter_custom_providers(): shared generator for custom provider iteration
- PooledCredential.extra dict: collapse 11 round-trip-only fields
(token_type, scope, client_id, portal_base_url, obtained_at,
expires_in, agent_key_id, agent_key_expires_in, agent_key_reused,
agent_key_obtained_at, tls) into a single extra dict with
__getattr__ for backward-compatible access
- _available_entries(): shared exhaustion-check between select and peek
- Dedup anthropic OAuth seeding (hermes_pkce + claude_code identical)
- SimpleNamespace replaces class _Args boilerplate in auth_commands
- _try_resolve_from_custom_pool(): shared pool-check in runtime_provider
Net -17 lines. All 383 targeted tests pass.
---------
Co-authored-by: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com>
2026-03-31 03:10:01 -07:00
|
|
|
def _get_credential_pool_strategies(config: Dict[str, Any]) -> Dict[str, str]:
|
|
|
|
|
strategies = config.get("credential_pool_strategies")
|
|
|
|
|
return dict(strategies) if isinstance(strategies, dict) else {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _set_credential_pool_strategy(config: Dict[str, Any], provider: str, strategy: str) -> None:
|
|
|
|
|
if not provider:
|
|
|
|
|
return
|
|
|
|
|
strategies = _get_credential_pool_strategies(config)
|
|
|
|
|
strategies[provider] = strategy
|
|
|
|
|
config["credential_pool_strategies"] = strategies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _supports_same_provider_pool_setup(provider: str) -> bool:
|
|
|
|
|
if not provider or provider == "custom":
|
|
|
|
|
return False
|
|
|
|
|
if provider == "openrouter":
|
|
|
|
|
return True
|
|
|
|
|
from hermes_cli.auth import PROVIDER_REGISTRY
|
|
|
|
|
|
|
|
|
|
pconfig = PROVIDER_REGISTRY.get(provider)
|
|
|
|
|
if not pconfig:
|
|
|
|
|
return False
|
|
|
|
|
return pconfig.auth_type in {"api_key", "oauth_device_code"}
|
|
|
|
|
|
|
|
|
|
|
2026-03-12 16:20:22 -07:00
|
|
|
# Default model lists per provider — used as fallback when the live
|
|
|
|
|
# /models endpoint can't be reached.
|
|
|
|
|
_DEFAULT_PROVIDER_MODELS = {
|
2026-03-17 23:40:22 -07:00
|
|
|
"copilot-acp": [
|
|
|
|
|
"copilot-acp",
|
|
|
|
|
],
|
|
|
|
|
"copilot": [
|
|
|
|
|
"gpt-5.4",
|
|
|
|
|
"gpt-5.4-mini",
|
|
|
|
|
"gpt-5-mini",
|
|
|
|
|
"gpt-5.3-codex",
|
|
|
|
|
"gpt-5.2-codex",
|
|
|
|
|
"gpt-4.1",
|
|
|
|
|
"gpt-4o",
|
|
|
|
|
"gpt-4o-mini",
|
|
|
|
|
"claude-opus-4.6",
|
|
|
|
|
"claude-sonnet-4.6",
|
|
|
|
|
"claude-sonnet-4.5",
|
|
|
|
|
"claude-haiku-4.5",
|
|
|
|
|
"gemini-2.5-pro",
|
|
|
|
|
"grok-code-fast-1",
|
|
|
|
|
],
|
2026-03-12 16:20:22 -07:00
|
|
|
"zai": ["glm-5", "glm-4.7", "glm-4.5", "glm-4.5-flash"],
|
|
|
|
|
"kimi-coding": ["kimi-k2.5", "kimi-k2-thinking", "kimi-k2-turbo-preview"],
|
feat: upgrade MiniMax default to M2.7 + add new OpenRouter models
MiniMax: Add M2.7 and M2.7-highspeed as new defaults across provider
model lists, auxiliary client, metadata, setup wizard, RL training tool,
fallback tests, and docs. Retain M2.5/M2.1 as alternatives.
OpenRouter: Add grok-4.20-beta, nemotron-3-super-120b-a12b:free,
trinity-large-preview:free, glm-5-turbo, and hunter-alpha to the
model catalog.
MiniMax changes based on PR #1882 by @octo-patch (applied manually
due to stale conflicts in refactored pricing module).
2026-03-18 02:42:58 -07:00
|
|
|
"minimax": ["MiniMax-M2.7", "MiniMax-M2.7-highspeed", "MiniMax-M2.5", "MiniMax-M2.5-highspeed", "MiniMax-M2.1"],
|
|
|
|
|
"minimax-cn": ["MiniMax-M2.7", "MiniMax-M2.7-highspeed", "MiniMax-M2.5", "MiniMax-M2.5-highspeed", "MiniMax-M2.1"],
|
2026-03-17 00:12:16 -07:00
|
|
|
"ai-gateway": ["anthropic/claude-opus-4.6", "anthropic/claude-sonnet-4.6", "openai/gpt-5", "google/gemini-3-flash"],
|
feat: add Kilo Code (kilocode) as first-class inference provider (#1666)
Add Kilo Gateway (kilo.ai) as an API-key provider with OpenAI-compatible
endpoint at https://api.kilo.ai/api/gateway. Supports 500+ models from
Anthropic, OpenAI, Google, xAI, Mistral, MiniMax via a single API key.
- Register kilocode in PROVIDER_REGISTRY with aliases (kilo, kilo-code,
kilo-gateway) and KILOCODE_API_KEY / KILOCODE_BASE_URL env vars
- Add to model catalog, CLI provider menu, setup wizard, doctor checks
- Add google/gemini-3-flash-preview as default aux model
- 12 new tests covering registration, aliases, credential resolution,
runtime config
- Documentation updates (env vars, config, fallback providers)
- Fix setup test index shift from provider insertion
Inspired by PR #1473 by @amanning3390.
Co-authored-by: amanning3390 <amanning3390@users.noreply.github.com>
2026-03-17 02:40:34 -07:00
|
|
|
"kilocode": ["anthropic/claude-opus-4.6", "anthropic/claude-sonnet-4.6", "openai/gpt-5.4", "google/gemini-3-pro-preview", "google/gemini-3-flash-preview"],
|
feat: add Hugging Face as a first-class inference provider (#3419)
Salvage of PR #1747 (original PR #1171 by @davanstrien) onto current main.
Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider:
- hermes chat --provider huggingface (or --provider hf)
- 18 curated open models via hermes model picker
- HF_TOKEN in ~/.hermes/.env
- OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.)
Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests.
Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
2026-03-27 12:41:59 -07:00
|
|
|
"huggingface": [
|
|
|
|
|
"Qwen/Qwen3.5-397B-A17B", "Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
|
|
|
"Qwen/Qwen3-Coder-480B-A35B-Instruct", "deepseek-ai/DeepSeek-R1-0528",
|
|
|
|
|
"deepseek-ai/DeepSeek-V3.2", "moonshotai/Kimi-K2.5",
|
|
|
|
|
],
|
2026-03-12 16:20:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2026-03-17 23:40:22 -07:00
|
|
|
def _current_reasoning_effort(config: Dict[str, Any]) -> str:
|
|
|
|
|
agent_cfg = config.get("agent")
|
|
|
|
|
if isinstance(agent_cfg, dict):
|
|
|
|
|
return str(agent_cfg.get("reasoning_effort") or "").strip().lower()
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _set_reasoning_effort(config: Dict[str, Any], effort: str) -> None:
|
|
|
|
|
agent_cfg = config.get("agent")
|
|
|
|
|
if not isinstance(agent_cfg, dict):
|
|
|
|
|
agent_cfg = {}
|
|
|
|
|
config["agent"] = agent_cfg
|
|
|
|
|
agent_cfg["reasoning_effort"] = effort
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _setup_copilot_reasoning_selection(
|
|
|
|
|
config: Dict[str, Any],
|
|
|
|
|
model_id: str,
|
|
|
|
|
prompt_choice,
|
|
|
|
|
*,
|
|
|
|
|
catalog: Optional[list[dict[str, Any]]] = None,
|
|
|
|
|
api_key: str = "",
|
|
|
|
|
) -> None:
|
|
|
|
|
from hermes_cli.models import github_model_reasoning_efforts, normalize_copilot_model_id
|
|
|
|
|
|
|
|
|
|
normalized_model = normalize_copilot_model_id(
|
|
|
|
|
model_id,
|
|
|
|
|
catalog=catalog,
|
|
|
|
|
api_key=api_key,
|
|
|
|
|
) or model_id
|
|
|
|
|
efforts = github_model_reasoning_efforts(normalized_model, catalog=catalog, api_key=api_key)
|
|
|
|
|
if not efforts:
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
current_effort = _current_reasoning_effort(config)
|
|
|
|
|
choices = list(efforts) + ["Disable reasoning", f"Keep current ({current_effort or 'default'})"]
|
|
|
|
|
|
|
|
|
|
if current_effort == "none":
|
|
|
|
|
default_idx = len(efforts)
|
|
|
|
|
elif current_effort in efforts:
|
|
|
|
|
default_idx = efforts.index(current_effort)
|
|
|
|
|
elif "medium" in efforts:
|
|
|
|
|
default_idx = efforts.index("medium")
|
|
|
|
|
else:
|
|
|
|
|
default_idx = len(choices) - 1
|
|
|
|
|
|
|
|
|
|
effort_idx = prompt_choice("Select reasoning effort:", choices, default_idx)
|
|
|
|
|
if effort_idx < len(efforts):
|
|
|
|
|
_set_reasoning_effort(config, efforts[effort_idx])
|
|
|
|
|
elif effort_idx == len(efforts):
|
|
|
|
|
_set_reasoning_effort(config, "none")
|
|
|
|
|
|
|
|
|
|
|
2026-03-12 16:20:22 -07:00
|
|
|
def _setup_provider_model_selection(config, provider_id, current_model, prompt_choice, prompt_fn):
|
|
|
|
|
"""Model selection for API-key providers with live /models detection.
|
|
|
|
|
|
|
|
|
|
Tries the provider's /models endpoint first. Falls back to a
|
|
|
|
|
hardcoded default list with a warning if the endpoint is unreachable.
|
|
|
|
|
Always offers a 'Custom model' escape hatch.
|
|
|
|
|
"""
|
2026-03-17 23:40:22 -07:00
|
|
|
from hermes_cli.auth import PROVIDER_REGISTRY, resolve_api_key_provider_credentials
|
2026-03-12 16:20:22 -07:00
|
|
|
from hermes_cli.config import get_env_value
|
2026-03-17 23:40:22 -07:00
|
|
|
from hermes_cli.models import (
|
|
|
|
|
copilot_model_api_mode,
|
|
|
|
|
fetch_api_models,
|
|
|
|
|
fetch_github_model_catalog,
|
|
|
|
|
normalize_copilot_model_id,
|
|
|
|
|
)
|
2026-03-12 16:20:22 -07:00
|
|
|
|
|
|
|
|
pconfig = PROVIDER_REGISTRY[provider_id]
|
2026-03-17 23:40:22 -07:00
|
|
|
is_copilot_catalog_provider = provider_id in {"copilot", "copilot-acp"}
|
2026-03-12 16:20:22 -07:00
|
|
|
|
|
|
|
|
# Resolve API key and base URL for the probe
|
2026-03-17 23:40:22 -07:00
|
|
|
if is_copilot_catalog_provider:
|
|
|
|
|
api_key = ""
|
|
|
|
|
if provider_id == "copilot":
|
|
|
|
|
creds = resolve_api_key_provider_credentials(provider_id)
|
|
|
|
|
api_key = creds.get("api_key", "")
|
|
|
|
|
base_url = creds.get("base_url", "") or pconfig.inference_base_url
|
|
|
|
|
else:
|
|
|
|
|
try:
|
|
|
|
|
creds = resolve_api_key_provider_credentials("copilot")
|
|
|
|
|
api_key = creds.get("api_key", "")
|
|
|
|
|
except Exception:
|
|
|
|
|
pass
|
|
|
|
|
base_url = pconfig.inference_base_url
|
|
|
|
|
catalog = fetch_github_model_catalog(api_key)
|
|
|
|
|
current_model = normalize_copilot_model_id(
|
|
|
|
|
current_model,
|
|
|
|
|
catalog=catalog,
|
|
|
|
|
api_key=api_key,
|
|
|
|
|
) or current_model
|
|
|
|
|
else:
|
|
|
|
|
api_key = ""
|
|
|
|
|
for ev in pconfig.api_key_env_vars:
|
|
|
|
|
api_key = get_env_value(ev) or os.getenv(ev, "")
|
|
|
|
|
if api_key:
|
|
|
|
|
break
|
|
|
|
|
base_url_env = pconfig.base_url_env_var or ""
|
|
|
|
|
base_url = (get_env_value(base_url_env) if base_url_env else "") or pconfig.inference_base_url
|
|
|
|
|
catalog = None
|
2026-03-12 16:20:22 -07:00
|
|
|
|
|
|
|
|
# Try live /models endpoint
|
2026-03-17 23:40:22 -07:00
|
|
|
if is_copilot_catalog_provider and catalog:
|
|
|
|
|
live_models = [item.get("id", "") for item in catalog if item.get("id")]
|
|
|
|
|
else:
|
|
|
|
|
live_models = fetch_api_models(api_key, base_url)
|
2026-03-12 16:20:22 -07:00
|
|
|
|
|
|
|
|
if live_models:
|
|
|
|
|
provider_models = live_models
|
|
|
|
|
print_info(f"Found {len(live_models)} model(s) from {pconfig.name} API")
|
|
|
|
|
else:
|
2026-03-17 23:40:22 -07:00
|
|
|
fallback_provider_id = "copilot" if provider_id == "copilot-acp" else provider_id
|
|
|
|
|
provider_models = _DEFAULT_PROVIDER_MODELS.get(fallback_provider_id, [])
|
2026-03-12 16:20:22 -07:00
|
|
|
if provider_models:
|
|
|
|
|
print_warning(
|
|
|
|
|
f"Could not auto-detect models from {pconfig.name} API — showing defaults.\n"
|
|
|
|
|
f" Use \"Custom model\" if the model you expect isn't listed."
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
model_choices = list(provider_models)
|
|
|
|
|
model_choices.append("Custom model")
|
|
|
|
|
model_choices.append(f"Keep current ({current_model})")
|
|
|
|
|
|
|
|
|
|
keep_idx = len(model_choices) - 1
|
|
|
|
|
model_idx = prompt_choice("Select default model:", model_choices, keep_idx)
|
|
|
|
|
|
2026-03-17 23:40:22 -07:00
|
|
|
selected_model = current_model
|
|
|
|
|
|
2026-03-12 16:20:22 -07:00
|
|
|
if model_idx < len(provider_models):
|
2026-03-17 23:40:22 -07:00
|
|
|
selected_model = provider_models[model_idx]
|
|
|
|
|
if is_copilot_catalog_provider:
|
|
|
|
|
selected_model = normalize_copilot_model_id(
|
|
|
|
|
selected_model,
|
|
|
|
|
catalog=catalog,
|
|
|
|
|
api_key=api_key,
|
|
|
|
|
) or selected_model
|
|
|
|
|
_set_default_model(config, selected_model)
|
2026-03-12 16:20:22 -07:00
|
|
|
elif model_idx == len(provider_models):
|
|
|
|
|
custom = prompt_fn("Enter model name")
|
|
|
|
|
if custom:
|
2026-03-17 23:40:22 -07:00
|
|
|
if is_copilot_catalog_provider:
|
|
|
|
|
selected_model = normalize_copilot_model_id(
|
|
|
|
|
custom,
|
|
|
|
|
catalog=catalog,
|
|
|
|
|
api_key=api_key,
|
|
|
|
|
) or custom
|
|
|
|
|
else:
|
|
|
|
|
selected_model = custom
|
|
|
|
|
_set_default_model(config, selected_model)
|
2026-03-13 09:03:48 -07:00
|
|
|
else:
|
|
|
|
|
# "Keep current" selected — validate it's compatible with the new
|
|
|
|
|
# provider. OpenRouter-formatted names (containing "/") won't work
|
|
|
|
|
# on direct-API providers and would silently break the gateway.
|
|
|
|
|
if "/" in (current_model or "") and provider_models:
|
|
|
|
|
print_warning(
|
|
|
|
|
f"Current model \"{current_model}\" looks like an OpenRouter model "
|
|
|
|
|
f"and won't work with {pconfig.name}. "
|
|
|
|
|
f"Switching to {provider_models[0]}."
|
|
|
|
|
)
|
2026-03-17 23:40:22 -07:00
|
|
|
selected_model = provider_models[0]
|
2026-03-13 09:03:48 -07:00
|
|
|
_set_default_model(config, provider_models[0])
|
2026-03-12 16:20:22 -07:00
|
|
|
|
2026-03-17 23:40:22 -07:00
|
|
|
if provider_id == "copilot" and selected_model:
|
|
|
|
|
model_cfg = _model_config_dict(config)
|
|
|
|
|
model_cfg["api_mode"] = copilot_model_api_mode(
|
|
|
|
|
selected_model,
|
|
|
|
|
catalog=catalog,
|
|
|
|
|
api_key=api_key,
|
|
|
|
|
)
|
|
|
|
|
config["model"] = model_cfg
|
|
|
|
|
_setup_copilot_reasoning_selection(
|
|
|
|
|
config,
|
|
|
|
|
selected_model,
|
|
|
|
|
prompt_choice,
|
|
|
|
|
catalog=catalog,
|
|
|
|
|
api_key=api_key,
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-12 16:20:22 -07:00
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
def _sync_model_from_disk(config: Dict[str, Any]) -> None:
|
|
|
|
|
disk_model = load_config().get("model")
|
|
|
|
|
if isinstance(disk_model, dict):
|
|
|
|
|
model_cfg = _model_config_dict(config)
|
|
|
|
|
model_cfg.update(disk_model)
|
|
|
|
|
config["model"] = model_cfg
|
|
|
|
|
elif isinstance(disk_model, str) and disk_model.strip():
|
|
|
|
|
_set_default_model(config, disk_model.strip())
|
|
|
|
|
|
|
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
# Import config helpers
|
|
|
|
|
from hermes_cli.config import (
|
2026-03-11 01:33:29 +05:30
|
|
|
get_hermes_home,
|
|
|
|
|
get_config_path,
|
|
|
|
|
get_env_path,
|
|
|
|
|
load_config,
|
|
|
|
|
save_config,
|
|
|
|
|
save_env_value,
|
|
|
|
|
get_env_value,
|
|
|
|
|
ensure_hermes_home,
|
2026-02-02 19:01:51 -08:00
|
|
|
)
|
2026-03-29 15:15:17 -07:00
|
|
|
# display_hermes_home imported lazily at call sites (stale-module safety during hermes update)
|
2026-02-02 19:01:51 -08:00
|
|
|
|
2026-02-20 23:23:32 -08:00
|
|
|
from hermes_cli.colors import Colors, color
|
2026-02-02 19:01:51 -08:00
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def print_header(title: str):
|
|
|
|
|
"""Print a section header."""
|
|
|
|
|
print()
|
|
|
|
|
print(color(f"◆ {title}", Colors.CYAN, Colors.BOLD))
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def print_info(text: str):
|
|
|
|
|
"""Print info text."""
|
|
|
|
|
print(color(f" {text}", Colors.DIM))
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def print_success(text: str):
|
|
|
|
|
"""Print success message."""
|
|
|
|
|
print(color(f"✓ {text}", Colors.GREEN))
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def print_warning(text: str):
|
|
|
|
|
"""Print warning message."""
|
|
|
|
|
print(color(f"⚠ {text}", Colors.YELLOW))
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def print_error(text: str):
|
|
|
|
|
"""Print error message."""
|
|
|
|
|
print(color(f"✗ {text}", Colors.RED))
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-14 02:37:29 -07:00
|
|
|
def is_interactive_stdin() -> bool:
|
|
|
|
|
"""Return True when stdin looks like a usable interactive TTY."""
|
|
|
|
|
stdin = getattr(sys, "stdin", None)
|
|
|
|
|
if stdin is None:
|
|
|
|
|
return False
|
|
|
|
|
try:
|
|
|
|
|
return bool(stdin.isatty())
|
|
|
|
|
except Exception:
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def print_noninteractive_setup_guidance(reason: str | None = None) -> None:
|
|
|
|
|
"""Print guidance for headless/non-interactive setup flows."""
|
|
|
|
|
print()
|
|
|
|
|
print(color("⚕ Hermes Setup — Non-interactive mode", Colors.CYAN, Colors.BOLD))
|
|
|
|
|
print()
|
|
|
|
|
if reason:
|
|
|
|
|
print_info(reason)
|
|
|
|
|
print_info("The interactive wizard cannot be used here.")
|
|
|
|
|
print()
|
|
|
|
|
print_info("Configure Hermes using environment variables or config commands:")
|
|
|
|
|
print_info(" hermes config set model.provider custom")
|
|
|
|
|
print_info(" hermes config set model.base_url http://localhost:8080/v1")
|
|
|
|
|
print_info(" hermes config set model.default your-model-name")
|
|
|
|
|
print()
|
|
|
|
|
print_info("Or set OPENROUTER_API_KEY / OPENAI_API_KEY in your environment.")
|
|
|
|
|
print_info("Run 'hermes setup' in an interactive terminal to use the full wizard.")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def prompt(question: str, default: str = None, password: bool = False) -> str:
|
|
|
|
|
"""Prompt for input with optional default."""
|
|
|
|
|
if default:
|
|
|
|
|
display = f"{question} [{default}]: "
|
|
|
|
|
else:
|
|
|
|
|
display = f"{question}: "
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
try:
|
|
|
|
|
if password:
|
|
|
|
|
import getpass
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
value = getpass.getpass(color(display, Colors.YELLOW))
|
|
|
|
|
else:
|
|
|
|
|
value = input(color(display, Colors.YELLOW))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
return value.strip() or default or ""
|
|
|
|
|
except (KeyboardInterrupt, EOFError):
|
|
|
|
|
print()
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-15 21:16:21 -07:00
|
|
|
def _curses_prompt_choice(question: str, choices: list, default: int = 0) -> int:
|
|
|
|
|
"""Single-select menu using curses to avoid simple_term_menu rendering bugs."""
|
|
|
|
|
try:
|
|
|
|
|
import curses
|
|
|
|
|
result_holder = [default]
|
|
|
|
|
|
|
|
|
|
def _curses_menu(stdscr):
|
|
|
|
|
curses.curs_set(0)
|
|
|
|
|
if curses.has_colors():
|
|
|
|
|
curses.start_color()
|
|
|
|
|
curses.use_default_colors()
|
|
|
|
|
curses.init_pair(1, curses.COLOR_GREEN, -1)
|
|
|
|
|
curses.init_pair(2, curses.COLOR_YELLOW, -1)
|
|
|
|
|
cursor = default
|
|
|
|
|
|
|
|
|
|
while True:
|
|
|
|
|
stdscr.clear()
|
|
|
|
|
max_y, max_x = stdscr.getmaxyx()
|
|
|
|
|
try:
|
|
|
|
|
stdscr.addnstr(
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
question,
|
|
|
|
|
max_x - 1,
|
|
|
|
|
curses.A_BOLD | (curses.color_pair(2) if curses.has_colors() else 0),
|
|
|
|
|
)
|
|
|
|
|
except curses.error:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
for i, choice in enumerate(choices):
|
|
|
|
|
y = i + 2
|
|
|
|
|
if y >= max_y - 1:
|
|
|
|
|
break
|
|
|
|
|
arrow = "→" if i == cursor else " "
|
|
|
|
|
line = f" {arrow} {choice}"
|
|
|
|
|
attr = curses.A_NORMAL
|
|
|
|
|
if i == cursor:
|
|
|
|
|
attr = curses.A_BOLD
|
|
|
|
|
if curses.has_colors():
|
|
|
|
|
attr |= curses.color_pair(1)
|
|
|
|
|
try:
|
|
|
|
|
stdscr.addnstr(y, 0, line, max_x - 1, attr)
|
|
|
|
|
except curses.error:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
stdscr.refresh()
|
|
|
|
|
key = stdscr.getch()
|
|
|
|
|
if key in (curses.KEY_UP, ord("k")):
|
|
|
|
|
cursor = (cursor - 1) % len(choices)
|
|
|
|
|
elif key in (curses.KEY_DOWN, ord("j")):
|
|
|
|
|
cursor = (cursor + 1) % len(choices)
|
|
|
|
|
elif key in (curses.KEY_ENTER, 10, 13):
|
|
|
|
|
result_holder[0] = cursor
|
|
|
|
|
return
|
|
|
|
|
elif key in (27, ord("q")):
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
curses.wrapper(_curses_menu)
|
|
|
|
|
return result_holder[0]
|
|
|
|
|
except Exception:
|
|
|
|
|
return -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def prompt_choice(question: str, choices: list, default: int = 0) -> int:
|
2026-03-06 05:27:11 -08:00
|
|
|
"""Prompt for a choice from a list with arrow key navigation.
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-06 05:27:11 -08:00
|
|
|
Escape keeps the current default (skips the question).
|
|
|
|
|
Ctrl+C exits the wizard.
|
|
|
|
|
"""
|
2026-03-15 21:16:21 -07:00
|
|
|
idx = _curses_prompt_choice(question, choices, default)
|
|
|
|
|
if idx >= 0:
|
|
|
|
|
if idx == default:
|
|
|
|
|
print_info(" Skipped (keeping current)")
|
2026-02-02 19:01:51 -08:00
|
|
|
print()
|
2026-03-06 05:27:11 -08:00
|
|
|
return default
|
2026-03-15 21:16:21 -07:00
|
|
|
print()
|
2026-02-02 19:13:41 -08:00
|
|
|
return idx
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-15 21:16:21 -07:00
|
|
|
print(color(question, Colors.YELLOW))
|
2026-03-02 00:52:27 -08:00
|
|
|
for i, choice in enumerate(choices):
|
|
|
|
|
marker = "●" if i == default else "○"
|
|
|
|
|
if i == default:
|
|
|
|
|
print(color(f" {marker} {choice}", Colors.GREEN))
|
|
|
|
|
else:
|
|
|
|
|
print(f" {marker} {choice}")
|
|
|
|
|
|
2026-03-06 05:27:11 -08:00
|
|
|
print_info(f" Enter for default ({default + 1}) Ctrl+C to exit")
|
|
|
|
|
|
2026-03-02 00:52:27 -08:00
|
|
|
while True:
|
|
|
|
|
try:
|
2026-03-11 01:33:29 +05:30
|
|
|
value = input(
|
|
|
|
|
color(f" Select [1-{len(choices)}] ({default + 1}): ", Colors.DIM)
|
|
|
|
|
)
|
2026-03-02 00:52:27 -08:00
|
|
|
if not value:
|
|
|
|
|
return default
|
|
|
|
|
idx = int(value) - 1
|
|
|
|
|
if 0 <= idx < len(choices):
|
|
|
|
|
return idx
|
|
|
|
|
print_error(f"Please enter a number between 1 and {len(choices)}")
|
|
|
|
|
except ValueError:
|
|
|
|
|
print_error("Please enter a number")
|
|
|
|
|
except (KeyboardInterrupt, EOFError):
|
|
|
|
|
print()
|
|
|
|
|
sys.exit(1)
|
2026-02-02 19:01:51 -08:00
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
def prompt_yes_no(question: str, default: bool = True) -> bool:
|
2026-03-06 05:27:11 -08:00
|
|
|
"""Prompt for yes/no. Ctrl+C exits, empty input returns default."""
|
2026-02-02 19:01:51 -08:00
|
|
|
default_str = "Y/n" if default else "y/N"
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
while True:
|
2026-03-06 05:27:11 -08:00
|
|
|
try:
|
2026-03-11 01:33:29 +05:30
|
|
|
value = (
|
|
|
|
|
input(color(f"{question} [{default_str}]: ", Colors.YELLOW))
|
|
|
|
|
.strip()
|
|
|
|
|
.lower()
|
|
|
|
|
)
|
2026-03-06 05:27:11 -08:00
|
|
|
except (KeyboardInterrupt, EOFError):
|
|
|
|
|
print()
|
|
|
|
|
sys.exit(1)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
if not value:
|
|
|
|
|
return default
|
2026-03-11 01:33:29 +05:30
|
|
|
if value in ("y", "yes"):
|
2026-02-02 19:01:51 -08:00
|
|
|
return True
|
2026-03-11 01:33:29 +05:30
|
|
|
if value in ("n", "no"):
|
2026-02-02 19:01:51 -08:00
|
|
|
return False
|
|
|
|
|
print_error("Please enter 'y' or 'n'")
|
|
|
|
|
|
|
|
|
|
|
2026-02-23 23:06:47 +00:00
|
|
|
def prompt_checklist(title: str, items: list, pre_selected: list = None) -> list:
|
|
|
|
|
"""
|
|
|
|
|
Display a multi-select checklist and return the indices of selected items.
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-23 23:06:47 +00:00
|
|
|
Each item in `items` is a display string. `pre_selected` is a list of
|
|
|
|
|
indices that should be checked by default. A "Continue →" option is
|
|
|
|
|
appended at the end — the user toggles items with Space and confirms
|
|
|
|
|
with Enter on "Continue →".
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-23 23:06:47 +00:00
|
|
|
Falls back to a numbered toggle interface when simple_term_menu is
|
|
|
|
|
unavailable.
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-23 23:06:47 +00:00
|
|
|
Returns:
|
|
|
|
|
List of selected indices (not including the Continue option).
|
|
|
|
|
"""
|
|
|
|
|
if pre_selected is None:
|
|
|
|
|
pre_selected = []
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-15 21:16:21 -07:00
|
|
|
from hermes_cli.curses_ui import curses_checklist
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-15 21:16:21 -07:00
|
|
|
chosen = curses_checklist(
|
|
|
|
|
title,
|
|
|
|
|
items,
|
|
|
|
|
set(pre_selected),
|
|
|
|
|
cancel_returns=set(pre_selected),
|
|
|
|
|
)
|
|
|
|
|
return sorted(chosen)
|
2026-02-23 23:06:47 +00:00
|
|
|
|
|
|
|
|
|
2026-02-23 23:38:33 +00:00
|
|
|
def _prompt_api_key(var: dict):
|
|
|
|
|
"""Display a nicely formatted API key input screen for a single env var."""
|
|
|
|
|
tools = var.get("tools", [])
|
|
|
|
|
tools_str = ", ".join(tools[:3])
|
|
|
|
|
if len(tools) > 3:
|
|
|
|
|
tools_str += f", +{len(tools) - 3} more"
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print(color(f" ─── {var.get('description', var['name'])} ───", Colors.CYAN))
|
|
|
|
|
print()
|
|
|
|
|
if tools_str:
|
|
|
|
|
print_info(f" Enables: {tools_str}")
|
|
|
|
|
if var.get("url"):
|
|
|
|
|
print_info(f" Get your key at: {var['url']}")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
if var.get("password"):
|
|
|
|
|
value = prompt(f" {var.get('prompt', var['name'])}", password=True)
|
|
|
|
|
else:
|
|
|
|
|
value = prompt(f" {var.get('prompt', var['name'])}")
|
|
|
|
|
|
|
|
|
|
if value:
|
|
|
|
|
save_env_value(var["name"], value)
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
print_success(" ✓ Saved")
|
2026-02-23 23:38:33 +00:00
|
|
|
else:
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
print_warning(" Skipped (configure later with 'hermes setup')")
|
2026-02-23 23:38:33 +00:00
|
|
|
|
|
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
def _print_setup_summary(config: dict, hermes_home):
|
|
|
|
|
"""Print the setup completion summary."""
|
|
|
|
|
# Tool availability summary
|
|
|
|
|
print()
|
|
|
|
|
print_header("Tool Availability Summary")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
tool_status = []
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-14 20:22:13 -07:00
|
|
|
# Vision — use the same runtime resolver as the actual vision tools
|
|
|
|
|
try:
|
|
|
|
|
from agent.auxiliary_client import get_available_vision_backends
|
2026-03-11 07:48:44 -07:00
|
|
|
|
2026-03-14 20:22:13 -07:00
|
|
|
_vision_backends = get_available_vision_backends()
|
|
|
|
|
except Exception:
|
|
|
|
|
_vision_backends = []
|
|
|
|
|
|
|
|
|
|
if _vision_backends:
|
2026-02-02 19:39:23 -08:00
|
|
|
tool_status.append(("Vision (image analysis)", True, None))
|
2026-03-11 07:48:44 -07:00
|
|
|
else:
|
|
|
|
|
tool_status.append(("Vision (image analysis)", False, "run 'hermes setup' to configure"))
|
|
|
|
|
|
|
|
|
|
# Mixture of Agents — requires OpenRouter specifically (calls multiple models)
|
|
|
|
|
if get_env_value("OPENROUTER_API_KEY"):
|
2026-02-02 19:39:23 -08:00
|
|
|
tool_status.append(("Mixture of Agents", True, None))
|
|
|
|
|
else:
|
|
|
|
|
tool_status.append(("Mixture of Agents", False, "OPENROUTER_API_KEY"))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-28 17:35:53 -07:00
|
|
|
# Web tools (Exa, Parallel, Firecrawl, or Tavily)
|
|
|
|
|
if get_env_value("EXA_API_KEY") or get_env_value("PARALLEL_API_KEY") or get_env_value("FIRECRAWL_API_KEY") or get_env_value("FIRECRAWL_API_URL") or get_env_value("TAVILY_API_KEY"):
|
2026-02-02 19:39:23 -08:00
|
|
|
tool_status.append(("Web Search & Extract", True, None))
|
|
|
|
|
else:
|
2026-03-28 17:35:53 -07:00
|
|
|
tool_status.append(("Web Search & Extract", False, "EXA_API_KEY, PARALLEL_API_KEY, FIRECRAWL_API_KEY, or TAVILY_API_KEY"))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-07 01:23:27 -08:00
|
|
|
# Browser tools (local Chromium or Browserbase cloud)
|
|
|
|
|
import shutil
|
2026-03-11 01:33:29 +05:30
|
|
|
|
|
|
|
|
_ab_found = (
|
|
|
|
|
shutil.which("agent-browser")
|
|
|
|
|
or (
|
|
|
|
|
Path(__file__).parent.parent / "node_modules" / ".bin" / "agent-browser"
|
|
|
|
|
).exists()
|
|
|
|
|
)
|
feat(browser): add Camofox local anti-detection browser backend (#4008)
Camofox-browser is a self-hosted Node.js server wrapping Camoufox
(Firefox fork with C++ fingerprint spoofing). When CAMOFOX_URL is set,
all 11 browser tools route through the Camofox REST API instead of
the agent-browser CLI.
Maps 1:1 to the existing browser tool interface:
- Navigate, snapshot, click, type, scroll, back, press, close
- Get images, vision (screenshot + LLM analysis)
- Console (returns empty with note — camofox limitation)
Setup: npm start in camofox-browser dir, or docker run -p 9377:9377
Then: CAMOFOX_URL=http://localhost:9377 in ~/.hermes/.env
Advantages over Browserbase (cloud):
- Free (no per-session API costs)
- Local (zero network latency for browser ops)
- Anti-detection at C++ level (bypasses Cloudflare/Google bot detection)
- Works offline, Docker-ready
Files:
- tools/browser_camofox.py: Full REST backend (~400 lines)
- tools/browser_tool.py: Routing at each tool function
- hermes_cli/config.py: CAMOFOX_URL env var entry
- tests/tools/test_browser_camofox.py: 20 tests
2026-03-30 13:18:42 -07:00
|
|
|
if get_env_value("CAMOFOX_URL"):
|
|
|
|
|
tool_status.append(("Browser Automation (Camofox)", True, None))
|
|
|
|
|
elif get_env_value("BROWSERBASE_API_KEY"):
|
2026-03-07 01:23:27 -08:00
|
|
|
tool_status.append(("Browser Automation (Browserbase)", True, None))
|
|
|
|
|
elif _ab_found:
|
|
|
|
|
tool_status.append(("Browser Automation (local)", True, None))
|
2026-02-02 19:39:23 -08:00
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
tool_status.append(
|
feat(browser): add Camofox local anti-detection browser backend (#4008)
Camofox-browser is a self-hosted Node.js server wrapping Camoufox
(Firefox fork with C++ fingerprint spoofing). When CAMOFOX_URL is set,
all 11 browser tools route through the Camofox REST API instead of
the agent-browser CLI.
Maps 1:1 to the existing browser tool interface:
- Navigate, snapshot, click, type, scroll, back, press, close
- Get images, vision (screenshot + LLM analysis)
- Console (returns empty with note — camofox limitation)
Setup: npm start in camofox-browser dir, or docker run -p 9377:9377
Then: CAMOFOX_URL=http://localhost:9377 in ~/.hermes/.env
Advantages over Browserbase (cloud):
- Free (no per-session API costs)
- Local (zero network latency for browser ops)
- Anti-detection at C++ level (bypasses Cloudflare/Google bot detection)
- Works offline, Docker-ready
Files:
- tools/browser_camofox.py: Full REST backend (~400 lines)
- tools/browser_tool.py: Routing at each tool function
- hermes_cli/config.py: CAMOFOX_URL env var entry
- tests/tools/test_browser_camofox.py: 20 tests
2026-03-30 13:18:42 -07:00
|
|
|
("Browser Automation", False, "npm install -g agent-browser or set CAMOFOX_URL")
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
|
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
# FAL (image generation)
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("FAL_KEY"):
|
2026-02-02 19:39:23 -08:00
|
|
|
tool_status.append(("Image Generation", True, None))
|
|
|
|
|
else:
|
|
|
|
|
tool_status.append(("Image Generation", False, "FAL_KEY"))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# TTS — show configured provider
|
2026-03-11 01:33:29 +05:30
|
|
|
tts_provider = config.get("tts", {}).get("provider", "edge")
|
|
|
|
|
if tts_provider == "elevenlabs" and get_env_value("ELEVENLABS_API_KEY"):
|
2026-02-12 10:05:08 -08:00
|
|
|
tool_status.append(("Text-to-Speech (ElevenLabs)", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
elif tts_provider == "openai" and get_env_value("VOICE_TOOLS_OPENAI_KEY"):
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
tool_status.append(("Text-to-Speech (OpenAI)", True, None))
|
2026-03-17 02:33:12 -07:00
|
|
|
elif tts_provider == "neutts":
|
|
|
|
|
try:
|
|
|
|
|
import importlib.util
|
|
|
|
|
neutts_ok = importlib.util.find_spec("neutts") is not None
|
|
|
|
|
except Exception:
|
|
|
|
|
neutts_ok = False
|
|
|
|
|
if neutts_ok:
|
|
|
|
|
tool_status.append(("Text-to-Speech (NeuTTS local)", True, None))
|
|
|
|
|
else:
|
|
|
|
|
tool_status.append(("Text-to-Speech (NeuTTS — not installed)", False, "run 'hermes setup tts'"))
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
else:
|
|
|
|
|
tool_status.append(("Text-to-Speech (Edge TTS)", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-04 09:36:51 -08:00
|
|
|
# Tinker + WandB (RL training)
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("TINKER_API_KEY") and get_env_value("WANDB_API_KEY"):
|
2026-02-04 09:36:51 -08:00
|
|
|
tool_status.append(("RL Training (Tinker)", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
elif get_env_value("TINKER_API_KEY"):
|
2026-02-04 09:36:51 -08:00
|
|
|
tool_status.append(("RL Training (Tinker)", False, "WANDB_API_KEY"))
|
|
|
|
|
else:
|
|
|
|
|
tool_status.append(("RL Training (Tinker)", False, "TINKER_API_KEY"))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Home Assistant
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("HASS_TOKEN"):
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
tool_status.append(("Smart Home (Home Assistant)", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
Add Skills Hub — universal skill search, install, and management from online registries
Implements the Hermes Skills Hub with agentskills.io spec compliance,
multi-registry skill discovery, security scanning, and user-driven
management via CLI and /skills slash command.
Core features:
- Security scanner (tools/skills_guard.py): 120 threat patterns across
12 categories, trust-aware install policy (builtin/trusted/community),
structural checks, unicode injection detection, LLM audit pass
- Hub client (tools/skills_hub.py): GitHub, ClawHub, Claude Code
marketplace, and LobeHub source adapters with shared GitHubAuth
(PAT + gh CLI + GitHub App), lock file provenance tracking, quarantine
flow, and unified search across all sources
- CLI interface (hermes_cli/skills_hub.py): search, install, inspect,
list, audit, uninstall, publish (GitHub PR), snapshot export/import,
and tap management — powers both `hermes skills` and `/skills`
Spec conformance (Phase 0):
- Upgraded frontmatter parser to yaml.safe_load with fallback
- Migrated 39 SKILL.md files: tags/related_skills to metadata.hermes.*
- Added assets/ directory support and compatibility/metadata fields
- Excluded .hub/ from skill discovery in skills_tool.py
Updated 13 config/doc files including README, AGENTS.md, .env.example,
setup wizard, doctor, status, pyproject.toml, and docs.
2026-02-18 16:09:05 -08:00
|
|
|
# Skills Hub
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("GITHUB_TOKEN"):
|
Add Skills Hub — universal skill search, install, and management from online registries
Implements the Hermes Skills Hub with agentskills.io spec compliance,
multi-registry skill discovery, security scanning, and user-driven
management via CLI and /skills slash command.
Core features:
- Security scanner (tools/skills_guard.py): 120 threat patterns across
12 categories, trust-aware install policy (builtin/trusted/community),
structural checks, unicode injection detection, LLM audit pass
- Hub client (tools/skills_hub.py): GitHub, ClawHub, Claude Code
marketplace, and LobeHub source adapters with shared GitHubAuth
(PAT + gh CLI + GitHub App), lock file provenance tracking, quarantine
flow, and unified search across all sources
- CLI interface (hermes_cli/skills_hub.py): search, install, inspect,
list, audit, uninstall, publish (GitHub PR), snapshot export/import,
and tap management — powers both `hermes skills` and `/skills`
Spec conformance (Phase 0):
- Upgraded frontmatter parser to yaml.safe_load with fallback
- Migrated 39 SKILL.md files: tags/related_skills to metadata.hermes.*
- Added assets/ directory support and compatibility/metadata fields
- Excluded .hub/ from skill discovery in skills_tool.py
Updated 13 config/doc files including README, AGENTS.md, .env.example,
setup wizard, doctor, status, pyproject.toml, and docs.
2026-02-18 16:09:05 -08:00
|
|
|
tool_status.append(("Skills Hub (GitHub)", True, None))
|
|
|
|
|
else:
|
|
|
|
|
tool_status.append(("Skills Hub (GitHub)", False, "GITHUB_TOKEN"))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
# Terminal (always available if system deps met)
|
|
|
|
|
tool_status.append(("Terminal/Commands", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-17 23:30:31 -08:00
|
|
|
# Task planning (always available, in-memory)
|
|
|
|
|
tool_status.append(("Task Planning (todo)", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-19 18:25:53 -08:00
|
|
|
# Skills (always available -- bundled skills + user-created skills)
|
|
|
|
|
tool_status.append(("Skills (view, create, edit)", True, None))
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
# Print status
|
|
|
|
|
available_count = sum(1 for _, avail, _ in tool_status if avail)
|
|
|
|
|
total_count = len(tool_status)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
print_info(f"{available_count}/{total_count} tool categories available:")
|
|
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
for name, available, missing_var in tool_status:
|
|
|
|
|
if available:
|
|
|
|
|
print(f" {color('✓', Colors.GREEN)} {name}")
|
|
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
f" {color('✗', Colors.RED)} {name} {color(f'(missing {missing_var})', Colors.DIM)}"
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
disabled_tools = [(name, var) for name, avail, var in tool_status if not avail]
|
|
|
|
|
if disabled_tools:
|
2026-03-11 01:33:29 +05:30
|
|
|
print_warning(
|
|
|
|
|
"Some tools are disabled. Run 'hermes setup tools' to configure them,"
|
|
|
|
|
)
|
2026-03-29 15:15:17 -07:00
|
|
|
from hermes_constants import display_hermes_home as _dhh
|
|
|
|
|
print_warning(f"or edit {_dhh()}/.env directly to add the missing API keys.")
|
2026-02-02 19:39:23 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
# Done banner
|
|
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"┌─────────────────────────────────────────────────────────┐", Colors.GREEN
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"│ ✓ Setup Complete! │", Colors.GREEN
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"└─────────────────────────────────────────────────────────┘", Colors.GREEN
|
|
|
|
|
)
|
|
|
|
|
)
|
2026-02-02 19:39:23 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
# Show file locations prominently
|
2026-03-29 15:15:17 -07:00
|
|
|
from hermes_constants import display_hermes_home as _dhh
|
|
|
|
|
print(color(f"📁 All your files are in {_dhh()}/:", Colors.CYAN, Colors.BOLD))
|
2026-02-02 19:39:23 -08:00
|
|
|
print()
|
|
|
|
|
print(f" {color('Settings:', Colors.YELLOW)} {get_config_path()}")
|
|
|
|
|
print(f" {color('API Keys:', Colors.YELLOW)} {get_env_path()}")
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
f" {color('Data:', Colors.YELLOW)} {hermes_home}/cron/, sessions/, logs/"
|
|
|
|
|
)
|
2026-02-02 19:39:23 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
print(color("─" * 60, Colors.DIM))
|
|
|
|
|
print()
|
|
|
|
|
print(color("📝 To edit your configuration:", Colors.CYAN, Colors.BOLD))
|
|
|
|
|
print()
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print(f" {color('hermes setup', Colors.GREEN)} Re-run the full wizard")
|
|
|
|
|
print(f" {color('hermes setup model', Colors.GREEN)} Change model/provider")
|
|
|
|
|
print(f" {color('hermes setup terminal', Colors.GREEN)} Change terminal backend")
|
|
|
|
|
print(f" {color('hermes setup gateway', Colors.GREEN)} Configure messaging")
|
|
|
|
|
print(f" {color('hermes setup tools', Colors.GREEN)} Configure tool providers")
|
|
|
|
|
print()
|
|
|
|
|
print(f" {color('hermes config', Colors.GREEN)} View current settings")
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
f" {color('hermes config edit', Colors.GREEN)} Open config in your editor"
|
|
|
|
|
)
|
2026-03-11 09:07:30 -07:00
|
|
|
print(f" {color('hermes config set <key> <value>', Colors.GREEN)}")
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
print(" Set a specific value")
|
2026-02-02 19:39:23 -08:00
|
|
|
print()
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
print(" Or edit the files directly:")
|
2026-02-02 19:39:23 -08:00
|
|
|
print(f" {color(f'nano {get_config_path()}', Colors.DIM)}")
|
|
|
|
|
print(f" {color(f'nano {get_env_path()}', Colors.DIM)}")
|
|
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:39:23 -08:00
|
|
|
print(color("─" * 60, Colors.DIM))
|
|
|
|
|
print()
|
|
|
|
|
print(color("🚀 Ready to go!", Colors.CYAN, Colors.BOLD))
|
|
|
|
|
print()
|
|
|
|
|
print(f" {color('hermes', Colors.GREEN)} Start chatting")
|
|
|
|
|
print(f" {color('hermes gateway', Colors.GREEN)} Start messaging gateway")
|
|
|
|
|
print(f" {color('hermes doctor', Colors.GREEN)} Check for issues")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
|
2026-03-04 03:29:05 -08:00
|
|
|
def _prompt_container_resources(config: dict):
|
2026-03-06 03:37:05 -08:00
|
|
|
"""Prompt for container resource settings (Docker, Singularity, Modal, Daytona)."""
|
2026-03-11 01:33:29 +05:30
|
|
|
terminal = config.setdefault("terminal", {})
|
2026-03-04 03:29:05 -08:00
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print_info("Container Resource Settings:")
|
|
|
|
|
|
|
|
|
|
# Persistence
|
2026-03-11 01:33:29 +05:30
|
|
|
current_persist = terminal.get("container_persistent", True)
|
2026-03-04 03:29:05 -08:00
|
|
|
persist_label = "yes" if current_persist else "no"
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_info(" Persistent filesystem keeps files between sessions.")
|
|
|
|
|
print_info(" Set to 'no' for ephemeral sandboxes that reset each time.")
|
2026-03-11 01:33:29 +05:30
|
|
|
persist_str = prompt(
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
" Persist filesystem across sessions? (yes/no)", persist_label
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
|
|
|
|
terminal["container_persistent"] = persist_str.lower() in ("yes", "true", "y", "1")
|
2026-03-04 03:29:05 -08:00
|
|
|
|
|
|
|
|
# CPU
|
2026-03-11 01:33:29 +05:30
|
|
|
current_cpu = terminal.get("container_cpu", 1)
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
cpu_str = prompt(" CPU cores", str(current_cpu))
|
2026-03-04 03:29:05 -08:00
|
|
|
try:
|
2026-03-11 01:33:29 +05:30
|
|
|
terminal["container_cpu"] = float(cpu_str)
|
2026-03-04 03:29:05 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
# Memory
|
2026-03-11 01:33:29 +05:30
|
|
|
current_mem = terminal.get("container_memory", 5120)
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
mem_str = prompt(" Memory in MB (5120 = 5GB)", str(current_mem))
|
2026-03-04 03:29:05 -08:00
|
|
|
try:
|
2026-03-11 01:33:29 +05:30
|
|
|
terminal["container_memory"] = int(mem_str)
|
2026-03-04 03:29:05 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
# Disk
|
2026-03-11 01:33:29 +05:30
|
|
|
current_disk = terminal.get("container_disk", 51200)
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
disk_str = prompt(" Disk in MB (51200 = 50GB)", str(current_disk))
|
2026-03-04 03:29:05 -08:00
|
|
|
try:
|
2026-03-11 01:33:29 +05:30
|
|
|
terminal["container_disk"] = int(disk_str)
|
2026-03-04 03:29:05 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2026-03-06 18:11:35 -08:00
|
|
|
# Tool categories and provider config are now in tools_config.py (shared
|
|
|
|
|
# between `hermes tools` and `hermes setup tools`).
|
2026-02-23 23:25:38 +00:00
|
|
|
|
2026-02-23 23:32:32 +00:00
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# =============================================================================
|
|
|
|
|
# Section 1: Model & Provider Configuration
|
|
|
|
|
# =============================================================================
|
2026-02-20 17:24:00 -08:00
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-31 01:04:07 -07:00
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
def setup_model_provider(config: dict):
|
2026-03-31 01:04:07 -07:00
|
|
|
"""Configure the inference provider and default model.
|
|
|
|
|
|
|
|
|
|
Delegates to ``cmd_model()`` (the same flow used by ``hermes model``)
|
|
|
|
|
for provider selection, credential prompting, and model picking.
|
|
|
|
|
This ensures a single code path for all provider setup — any new
|
|
|
|
|
provider added to ``hermes model`` is automatically available here.
|
|
|
|
|
"""
|
|
|
|
|
from hermes_cli.config import load_config, save_config
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
print_header("Inference Provider")
|
|
|
|
|
print_info("Choose how to connect to your main chat model.")
|
|
|
|
|
print()
|
|
|
|
|
|
2026-03-31 01:04:07 -07:00
|
|
|
# Delegate to the shared hermes model flow — handles provider picker,
|
|
|
|
|
# credential prompting, model selection, and config persistence.
|
|
|
|
|
from hermes_cli.main import select_provider_and_model
|
|
|
|
|
try:
|
|
|
|
|
select_provider_and_model()
|
|
|
|
|
except (SystemExit, KeyboardInterrupt):
|
|
|
|
|
print()
|
|
|
|
|
print_info("Provider setup skipped.")
|
|
|
|
|
except Exception as exc:
|
|
|
|
|
logger.debug("select_provider_and_model error during setup: %s", exc)
|
|
|
|
|
print_warning(f"Provider setup encountered an error: {exc}")
|
|
|
|
|
print_info("You can try again later with: hermes model")
|
|
|
|
|
|
|
|
|
|
# Re-sync the wizard's config dict from what cmd_model saved to disk.
|
|
|
|
|
# This is critical: cmd_model writes to disk via its own load/save cycle,
|
|
|
|
|
# and the wizard's final save_config(config) must not overwrite those
|
|
|
|
|
# changes with stale values (#4172).
|
|
|
|
|
_refreshed = load_config()
|
|
|
|
|
config["model"] = _refreshed.get("model", config.get("model"))
|
|
|
|
|
if _refreshed.get("custom_providers"):
|
|
|
|
|
config["custom_providers"] = _refreshed["custom_providers"]
|
|
|
|
|
|
|
|
|
|
# Derive the selected provider for downstream steps (vision setup).
|
|
|
|
|
selected_provider = None
|
|
|
|
|
_m = config.get("model")
|
|
|
|
|
if isinstance(_m, dict):
|
|
|
|
|
selected_provider = _m.get("provider")
|
feat: add Hugging Face as a first-class inference provider (#3419)
Salvage of PR #1747 (original PR #1171 by @davanstrien) onto current main.
Registers Hugging Face Inference Providers (router.huggingface.co/v1) as a named provider:
- hermes chat --provider huggingface (or --provider hf)
- 18 curated open models via hermes model picker
- HF_TOKEN in ~/.hermes/.env
- OpenAI-compatible endpoint with automatic failover (Groq, Together, SambaNova, etc.)
Files: auth.py, models.py, main.py, setup.py, config.py, model_metadata.py, .env.example, 5 docs pages, 17 new tests.
Co-authored-by: Daniel van Strien <davanstrien@gmail.com>
2026-03-27 12:41:59 -07:00
|
|
|
|
2026-02-20 17:24:00 -08:00
|
|
|
|
feat(auth): same-provider credential pools with rotation, custom endpoint support, and interactive CLI (#2647)
* feat(auth): add same-provider credential pools and rotation UX
Add same-provider credential pooling so Hermes can rotate across
multiple credentials for a single provider, recover from exhausted
credentials without jumping providers immediately, and configure
that behavior directly in hermes setup.
- agent/credential_pool.py: persisted per-provider credential pools
- hermes auth add/list/remove/reset CLI commands
- 429/402/401 recovery with pool rotation in run_agent.py
- Setup wizard integration for pool strategy configuration
- Auto-seeding from env vars and existing OAuth state
Co-authored-by: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com>
Salvaged from PR #2647
* fix(tests): prevent pool auto-seeding from host env in credential pool tests
Tests for non-pool Anthropic paths and auth remove were failing when
host env vars (ANTHROPIC_API_KEY) or file-backed OAuth credentials
were present. The pool auto-seeding picked these up, causing unexpected
pool entries in tests.
- Mock _select_pool_entry in auxiliary_client OAuth flag tests
- Clear Anthropic env vars and mock _seed_from_singletons in auth remove test
* feat(auth): add thread safety, least_used strategy, and request counting
- Add threading.Lock to CredentialPool for gateway thread safety
(concurrent requests from multiple gateway sessions could race on
pool state mutations without this)
- Add 'least_used' rotation strategy that selects the credential
with the lowest request_count, distributing load more evenly
- Add request_count field to PooledCredential for usage tracking
- Add mark_used() method to increment per-credential request counts
- Wrap select(), mark_exhausted_and_rotate(), and try_refresh_current()
with lock acquisition
- Add tests: least_used selection, mark_used counting, concurrent
thread safety (4 threads × 20 selects with no corruption)
* feat(auth): add interactive mode for bare 'hermes auth' command
When 'hermes auth' is called without a subcommand, it now launches an
interactive wizard that:
1. Shows full credential pool status across all providers
2. Offers a menu: add, remove, reset cooldowns, set strategy
3. For OAuth-capable providers (anthropic, nous, openai-codex), the
add flow explicitly asks 'API key or OAuth login?' — making it
clear that both auth types are supported for the same provider
4. Strategy picker shows all 4 options (fill_first, round_robin,
least_used, random) with the current selection marked
5. Remove flow shows entries with indices for easy selection
The subcommand paths (hermes auth add/list/remove/reset) still work
exactly as before for scripted/non-interactive use.
* fix(tests): update runtime_provider tests for config.yaml source of truth (#4165)
Tests were using OPENAI_BASE_URL env var which is no longer consulted
after #4165. Updated to use model config (provider, base_url, api_key)
which is the new single source of truth for custom endpoint URLs.
* feat(auth): support custom endpoint credential pools keyed by provider name
Custom OpenAI-compatible endpoints all share provider='custom', making
the provider-keyed pool useless. Now pools for custom endpoints are
keyed by 'custom:<normalized_name>' where the name comes from the
custom_providers config list (auto-generated from URL hostname).
- Pool key format: 'custom:together.ai', 'custom:local-(localhost:8080)'
- load_pool('custom:name') seeds from custom_providers api_key AND
model.api_key when base_url matches
- hermes auth add/list now shows custom endpoints alongside registry
providers
- _resolve_openrouter_runtime and _resolve_named_custom_runtime check
pool before falling back to single config key
- 6 new tests covering custom pool keying, seeding, and listing
* docs: add Excalidraw diagram of full credential pool flow
Comprehensive architecture diagram showing:
- Credential sources (env vars, auth.json OAuth, config.yaml, CLI)
- Pool storage and auto-seeding
- Runtime resolution paths (registry, custom, OpenRouter)
- Error recovery (429 retry-then-rotate, 402 immediate, 401 refresh)
- CLI management commands and strategy configuration
Open at: https://excalidraw.com/#json=2Ycqhqpi6f12E_3ITyiwh,c7u9jSt5BwrmiVzHGbm87g
* fix(tests): update setup wizard pool tests for unified select_provider_and_model flow
The setup wizard now delegates to select_provider_and_model() instead
of using its own prompt_choice-based provider picker. Tests needed:
- Mock select_provider_and_model as no-op (provider pre-written to config)
- Call _stub_tts BEFORE custom prompt_choice mock (it overwrites it)
- Pre-write model.provider to config so the pool step is reached
* docs: add comprehensive credential pool documentation
- New page: website/docs/user-guide/features/credential-pools.md
Full guide covering quick start, CLI commands, rotation strategies,
error recovery, custom endpoint pools, auto-discovery, thread safety,
architecture, and storage format.
- Updated fallback-providers.md to reference credential pools as the
first layer of resilience (same-provider rotation before cross-provider)
- Added hermes auth to CLI commands reference with usage examples
- Added credential_pool_strategies to configuration guide
* chore: remove excalidraw diagram from repo (external link only)
* refactor: simplify credential pool code — extract helpers, collapse extras, dedup patterns
- _load_config_safe(): replace 4 identical try/except/import blocks
- _iter_custom_providers(): shared generator for custom provider iteration
- PooledCredential.extra dict: collapse 11 round-trip-only fields
(token_type, scope, client_id, portal_base_url, obtained_at,
expires_in, agent_key_id, agent_key_expires_in, agent_key_reused,
agent_key_obtained_at, tls) into a single extra dict with
__getattr__ for backward-compatible access
- _available_entries(): shared exhaustion-check between select and peek
- Dedup anthropic OAuth seeding (hermes_pkce + claude_code identical)
- SimpleNamespace replaces class _Args boilerplate in auth_commands
- _try_resolve_from_custom_pool(): shared pool-check in runtime_provider
Net -17 lines. All 383 targeted tests pass.
---------
Co-authored-by: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com>
2026-03-31 03:10:01 -07:00
|
|
|
# ── Same-provider fallback & rotation setup ──
|
|
|
|
|
if _supports_same_provider_pool_setup(selected_provider):
|
|
|
|
|
try:
|
|
|
|
|
from types import SimpleNamespace
|
|
|
|
|
from agent.credential_pool import load_pool
|
|
|
|
|
from hermes_cli.auth_commands import auth_add_command
|
|
|
|
|
|
|
|
|
|
pool = load_pool(selected_provider)
|
|
|
|
|
entries = pool.entries()
|
|
|
|
|
entry_count = len(entries)
|
|
|
|
|
manual_count = sum(1 for entry in entries if str(getattr(entry, "source", "")).startswith("manual"))
|
|
|
|
|
auto_count = entry_count - manual_count
|
|
|
|
|
print()
|
|
|
|
|
print_header("Same-Provider Fallback & Rotation")
|
|
|
|
|
print_info(
|
|
|
|
|
"Hermes can keep multiple credentials for one provider and rotate between"
|
|
|
|
|
)
|
|
|
|
|
print_info(
|
|
|
|
|
"them when a credential is exhausted or rate-limited. This preserves"
|
|
|
|
|
)
|
|
|
|
|
print_info(
|
|
|
|
|
"your primary provider while reducing interruptions from quota issues."
|
|
|
|
|
)
|
|
|
|
|
print()
|
|
|
|
|
if auto_count > 0:
|
|
|
|
|
print_info(
|
|
|
|
|
f"Current pooled credentials for {selected_provider}: {entry_count} "
|
|
|
|
|
f"({manual_count} manual, {auto_count} auto-detected from env/shared auth)"
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
print_info(f"Current pooled credentials for {selected_provider}: {entry_count}")
|
|
|
|
|
|
|
|
|
|
while prompt_yes_no("Add another credential for same-provider fallback?", False):
|
|
|
|
|
auth_add_command(
|
|
|
|
|
SimpleNamespace(
|
|
|
|
|
provider=selected_provider,
|
|
|
|
|
auth_type="",
|
|
|
|
|
label=None,
|
|
|
|
|
api_key=None,
|
|
|
|
|
portal_url=None,
|
|
|
|
|
inference_url=None,
|
|
|
|
|
client_id=None,
|
|
|
|
|
scope=None,
|
|
|
|
|
no_browser=False,
|
|
|
|
|
timeout=15.0,
|
|
|
|
|
insecure=False,
|
|
|
|
|
ca_bundle=None,
|
|
|
|
|
min_key_ttl_seconds=5 * 60,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
pool = load_pool(selected_provider)
|
|
|
|
|
entry_count = len(pool.entries())
|
|
|
|
|
print_info(f"Provider pool now has {entry_count} credential(s).")
|
|
|
|
|
|
|
|
|
|
if entry_count > 1:
|
|
|
|
|
strategy_labels = [
|
|
|
|
|
"Fill-first / sticky — keep using the first healthy credential until it is exhausted",
|
|
|
|
|
"Round robin — rotate to the next healthy credential after each selection",
|
|
|
|
|
"Random — pick a random healthy credential each time",
|
|
|
|
|
]
|
|
|
|
|
current_strategy = _get_credential_pool_strategies(config).get(selected_provider, "fill_first")
|
|
|
|
|
default_strategy_idx = {
|
|
|
|
|
"fill_first": 0,
|
|
|
|
|
"round_robin": 1,
|
|
|
|
|
"random": 2,
|
|
|
|
|
}.get(current_strategy, 0)
|
|
|
|
|
strategy_idx = prompt_choice(
|
|
|
|
|
"Select same-provider rotation strategy:",
|
|
|
|
|
strategy_labels,
|
|
|
|
|
default_strategy_idx,
|
|
|
|
|
)
|
|
|
|
|
strategy_value = ["fill_first", "round_robin", "random"][strategy_idx]
|
|
|
|
|
_set_credential_pool_strategy(config, selected_provider, strategy_value)
|
|
|
|
|
print_success(f"Saved {selected_provider} rotation strategy: {strategy_value}")
|
|
|
|
|
else:
|
|
|
|
|
_set_credential_pool_strategy(config, selected_provider, "fill_first")
|
|
|
|
|
except Exception as exc:
|
|
|
|
|
logger.debug("Could not configure same-provider fallback in setup: %s", exc)
|
|
|
|
|
|
2026-03-11 07:48:44 -07:00
|
|
|
# ── Vision & Image Analysis Setup ──
|
2026-03-14 20:22:13 -07:00
|
|
|
# Keep setup aligned with the actual runtime resolver the vision tools use.
|
|
|
|
|
try:
|
|
|
|
|
from agent.auxiliary_client import get_available_vision_backends
|
2026-03-11 07:48:44 -07:00
|
|
|
|
2026-03-14 20:22:13 -07:00
|
|
|
_vision_backends = set(get_available_vision_backends())
|
|
|
|
|
except Exception:
|
|
|
|
|
_vision_backends = set()
|
|
|
|
|
|
|
|
|
|
_vision_needs_setup = not bool(_vision_backends)
|
|
|
|
|
|
2026-03-14 21:14:20 -07:00
|
|
|
if selected_provider in _vision_backends:
|
|
|
|
|
# If the user just selected a backend Hermes can already use for
|
|
|
|
|
# vision, treat it as covered. Auth/setup failure returns earlier.
|
2026-03-11 07:48:44 -07:00
|
|
|
_vision_needs_setup = False
|
|
|
|
|
|
|
|
|
|
if _vision_needs_setup:
|
|
|
|
|
_prov_names = {
|
|
|
|
|
"nous-api": "Nous Portal API key",
|
2026-03-17 23:40:22 -07:00
|
|
|
"copilot": "GitHub Copilot",
|
|
|
|
|
"copilot-acp": "GitHub Copilot ACP",
|
2026-03-11 07:48:44 -07:00
|
|
|
"zai": "Z.AI / GLM",
|
|
|
|
|
"kimi-coding": "Kimi / Moonshot",
|
|
|
|
|
"minimax": "MiniMax",
|
|
|
|
|
"minimax-cn": "MiniMax CN",
|
|
|
|
|
"anthropic": "Anthropic",
|
2026-03-17 00:12:16 -07:00
|
|
|
"ai-gateway": "AI Gateway",
|
2026-03-11 07:48:44 -07:00
|
|
|
"custom": "your custom endpoint",
|
|
|
|
|
}
|
|
|
|
|
_prov_display = _prov_names.get(selected_provider, selected_provider or "your provider")
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print_header("Vision & Image Analysis (optional)")
|
2026-03-14 20:22:13 -07:00
|
|
|
print_info(f"Vision uses a separate multimodal backend. {_prov_display}")
|
|
|
|
|
print_info("doesn't currently provide one Hermes can auto-use for vision,")
|
|
|
|
|
print_info("so choose a backend now or skip and configure later.")
|
2026-02-20 17:24:00 -08:00
|
|
|
print()
|
|
|
|
|
|
2026-03-11 07:48:44 -07:00
|
|
|
_vision_choices = [
|
|
|
|
|
"OpenRouter — uses Gemini (free tier at openrouter.ai/keys)",
|
2026-03-14 20:22:13 -07:00
|
|
|
"OpenAI-compatible endpoint — base URL, API key, and vision model",
|
2026-03-11 07:48:44 -07:00
|
|
|
"Skip for now",
|
|
|
|
|
]
|
|
|
|
|
_vision_idx = prompt_choice("Configure vision:", _vision_choices, 2)
|
|
|
|
|
|
|
|
|
|
if _vision_idx == 0: # OpenRouter
|
2026-03-14 20:22:13 -07:00
|
|
|
_or_key = prompt(" OpenRouter API key", password=True).strip()
|
2026-03-11 07:48:44 -07:00
|
|
|
if _or_key:
|
|
|
|
|
save_env_value("OPENROUTER_API_KEY", _or_key)
|
|
|
|
|
print_success("OpenRouter key saved — vision will use Gemini")
|
|
|
|
|
else:
|
|
|
|
|
print_info("Skipped — vision won't be available")
|
2026-03-14 20:22:13 -07:00
|
|
|
elif _vision_idx == 1: # OpenAI-compatible endpoint
|
|
|
|
|
_base_url = prompt(" Base URL (blank for OpenAI)").strip() or "https://api.openai.com/v1"
|
|
|
|
|
_api_key_label = " API key"
|
|
|
|
|
if "api.openai.com" in _base_url.lower():
|
|
|
|
|
_api_key_label = " OpenAI API key"
|
|
|
|
|
_oai_key = prompt(_api_key_label, password=True).strip()
|
2026-03-11 07:48:44 -07:00
|
|
|
if _oai_key:
|
|
|
|
|
save_env_value("OPENAI_API_KEY", _oai_key)
|
refactor: make config.yaml the single source of truth for endpoint URLs (#4165)
OPENAI_BASE_URL was written to .env AND config.yaml, creating a dual-source
confusion. Users (especially Docker) would see the URL in .env and assume
that's where all config lives, then wonder why LLM_MODEL in .env didn't work.
Changes:
- Remove all 27 save_env_value("OPENAI_BASE_URL", ...) calls across main.py,
setup.py, and tools_config.py
- Remove OPENAI_BASE_URL env var reading from runtime_provider.py, cli.py,
models.py, and gateway/run.py
- Remove LLM_MODEL/HERMES_MODEL env var reading from gateway/run.py and
auxiliary_client.py — config.yaml model.default is authoritative
- Vision base URL now saved to config.yaml auxiliary.vision.base_url
(both setup wizard and tools_config paths)
- Tests updated to set config values instead of env vars
Convention enforced: .env is for SECRETS only (API keys). All other
configuration (model names, base URLs, provider selection) lives
exclusively in config.yaml.
2026-03-30 22:02:53 -07:00
|
|
|
# Save vision base URL to config (not .env — only secrets go there)
|
|
|
|
|
_vaux = config.setdefault("auxiliary", {}).setdefault("vision", {})
|
|
|
|
|
_vaux["base_url"] = _base_url
|
2026-03-14 20:22:13 -07:00
|
|
|
if "api.openai.com" in _base_url.lower():
|
|
|
|
|
_oai_vision_models = ["gpt-4o", "gpt-4o-mini", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano"]
|
|
|
|
|
_vm_choices = _oai_vision_models + ["Use default (gpt-4o-mini)"]
|
|
|
|
|
_vm_idx = prompt_choice("Select vision model:", _vm_choices, 0)
|
|
|
|
|
_selected_vision_model = (
|
|
|
|
|
_oai_vision_models[_vm_idx]
|
|
|
|
|
if _vm_idx < len(_oai_vision_models)
|
|
|
|
|
else "gpt-4o-mini"
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
_selected_vision_model = prompt(" Vision model (blank = use main/custom default)").strip()
|
2026-03-14 10:37:45 -07:00
|
|
|
save_env_value("AUXILIARY_VISION_MODEL", _selected_vision_model)
|
2026-03-14 20:22:13 -07:00
|
|
|
print_success(
|
|
|
|
|
f"Vision configured with {_base_url}"
|
|
|
|
|
+ (f" ({_selected_vision_model})" if _selected_vision_model else "")
|
|
|
|
|
)
|
2026-03-11 07:48:44 -07:00
|
|
|
else:
|
|
|
|
|
print_info("Skipped — vision won't be available")
|
2026-02-20 17:24:00 -08:00
|
|
|
else:
|
2026-03-14 20:22:13 -07:00
|
|
|
print_info("Skipped — add later with 'hermes setup' or configure AUXILIARY_VISION_* settings")
|
2026-02-20 17:24:00 -08:00
|
|
|
|
2026-03-16 00:18:30 -07:00
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
save_config(config)
|
|
|
|
|
|
2026-03-17 02:33:12 -07:00
|
|
|
# Offer TTS provider selection at the end of model setup
|
|
|
|
|
_setup_tts_provider(config)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Section 1b: TTS Provider Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _check_espeak_ng() -> bool:
|
|
|
|
|
"""Check if espeak-ng is installed."""
|
|
|
|
|
import shutil
|
|
|
|
|
return shutil.which("espeak-ng") is not None or shutil.which("espeak") is not None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _install_neutts_deps() -> bool:
|
|
|
|
|
"""Install NeuTTS dependencies with user approval. Returns True on success."""
|
2026-03-17 03:53:35 -07:00
|
|
|
import subprocess
|
2026-03-17 02:33:12 -07:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# Check espeak-ng
|
|
|
|
|
if not _check_espeak_ng():
|
|
|
|
|
print()
|
|
|
|
|
print_warning("NeuTTS requires espeak-ng for phonemization.")
|
|
|
|
|
if sys.platform == "darwin":
|
|
|
|
|
print_info("Install with: brew install espeak-ng")
|
|
|
|
|
elif sys.platform == "win32":
|
|
|
|
|
print_info("Install with: choco install espeak-ng")
|
|
|
|
|
else:
|
|
|
|
|
print_info("Install with: sudo apt install espeak-ng")
|
|
|
|
|
print()
|
|
|
|
|
if prompt_yes_no("Install espeak-ng now?", True):
|
|
|
|
|
try:
|
|
|
|
|
if sys.platform == "darwin":
|
|
|
|
|
subprocess.run(["brew", "install", "espeak-ng"], check=True)
|
|
|
|
|
elif sys.platform == "win32":
|
|
|
|
|
subprocess.run(["choco", "install", "espeak-ng", "-y"], check=True)
|
|
|
|
|
else:
|
|
|
|
|
subprocess.run(["sudo", "apt", "install", "-y", "espeak-ng"], check=True)
|
|
|
|
|
print_success("espeak-ng installed")
|
|
|
|
|
except (subprocess.CalledProcessError, FileNotFoundError) as e:
|
|
|
|
|
print_warning(f"Could not install espeak-ng automatically: {e}")
|
|
|
|
|
print_info("Please install it manually and re-run setup.")
|
|
|
|
|
return False
|
|
|
|
|
else:
|
|
|
|
|
print_warning("espeak-ng is required for NeuTTS. Install it manually before using NeuTTS.")
|
|
|
|
|
|
|
|
|
|
# Install neutts Python package
|
|
|
|
|
print()
|
|
|
|
|
print_info("Installing neutts Python package...")
|
|
|
|
|
print_info("This will also download the TTS model (~300MB) on first use.")
|
|
|
|
|
print()
|
|
|
|
|
try:
|
|
|
|
|
subprocess.run(
|
|
|
|
|
[sys.executable, "-m", "pip", "install", "-U", "neutts[all]", "--quiet"],
|
|
|
|
|
check=True, timeout=300,
|
|
|
|
|
)
|
|
|
|
|
print_success("neutts installed successfully")
|
|
|
|
|
return True
|
|
|
|
|
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as e:
|
|
|
|
|
print_error(f"Failed to install neutts: {e}")
|
2026-03-18 02:55:30 -07:00
|
|
|
print_info("Try manually: python -m pip install -U neutts[all]")
|
2026-03-17 02:33:12 -07:00
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _setup_tts_provider(config: dict):
|
|
|
|
|
"""Interactive TTS provider selection with install flow for NeuTTS."""
|
|
|
|
|
tts_config = config.get("tts", {})
|
|
|
|
|
current_provider = tts_config.get("provider", "edge")
|
|
|
|
|
|
|
|
|
|
provider_labels = {
|
|
|
|
|
"edge": "Edge TTS",
|
|
|
|
|
"elevenlabs": "ElevenLabs",
|
|
|
|
|
"openai": "OpenAI TTS",
|
|
|
|
|
"neutts": "NeuTTS",
|
|
|
|
|
}
|
|
|
|
|
current_label = provider_labels.get(current_provider, current_provider)
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print_header("Text-to-Speech Provider (optional)")
|
|
|
|
|
print_info(f"Current: {current_label}")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
choices = [
|
|
|
|
|
"Edge TTS (free, cloud-based, no setup needed)",
|
|
|
|
|
"ElevenLabs (premium quality, needs API key)",
|
|
|
|
|
"OpenAI TTS (good quality, needs API key)",
|
|
|
|
|
"NeuTTS (local on-device, free, ~300MB model download)",
|
|
|
|
|
f"Keep current ({current_label})",
|
|
|
|
|
]
|
|
|
|
|
idx = prompt_choice("Select TTS provider:", choices, len(choices) - 1)
|
|
|
|
|
|
|
|
|
|
if idx == 4: # Keep current
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
providers = ["edge", "elevenlabs", "openai", "neutts"]
|
|
|
|
|
selected = providers[idx]
|
|
|
|
|
|
|
|
|
|
if selected == "neutts":
|
|
|
|
|
# Check if already installed
|
|
|
|
|
try:
|
|
|
|
|
import importlib.util
|
|
|
|
|
already_installed = importlib.util.find_spec("neutts") is not None
|
|
|
|
|
except Exception:
|
|
|
|
|
already_installed = False
|
|
|
|
|
|
|
|
|
|
if already_installed:
|
|
|
|
|
print_success("NeuTTS is already installed")
|
|
|
|
|
else:
|
|
|
|
|
print()
|
|
|
|
|
print_info("NeuTTS requires:")
|
|
|
|
|
print_info(" • Python package: neutts (~50MB install + ~300MB model on first use)")
|
|
|
|
|
print_info(" • System package: espeak-ng (phonemizer)")
|
|
|
|
|
print()
|
|
|
|
|
if prompt_yes_no("Install NeuTTS dependencies now?", True):
|
|
|
|
|
if not _install_neutts_deps():
|
|
|
|
|
print_warning("NeuTTS installation incomplete. Falling back to Edge TTS.")
|
|
|
|
|
selected = "edge"
|
|
|
|
|
else:
|
|
|
|
|
print_info("Skipping install. Set tts.provider to 'neutts' after installing manually.")
|
|
|
|
|
selected = "edge"
|
|
|
|
|
|
|
|
|
|
elif selected == "elevenlabs":
|
|
|
|
|
existing = get_env_value("ELEVENLABS_API_KEY")
|
|
|
|
|
if not existing:
|
|
|
|
|
print()
|
|
|
|
|
api_key = prompt("ElevenLabs API key", password=True)
|
|
|
|
|
if api_key:
|
|
|
|
|
save_env_value("ELEVENLABS_API_KEY", api_key)
|
|
|
|
|
print_success("ElevenLabs API key saved")
|
|
|
|
|
else:
|
|
|
|
|
print_warning("No API key provided. Falling back to Edge TTS.")
|
|
|
|
|
selected = "edge"
|
|
|
|
|
|
|
|
|
|
elif selected == "openai":
|
|
|
|
|
existing = get_env_value("VOICE_TOOLS_OPENAI_KEY")
|
|
|
|
|
if not existing:
|
|
|
|
|
print()
|
|
|
|
|
api_key = prompt("OpenAI API key for TTS", password=True)
|
|
|
|
|
if api_key:
|
|
|
|
|
save_env_value("VOICE_TOOLS_OPENAI_KEY", api_key)
|
|
|
|
|
print_success("OpenAI TTS API key saved")
|
|
|
|
|
else:
|
|
|
|
|
print_warning("No API key provided. Falling back to Edge TTS.")
|
|
|
|
|
selected = "edge"
|
|
|
|
|
|
|
|
|
|
# Save the selection
|
|
|
|
|
if "tts" not in config:
|
|
|
|
|
config["tts"] = {}
|
|
|
|
|
config["tts"]["provider"] = selected
|
|
|
|
|
save_config(config)
|
|
|
|
|
print_success(f"TTS provider set to: {provider_labels.get(selected, selected)}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setup_tts(config: dict):
|
|
|
|
|
"""Standalone TTS setup (for 'hermes setup tts')."""
|
|
|
|
|
_setup_tts_provider(config)
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Section 2: Terminal Backend Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
def setup_terminal_backend(config: dict):
|
|
|
|
|
"""Configure the terminal execution backend."""
|
|
|
|
|
import platform as _platform
|
|
|
|
|
import shutil
|
|
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
print_header("Terminal Backend")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_info("Choose where Hermes runs shell commands and code.")
|
|
|
|
|
print_info("This affects tool execution, file access, and isolation.")
|
|
|
|
|
print()
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
current_backend = config.get("terminal", {}).get("backend", "local")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
is_linux = _platform.system() == "Linux"
|
|
|
|
|
|
|
|
|
|
# Build backend choices with descriptions
|
2026-02-02 19:01:51 -08:00
|
|
|
terminal_choices = [
|
2026-03-06 17:55:44 -08:00
|
|
|
"Local - run directly on this machine (default)",
|
|
|
|
|
"Docker - isolated container with configurable resources",
|
2026-03-06 22:21:57 -08:00
|
|
|
"Modal - serverless cloud sandbox",
|
|
|
|
|
"SSH - run on a remote machine",
|
|
|
|
|
"Daytona - persistent cloud development environment",
|
2026-02-02 19:15:30 -08:00
|
|
|
]
|
2026-03-06 22:21:57 -08:00
|
|
|
idx_to_backend = {0: "local", 1: "docker", 2: "modal", 3: "ssh", 4: "daytona"}
|
|
|
|
|
backend_to_idx = {"local": 0, "docker": 1, "modal": 2, "ssh": 3, "daytona": 4}
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
2026-03-06 22:21:57 -08:00
|
|
|
next_idx = 5
|
2026-02-02 19:15:30 -08:00
|
|
|
if is_linux:
|
2026-03-06 17:55:44 -08:00
|
|
|
terminal_choices.append("Singularity/Apptainer - HPC-friendly container")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
idx_to_backend[next_idx] = "singularity"
|
|
|
|
|
backend_to_idx["singularity"] = next_idx
|
|
|
|
|
next_idx += 1
|
|
|
|
|
|
|
|
|
|
# Add keep current option
|
|
|
|
|
keep_current_idx = next_idx
|
|
|
|
|
terminal_choices.append(f"Keep current ({current_backend})")
|
|
|
|
|
idx_to_backend[keep_current_idx] = current_backend
|
|
|
|
|
|
2026-02-02 19:15:30 -08:00
|
|
|
default_terminal = backend_to_idx.get(current_backend, 0)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
terminal_idx = prompt_choice(
|
|
|
|
|
"Select terminal backend:", terminal_choices, keep_current_idx
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
2026-02-02 19:15:30 -08:00
|
|
|
selected_backend = idx_to_backend.get(terminal_idx)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
if terminal_idx == keep_current_idx:
|
|
|
|
|
print_info(f"Keeping current backend: {current_backend}")
|
|
|
|
|
return
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
config.setdefault("terminal", {})["backend"] = selected_backend
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
if selected_backend == "local":
|
|
|
|
|
print_success("Terminal backend: Local")
|
|
|
|
|
print_info("Commands run directly on this machine.")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# CWD for messaging
|
2026-03-04 03:29:05 -08:00
|
|
|
print()
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_info("Working directory for messaging sessions:")
|
|
|
|
|
print_info(" When using Hermes via Telegram/Discord, this is where")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" the agent starts. CLI mode always starts in the current directory."
|
|
|
|
|
)
|
|
|
|
|
current_cwd = config.get("terminal", {}).get("cwd", "")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
cwd = prompt(" Messaging working directory", current_cwd or str(Path.home()))
|
|
|
|
|
if cwd:
|
2026-03-11 01:33:29 +05:30
|
|
|
config["terminal"]["cwd"] = cwd
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Sudo support
|
|
|
|
|
print()
|
|
|
|
|
existing_sudo = get_env_value("SUDO_PASSWORD")
|
|
|
|
|
if existing_sudo:
|
|
|
|
|
print_info("Sudo password: configured")
|
|
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
if prompt_yes_no(
|
|
|
|
|
"Enable sudo support? (stores password for apt install, etc.)", False
|
|
|
|
|
):
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
sudo_pass = prompt(" Sudo password", password=True)
|
|
|
|
|
if sudo_pass:
|
|
|
|
|
save_env_value("SUDO_PASSWORD", sudo_pass)
|
|
|
|
|
print_success("Sudo password saved")
|
|
|
|
|
|
|
|
|
|
elif selected_backend == "docker":
|
|
|
|
|
print_success("Terminal backend: Docker")
|
|
|
|
|
|
|
|
|
|
# Check if Docker is available
|
|
|
|
|
docker_bin = shutil.which("docker")
|
|
|
|
|
if not docker_bin:
|
|
|
|
|
print_warning("Docker not found in PATH!")
|
|
|
|
|
print_info("Install Docker: https://docs.docker.com/get-docker/")
|
|
|
|
|
else:
|
|
|
|
|
print_info(f"Docker found: {docker_bin}")
|
|
|
|
|
|
|
|
|
|
# Docker image
|
2026-03-11 01:33:29 +05:30
|
|
|
current_image = config.get("terminal", {}).get(
|
2026-03-22 04:55:34 -07:00
|
|
|
"docker_image", "nikolaik/python-nodejs:python3.11-nodejs20"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
image = prompt(" Docker image", current_image)
|
2026-03-11 01:33:29 +05:30
|
|
|
config["terminal"]["docker_image"] = image
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
save_env_value("TERMINAL_DOCKER_IMAGE", image)
|
|
|
|
|
|
2026-03-04 03:29:05 -08:00
|
|
|
_prompt_container_resources(config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
elif selected_backend == "singularity":
|
|
|
|
|
print_success("Terminal backend: Singularity/Apptainer")
|
|
|
|
|
|
|
|
|
|
# Check if singularity/apptainer is available
|
|
|
|
|
sing_bin = shutil.which("apptainer") or shutil.which("singularity")
|
|
|
|
|
if not sing_bin:
|
|
|
|
|
print_warning("Singularity/Apptainer not found in PATH!")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"Install: https://apptainer.org/docs/admin/main/installation.html"
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
else:
|
|
|
|
|
print_info(f"Found: {sing_bin}")
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
current_image = config.get("terminal", {}).get(
|
2026-03-22 04:55:34 -07:00
|
|
|
"singularity_image", "docker://nikolaik/python-nodejs:python3.11-nodejs20"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
image = prompt(" Container image", current_image)
|
2026-03-11 01:33:29 +05:30
|
|
|
config["terminal"]["singularity_image"] = image
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
save_env_value("TERMINAL_SINGULARITY_IMAGE", image)
|
|
|
|
|
|
2026-03-04 03:29:05 -08:00
|
|
|
_prompt_container_resources(config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
elif selected_backend == "modal":
|
|
|
|
|
print_success("Terminal backend: Modal")
|
|
|
|
|
print_info("Serverless cloud sandboxes. Each session gets its own container.")
|
|
|
|
|
print_info("Requires a Modal account: https://modal.com")
|
|
|
|
|
|
2026-03-28 11:21:44 -07:00
|
|
|
# Check if modal SDK is installed
|
2026-02-07 00:05:04 +00:00
|
|
|
try:
|
2026-03-28 11:21:44 -07:00
|
|
|
__import__("modal")
|
2026-02-07 00:05:04 +00:00
|
|
|
except ImportError:
|
2026-03-28 11:21:44 -07:00
|
|
|
print_info("Installing modal SDK...")
|
2026-02-07 00:05:04 +00:00
|
|
|
import subprocess
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-07 23:54:53 +00:00
|
|
|
uv_bin = shutil.which("uv")
|
|
|
|
|
if uv_bin:
|
|
|
|
|
result = subprocess.run(
|
2026-03-11 01:33:29 +05:30
|
|
|
[
|
|
|
|
|
uv_bin,
|
|
|
|
|
"pip",
|
|
|
|
|
"install",
|
|
|
|
|
"--python",
|
|
|
|
|
sys.executable,
|
2026-03-28 11:21:44 -07:00
|
|
|
"modal",
|
2026-03-11 01:33:29 +05:30
|
|
|
],
|
|
|
|
|
capture_output=True,
|
|
|
|
|
text=True,
|
2026-02-07 23:54:53 +00:00
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
result = subprocess.run(
|
2026-03-28 11:21:44 -07:00
|
|
|
[sys.executable, "-m", "pip", "install", "modal"],
|
2026-03-11 01:33:29 +05:30
|
|
|
capture_output=True,
|
|
|
|
|
text=True,
|
2026-02-07 23:54:53 +00:00
|
|
|
)
|
2026-02-07 00:05:04 +00:00
|
|
|
if result.returncode == 0:
|
2026-03-28 11:21:44 -07:00
|
|
|
print_success("modal SDK installed")
|
2026-02-07 00:05:04 +00:00
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
print_warning(
|
2026-03-28 11:21:44 -07:00
|
|
|
"Install failed — run manually: pip install modal"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Modal token
|
|
|
|
|
print()
|
|
|
|
|
print_info("Modal authentication:")
|
|
|
|
|
print_info(" Get your token at: https://modal.com/settings")
|
|
|
|
|
existing_token = get_env_value("MODAL_TOKEN_ID")
|
|
|
|
|
if existing_token:
|
|
|
|
|
print_info(" Modal token: already configured")
|
|
|
|
|
if prompt_yes_no(" Update Modal credentials?", False):
|
|
|
|
|
token_id = prompt(" Modal Token ID", password=True)
|
|
|
|
|
token_secret = prompt(" Modal Token Secret", password=True)
|
|
|
|
|
if token_id:
|
|
|
|
|
save_env_value("MODAL_TOKEN_ID", token_id)
|
|
|
|
|
if token_secret:
|
|
|
|
|
save_env_value("MODAL_TOKEN_SECRET", token_secret)
|
|
|
|
|
else:
|
|
|
|
|
token_id = prompt(" Modal Token ID", password=True)
|
|
|
|
|
token_secret = prompt(" Modal Token Secret", password=True)
|
|
|
|
|
if token_id:
|
|
|
|
|
save_env_value("MODAL_TOKEN_ID", token_id)
|
|
|
|
|
if token_secret:
|
|
|
|
|
save_env_value("MODAL_TOKEN_SECRET", token_secret)
|
|
|
|
|
|
2026-03-04 03:29:05 -08:00
|
|
|
_prompt_container_resources(config)
|
2026-03-05 00:44:39 -08:00
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
elif selected_backend == "daytona":
|
|
|
|
|
print_success("Terminal backend: Daytona")
|
|
|
|
|
print_info("Persistent cloud development environments.")
|
|
|
|
|
print_info("Each session gets a dedicated sandbox with filesystem persistence.")
|
|
|
|
|
print_info("Sign up at: https://daytona.io")
|
2026-03-05 00:44:39 -08:00
|
|
|
|
|
|
|
|
# Check if daytona SDK is installed
|
|
|
|
|
try:
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
__import__("daytona")
|
2026-03-05 00:44:39 -08:00
|
|
|
except ImportError:
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_info("Installing daytona SDK...")
|
2026-03-05 00:44:39 -08:00
|
|
|
import subprocess
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-05 00:44:39 -08:00
|
|
|
uv_bin = shutil.which("uv")
|
|
|
|
|
if uv_bin:
|
|
|
|
|
result = subprocess.run(
|
2026-03-06 21:55:33 -08:00
|
|
|
[uv_bin, "pip", "install", "--python", sys.executable, "daytona"],
|
2026-03-11 01:33:29 +05:30
|
|
|
capture_output=True,
|
|
|
|
|
text=True,
|
2026-03-05 00:44:39 -08:00
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
result = subprocess.run(
|
|
|
|
|
[sys.executable, "-m", "pip", "install", "daytona"],
|
2026-03-11 01:33:29 +05:30
|
|
|
capture_output=True,
|
|
|
|
|
text=True,
|
2026-03-05 00:44:39 -08:00
|
|
|
)
|
|
|
|
|
if result.returncode == 0:
|
|
|
|
|
print_success("daytona SDK installed")
|
|
|
|
|
else:
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_warning("Install failed — run manually: pip install daytona")
|
2026-03-06 21:55:33 -08:00
|
|
|
if result.stderr:
|
|
|
|
|
print_info(f" Error: {result.stderr.strip().splitlines()[-1]}")
|
2026-03-05 00:44:39 -08:00
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Daytona API key
|
|
|
|
|
print()
|
|
|
|
|
existing_key = get_env_value("DAYTONA_API_KEY")
|
|
|
|
|
if existing_key:
|
|
|
|
|
print_info(" Daytona API key: already configured")
|
|
|
|
|
if prompt_yes_no(" Update API key?", False):
|
|
|
|
|
api_key = prompt(" Daytona API key", password=True)
|
|
|
|
|
if api_key:
|
|
|
|
|
save_env_value("DAYTONA_API_KEY", api_key)
|
|
|
|
|
print_success(" Updated")
|
|
|
|
|
else:
|
|
|
|
|
api_key = prompt(" Daytona API key", password=True)
|
|
|
|
|
if api_key:
|
|
|
|
|
save_env_value("DAYTONA_API_KEY", api_key)
|
|
|
|
|
print_success(" Configured")
|
2026-03-05 00:44:39 -08:00
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Daytona image
|
2026-03-11 01:33:29 +05:30
|
|
|
current_image = config.get("terminal", {}).get(
|
|
|
|
|
"daytona_image", "nikolaik/python-nodejs:python3.11-nodejs20"
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
image = prompt(" Sandbox image", current_image)
|
2026-03-11 01:33:29 +05:30
|
|
|
config["terminal"]["daytona_image"] = image
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
save_env_value("TERMINAL_DAYTONA_IMAGE", image)
|
2026-03-05 00:44:39 -08:00
|
|
|
|
|
|
|
|
_prompt_container_resources(config)
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
elif selected_backend == "ssh":
|
|
|
|
|
print_success("Terminal backend: SSH")
|
|
|
|
|
print_info("Run commands on a remote machine via SSH.")
|
|
|
|
|
|
|
|
|
|
# SSH host
|
|
|
|
|
current_host = get_env_value("TERMINAL_SSH_HOST") or ""
|
|
|
|
|
host = prompt(" SSH host (hostname or IP)", current_host)
|
|
|
|
|
if host:
|
|
|
|
|
save_env_value("TERMINAL_SSH_HOST", host)
|
|
|
|
|
|
|
|
|
|
# SSH user
|
|
|
|
|
current_user = get_env_value("TERMINAL_SSH_USER") or ""
|
|
|
|
|
user = prompt(" SSH user", current_user or os.getenv("USER", ""))
|
|
|
|
|
if user:
|
|
|
|
|
save_env_value("TERMINAL_SSH_USER", user)
|
|
|
|
|
|
|
|
|
|
# SSH port
|
|
|
|
|
current_port = get_env_value("TERMINAL_SSH_PORT") or "22"
|
|
|
|
|
port = prompt(" SSH port", current_port)
|
|
|
|
|
if port and port != "22":
|
|
|
|
|
save_env_value("TERMINAL_SSH_PORT", port)
|
|
|
|
|
|
|
|
|
|
# SSH key
|
|
|
|
|
current_key = get_env_value("TERMINAL_SSH_KEY") or ""
|
|
|
|
|
default_key = str(Path.home() / ".ssh" / "id_rsa")
|
|
|
|
|
ssh_key = prompt(" SSH private key path", current_key or default_key)
|
2026-02-02 19:01:51 -08:00
|
|
|
if ssh_key:
|
|
|
|
|
save_env_value("TERMINAL_SSH_KEY", ssh_key)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Test connection
|
|
|
|
|
if host and prompt_yes_no(" Test SSH connection?", True):
|
|
|
|
|
print_info(" Testing connection...")
|
|
|
|
|
import subprocess
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
ssh_cmd = ["ssh", "-o", "BatchMode=yes", "-o", "ConnectTimeout=5"]
|
|
|
|
|
if ssh_key:
|
|
|
|
|
ssh_cmd.extend(["-i", ssh_key])
|
|
|
|
|
if port and port != "22":
|
|
|
|
|
ssh_cmd.extend(["-p", port])
|
|
|
|
|
ssh_cmd.append(f"{user}@{host}" if user else host)
|
|
|
|
|
ssh_cmd.append("echo ok")
|
|
|
|
|
result = subprocess.run(ssh_cmd, capture_output=True, text=True, timeout=10)
|
|
|
|
|
if result.returncode == 0:
|
|
|
|
|
print_success(" SSH connection successful!")
|
|
|
|
|
else:
|
|
|
|
|
print_warning(f" SSH connection failed: {result.stderr.strip()}")
|
|
|
|
|
print_info(" Check your SSH key and host settings.")
|
|
|
|
|
|
2026-02-26 20:02:46 -08:00
|
|
|
# Sync terminal backend to .env so terminal_tool picks it up directly.
|
|
|
|
|
# config.yaml is the source of truth, but terminal_tool reads TERMINAL_ENV.
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
save_env_value("TERMINAL_ENV", selected_backend)
|
|
|
|
|
save_config(config)
|
|
|
|
|
print()
|
|
|
|
|
print_success(f"Terminal backend set to: {selected_backend}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Section 3: Agent Settings
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
def setup_agent_settings(config: dict):
|
|
|
|
|
"""Configure agent behavior: iterations, progress display, compression, session reset."""
|
|
|
|
|
|
|
|
|
|
# ── Max Iterations ──
|
2026-02-03 14:48:19 -08:00
|
|
|
print_header("Agent Settings")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
current_max = get_env_value("HERMES_MAX_ITERATIONS") or str(
|
|
|
|
|
config.get("agent", {}).get("max_turns", 90)
|
|
|
|
|
)
|
2026-02-03 14:48:19 -08:00
|
|
|
print_info("Maximum tool-calling iterations per conversation.")
|
|
|
|
|
print_info("Higher = more complex tasks, but costs more tokens.")
|
2026-03-22 04:55:34 -07:00
|
|
|
print_info("Default is 90, which works for most tasks. Use 150+ for open exploration.")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-03 14:48:19 -08:00
|
|
|
max_iter_str = prompt("Max iterations", current_max)
|
|
|
|
|
try:
|
|
|
|
|
max_iter = int(max_iter_str)
|
|
|
|
|
if max_iter > 0:
|
|
|
|
|
save_env_value("HERMES_MAX_ITERATIONS", str(max_iter))
|
2026-03-11 01:33:29 +05:30
|
|
|
config.setdefault("agent", {})["max_turns"] = max_iter
|
|
|
|
|
config.pop("max_turns", None)
|
2026-02-03 14:48:19 -08:00
|
|
|
print_success(f"Max iterations set to {max_iter}")
|
|
|
|
|
except ValueError:
|
|
|
|
|
print_warning("Invalid number, keeping current value")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# ── Tool Progress Display ──
|
2026-02-03 14:54:43 -08:00
|
|
|
print_info("")
|
2026-02-28 00:05:58 -08:00
|
|
|
print_info("Tool Progress Display")
|
|
|
|
|
print_info("Controls how much tool activity is shown (CLI and messaging).")
|
|
|
|
|
print_info(" off — Silent, just the final response")
|
|
|
|
|
print_info(" new — Show tool name only when it changes (less noise)")
|
|
|
|
|
print_info(" all — Show every tool call with a short preview")
|
|
|
|
|
print_info(" verbose — Full args, results, and debug logs")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-28 00:05:58 -08:00
|
|
|
current_mode = config.get("display", {}).get("tool_progress", "all")
|
|
|
|
|
mode = prompt("Tool progress mode", current_mode)
|
|
|
|
|
if mode.lower() in ("off", "new", "all", "verbose"):
|
|
|
|
|
if "display" not in config:
|
|
|
|
|
config["display"] = {}
|
|
|
|
|
config["display"]["tool_progress"] = mode.lower()
|
|
|
|
|
save_config(config)
|
|
|
|
|
print_success(f"Tool progress set to: {mode.lower()}")
|
2026-02-03 14:54:43 -08:00
|
|
|
else:
|
2026-02-28 00:05:58 -08:00
|
|
|
print_warning(f"Unknown mode '{mode}', keeping '{current_mode}'")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# ── Context Compression ──
|
2026-02-02 19:01:51 -08:00
|
|
|
print_header("Context Compression")
|
2026-02-23 23:31:07 +00:00
|
|
|
print_info("Automatically summarizes old messages when context gets too long.")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"Higher threshold = compress later (use more context). Lower = compress sooner."
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
config.setdefault("compression", {})["enabled"] = True
|
|
|
|
|
|
2026-03-22 04:55:34 -07:00
|
|
|
current_threshold = config.get("compression", {}).get("threshold", 0.50)
|
2026-02-23 23:31:07 +00:00
|
|
|
threshold_str = prompt("Compression threshold (0.5-0.95)", str(current_threshold))
|
|
|
|
|
try:
|
|
|
|
|
threshold = float(threshold_str)
|
|
|
|
|
if 0.5 <= threshold <= 0.95:
|
2026-03-11 01:33:29 +05:30
|
|
|
config["compression"]["threshold"] = threshold
|
2026-02-23 23:31:07 +00:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
2026-03-11 01:33:29 +05:30
|
|
|
|
|
|
|
|
print_success(
|
2026-03-22 04:55:34 -07:00
|
|
|
f"Context compression threshold set to {config['compression'].get('threshold', 0.50)}"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# ── Session Reset Policy ──
|
2026-02-26 21:20:50 -08:00
|
|
|
print_header("Session Reset Policy")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"Messaging sessions (Telegram, Discord, etc.) accumulate context over time."
|
|
|
|
|
)
|
|
|
|
|
print_info(
|
|
|
|
|
"Each message adds to the conversation history, which means growing API costs."
|
|
|
|
|
)
|
2026-02-26 21:20:50 -08:00
|
|
|
print_info("")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"To manage this, sessions can automatically reset after a period of inactivity"
|
|
|
|
|
)
|
|
|
|
|
print_info(
|
|
|
|
|
"or at a fixed time each day. When a reset happens, the agent saves important"
|
|
|
|
|
)
|
|
|
|
|
print_info(
|
|
|
|
|
"things to its persistent memory first — but the conversation context is cleared."
|
|
|
|
|
)
|
2026-02-26 21:20:50 -08:00
|
|
|
print_info("")
|
|
|
|
|
print_info("You can also manually reset anytime by typing /reset in chat.")
|
|
|
|
|
print_info("")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-26 21:20:50 -08:00
|
|
|
reset_choices = [
|
2026-03-06 17:55:44 -08:00
|
|
|
"Inactivity + daily reset (recommended - reset whichever comes first)",
|
2026-02-26 21:20:50 -08:00
|
|
|
"Inactivity only (reset after N minutes of no messages)",
|
|
|
|
|
"Daily only (reset at a fixed hour each day)",
|
|
|
|
|
"Never auto-reset (context lives until /reset or context compression)",
|
|
|
|
|
"Keep current settings",
|
|
|
|
|
]
|
2026-03-11 01:33:29 +05:30
|
|
|
|
|
|
|
|
current_policy = config.get("session_reset", {})
|
|
|
|
|
current_mode = current_policy.get("mode", "both")
|
|
|
|
|
current_idle = current_policy.get("idle_minutes", 1440)
|
|
|
|
|
current_hour = current_policy.get("at_hour", 4)
|
|
|
|
|
|
2026-02-26 21:20:50 -08:00
|
|
|
default_reset = {"both": 0, "idle": 1, "daily": 2, "none": 3}.get(current_mode, 0)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-26 21:20:50 -08:00
|
|
|
reset_idx = prompt_choice("Session reset mode:", reset_choices, default_reset)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
|
|
|
|
config.setdefault("session_reset", {})
|
|
|
|
|
|
2026-02-26 21:20:50 -08:00
|
|
|
if reset_idx == 0: # Both
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["mode"] = "both"
|
2026-02-26 21:20:50 -08:00
|
|
|
idle_str = prompt(" Inactivity timeout (minutes)", str(current_idle))
|
|
|
|
|
try:
|
|
|
|
|
idle_val = int(idle_str)
|
|
|
|
|
if idle_val > 0:
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["idle_minutes"] = idle_val
|
2026-02-26 21:20:50 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
|
|
|
|
hour_str = prompt(" Daily reset hour (0-23, local time)", str(current_hour))
|
|
|
|
|
try:
|
|
|
|
|
hour_val = int(hour_str)
|
|
|
|
|
if 0 <= hour_val <= 23:
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["at_hour"] = hour_val
|
2026-02-26 21:20:50 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
2026-03-11 01:33:29 +05:30
|
|
|
print_success(
|
|
|
|
|
f"Sessions reset after {config['session_reset'].get('idle_minutes', 1440)} min idle or daily at {config['session_reset'].get('at_hour', 4)}:00"
|
|
|
|
|
)
|
2026-02-26 21:20:50 -08:00
|
|
|
elif reset_idx == 1: # Idle only
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["mode"] = "idle"
|
2026-02-26 21:20:50 -08:00
|
|
|
idle_str = prompt(" Inactivity timeout (minutes)", str(current_idle))
|
|
|
|
|
try:
|
|
|
|
|
idle_val = int(idle_str)
|
|
|
|
|
if idle_val > 0:
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["idle_minutes"] = idle_val
|
2026-02-26 21:20:50 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
2026-03-11 01:33:29 +05:30
|
|
|
print_success(
|
|
|
|
|
f"Sessions reset after {config['session_reset'].get('idle_minutes', 1440)} min of inactivity"
|
|
|
|
|
)
|
2026-02-26 21:20:50 -08:00
|
|
|
elif reset_idx == 2: # Daily only
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["mode"] = "daily"
|
2026-02-26 21:20:50 -08:00
|
|
|
hour_str = prompt(" Daily reset hour (0-23, local time)", str(current_hour))
|
|
|
|
|
try:
|
|
|
|
|
hour_val = int(hour_str)
|
|
|
|
|
if 0 <= hour_val <= 23:
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["at_hour"] = hour_val
|
2026-02-26 21:20:50 -08:00
|
|
|
except ValueError:
|
|
|
|
|
pass
|
2026-03-11 01:33:29 +05:30
|
|
|
print_success(
|
|
|
|
|
f"Sessions reset daily at {config['session_reset'].get('at_hour', 4)}:00"
|
|
|
|
|
)
|
2026-02-26 21:20:50 -08:00
|
|
|
elif reset_idx == 3: # None
|
2026-03-11 01:33:29 +05:30
|
|
|
config["session_reset"]["mode"] = "none"
|
|
|
|
|
print_info(
|
|
|
|
|
"Sessions will never auto-reset. Context is managed only by compression."
|
|
|
|
|
)
|
|
|
|
|
print_warning(
|
|
|
|
|
"Long conversations will grow in cost. Use /reset manually when needed."
|
|
|
|
|
)
|
2026-02-26 21:20:50 -08:00
|
|
|
# else: keep current (idx == 4)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
save_config(config)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Section 4: Messaging Platforms (Gateway)
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
def setup_gateway(config: dict):
|
|
|
|
|
"""Configure messaging platform integrations."""
|
|
|
|
|
print_header("Messaging Platforms")
|
2026-02-02 19:01:51 -08:00
|
|
|
print_info("Connect to messaging platforms to chat with Hermes from anywhere.")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
# ── Telegram ──
|
2026-03-11 01:33:29 +05:30
|
|
|
existing_telegram = get_env_value("TELEGRAM_BOT_TOKEN")
|
2026-02-02 19:01:51 -08:00
|
|
|
if existing_telegram:
|
|
|
|
|
print_info("Telegram: already configured")
|
|
|
|
|
if prompt_yes_no("Reconfigure Telegram?", False):
|
|
|
|
|
existing_telegram = None
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
if not existing_telegram and prompt_yes_no("Set up Telegram bot?", False):
|
|
|
|
|
print_info("Create a bot via @BotFather on Telegram")
|
|
|
|
|
token = prompt("Telegram bot token", password=True)
|
|
|
|
|
if token:
|
|
|
|
|
save_env_value("TELEGRAM_BOT_TOKEN", token)
|
|
|
|
|
print_success("Telegram token saved")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-03 10:46:23 -08:00
|
|
|
# Allowed users (security)
|
|
|
|
|
print()
|
|
|
|
|
print_info("🔒 Security: Restrict who can use your bot")
|
|
|
|
|
print_info(" To find your Telegram user ID:")
|
|
|
|
|
print_info(" 1. Message @userinfobot on Telegram")
|
|
|
|
|
print_info(" 2. It will reply with your numeric ID (e.g., 123456789)")
|
|
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
allowed_users = prompt(
|
|
|
|
|
"Allowed user IDs (comma-separated, leave empty for open access)"
|
|
|
|
|
)
|
2026-02-03 10:46:23 -08:00
|
|
|
if allowed_users:
|
|
|
|
|
save_env_value("TELEGRAM_ALLOWED_USERS", allowed_users.replace(" ", ""))
|
2026-03-11 01:33:29 +05:30
|
|
|
print_success(
|
|
|
|
|
"Telegram allowlist configured - only listed users can use the bot"
|
|
|
|
|
)
|
2026-02-03 10:46:23 -08:00
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"⚠️ No allowlist set - anyone who finds your bot can use it!"
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-22 20:44:15 -08:00
|
|
|
# Home channel setup with better guidance
|
|
|
|
|
print()
|
|
|
|
|
print_info("📬 Home Channel: where Hermes delivers cron job results,")
|
|
|
|
|
print_info(" cross-platform messages, and notifications.")
|
|
|
|
|
print_info(" For Telegram DMs, this is your user ID (same as above).")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-22 20:44:15 -08:00
|
|
|
first_user_id = allowed_users.split(",")[0].strip() if allowed_users else ""
|
|
|
|
|
if first_user_id:
|
2026-03-11 01:33:29 +05:30
|
|
|
if prompt_yes_no(
|
|
|
|
|
f"Use your user ID ({first_user_id}) as the home channel?", True
|
|
|
|
|
):
|
2026-02-22 20:44:15 -08:00
|
|
|
save_env_value("TELEGRAM_HOME_CHANNEL", first_user_id)
|
|
|
|
|
print_success(f"Telegram home channel set to {first_user_id}")
|
|
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
home_channel = prompt(
|
|
|
|
|
"Home channel ID (or leave empty to set later with /set-home in Telegram)"
|
|
|
|
|
)
|
2026-02-22 20:44:15 -08:00
|
|
|
if home_channel:
|
|
|
|
|
save_env_value("TELEGRAM_HOME_CHANNEL", home_channel)
|
|
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" You can also set this later by typing /set-home in your Telegram chat."
|
|
|
|
|
)
|
2026-02-22 20:44:15 -08:00
|
|
|
home_channel = prompt("Home channel ID (leave empty to set later)")
|
|
|
|
|
if home_channel:
|
|
|
|
|
save_env_value("TELEGRAM_HOME_CHANNEL", home_channel)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-03 10:46:23 -08:00
|
|
|
# Check/update existing Telegram allowlist
|
|
|
|
|
elif existing_telegram:
|
2026-03-11 01:33:29 +05:30
|
|
|
existing_allowlist = get_env_value("TELEGRAM_ALLOWED_USERS")
|
2026-02-03 10:46:23 -08:00
|
|
|
if not existing_allowlist:
|
|
|
|
|
print_info("⚠️ Telegram has no user allowlist - anyone can use your bot!")
|
|
|
|
|
if prompt_yes_no("Add allowed users now?", True):
|
|
|
|
|
print_info(" To find your Telegram user ID: message @userinfobot")
|
|
|
|
|
allowed_users = prompt("Allowed user IDs (comma-separated)")
|
|
|
|
|
if allowed_users:
|
2026-03-11 01:33:29 +05:30
|
|
|
save_env_value(
|
|
|
|
|
"TELEGRAM_ALLOWED_USERS", allowed_users.replace(" ", "")
|
|
|
|
|
)
|
2026-02-03 10:46:23 -08:00
|
|
|
print_success("Telegram allowlist configured")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# ── Discord ──
|
2026-03-11 01:33:29 +05:30
|
|
|
existing_discord = get_env_value("DISCORD_BOT_TOKEN")
|
2026-02-02 19:01:51 -08:00
|
|
|
if existing_discord:
|
|
|
|
|
print_info("Discord: already configured")
|
|
|
|
|
if prompt_yes_no("Reconfigure Discord?", False):
|
|
|
|
|
existing_discord = None
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-02 19:01:51 -08:00
|
|
|
if not existing_discord and prompt_yes_no("Set up Discord bot?", False):
|
|
|
|
|
print_info("Create a bot at https://discord.com/developers/applications")
|
|
|
|
|
token = prompt("Discord bot token", password=True)
|
|
|
|
|
if token:
|
|
|
|
|
save_env_value("DISCORD_BOT_TOKEN", token)
|
|
|
|
|
print_success("Discord token saved")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-03 10:46:23 -08:00
|
|
|
# Allowed users (security)
|
|
|
|
|
print()
|
|
|
|
|
print_info("🔒 Security: Restrict who can use your bot")
|
|
|
|
|
print_info(" To find your Discord user ID:")
|
|
|
|
|
print_info(" 1. Enable Developer Mode in Discord settings")
|
|
|
|
|
print_info(" 2. Right-click your name → Copy ID")
|
|
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" You can also use Discord usernames (resolved on gateway start)."
|
|
|
|
|
)
|
2026-02-22 20:44:15 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
allowed_users = prompt(
|
|
|
|
|
"Allowed user IDs or usernames (comma-separated, leave empty for open access)"
|
|
|
|
|
)
|
2026-02-03 10:46:23 -08:00
|
|
|
if allowed_users:
|
2026-03-13 09:35:39 -07:00
|
|
|
# Clean up common prefixes (user:123, <@123>, <@!123>)
|
|
|
|
|
cleaned_ids = []
|
|
|
|
|
for uid in allowed_users.replace(" ", "").split(","):
|
|
|
|
|
uid = uid.strip()
|
|
|
|
|
if uid.startswith("<@") and uid.endswith(">"):
|
|
|
|
|
uid = uid.lstrip("<@!").rstrip(">")
|
|
|
|
|
if uid.lower().startswith("user:"):
|
|
|
|
|
uid = uid[5:]
|
|
|
|
|
if uid:
|
|
|
|
|
cleaned_ids.append(uid)
|
|
|
|
|
save_env_value("DISCORD_ALLOWED_USERS", ",".join(cleaned_ids))
|
2026-02-03 10:46:23 -08:00
|
|
|
print_success("Discord allowlist configured")
|
|
|
|
|
else:
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"⚠️ No allowlist set - anyone in servers with your bot can use it!"
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-22 20:44:15 -08:00
|
|
|
# Home channel setup with better guidance
|
|
|
|
|
print()
|
|
|
|
|
print_info("📬 Home Channel: where Hermes delivers cron job results,")
|
|
|
|
|
print_info(" cross-platform messages, and notifications.")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" To get a channel ID: right-click a channel → Copy Channel ID"
|
|
|
|
|
)
|
2026-02-22 20:44:15 -08:00
|
|
|
print_info(" (requires Developer Mode in Discord settings)")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" You can also set this later by typing /set-home in a Discord channel."
|
|
|
|
|
)
|
|
|
|
|
home_channel = prompt(
|
|
|
|
|
"Home channel ID (leave empty to set later with /set-home)"
|
|
|
|
|
)
|
2026-02-02 19:01:51 -08:00
|
|
|
if home_channel:
|
|
|
|
|
save_env_value("DISCORD_HOME_CHANNEL", home_channel)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-03 10:46:23 -08:00
|
|
|
# Check/update existing Discord allowlist
|
|
|
|
|
elif existing_discord:
|
2026-03-11 01:33:29 +05:30
|
|
|
existing_allowlist = get_env_value("DISCORD_ALLOWED_USERS")
|
2026-02-03 10:46:23 -08:00
|
|
|
if not existing_allowlist:
|
|
|
|
|
print_info("⚠️ Discord has no user allowlist - anyone can use your bot!")
|
|
|
|
|
if prompt_yes_no("Add allowed users now?", True):
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" To find Discord ID: Enable Developer Mode, right-click name → Copy ID"
|
|
|
|
|
)
|
2026-02-03 10:46:23 -08:00
|
|
|
allowed_users = prompt("Allowed user IDs (comma-separated)")
|
|
|
|
|
if allowed_users:
|
2026-03-13 09:35:39 -07:00
|
|
|
# Clean up common prefixes (user:123, <@123>, <@!123>)
|
|
|
|
|
cleaned_ids = []
|
|
|
|
|
for uid in allowed_users.replace(" ", "").split(","):
|
|
|
|
|
uid = uid.strip()
|
|
|
|
|
if uid.startswith("<@") and uid.endswith(">"):
|
|
|
|
|
uid = uid.lstrip("<@!").rstrip(">")
|
|
|
|
|
if uid.lower().startswith("user:"):
|
|
|
|
|
uid = uid[5:]
|
|
|
|
|
if uid:
|
|
|
|
|
cleaned_ids.append(uid)
|
2026-03-11 01:33:29 +05:30
|
|
|
save_env_value(
|
2026-03-13 09:35:39 -07:00
|
|
|
"DISCORD_ALLOWED_USERS", ",".join(cleaned_ids)
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
2026-02-03 10:46:23 -08:00
|
|
|
print_success("Discord allowlist configured")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# ── Slack ──
|
2026-03-11 01:33:29 +05:30
|
|
|
existing_slack = get_env_value("SLACK_BOT_TOKEN")
|
2026-02-19 12:33:09 -08:00
|
|
|
if existing_slack:
|
|
|
|
|
print_info("Slack: already configured")
|
|
|
|
|
if prompt_yes_no("Reconfigure Slack?", False):
|
|
|
|
|
existing_slack = None
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-19 12:33:09 -08:00
|
|
|
if not existing_slack and prompt_yes_no("Set up Slack bot?", False):
|
|
|
|
|
print_info("Steps to create a Slack app:")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" 1. Go to https://api.slack.com/apps → Create New App (from scratch)"
|
|
|
|
|
)
|
2026-03-09 14:00:11 -07:00
|
|
|
print_info(" 2. Enable Socket Mode: Settings → Socket Mode → Enable")
|
|
|
|
|
print_info(" • Create an App-Level Token with 'connections:write' scope")
|
|
|
|
|
print_info(" 3. Add Bot Token Scopes: Features → OAuth & Permissions")
|
|
|
|
|
print_info(" Required scopes: chat:write, app_mentions:read,")
|
2026-03-14 21:49:04 -07:00
|
|
|
print_info(" channels:history, channels:read, im:history,")
|
|
|
|
|
print_info(" im:read, im:write, users:read, files:write")
|
|
|
|
|
print_info(" Optional for private channels: groups:history")
|
2026-03-09 14:00:11 -07:00
|
|
|
print_info(" 4. Subscribe to Events: Features → Event Subscriptions → Enable")
|
2026-03-14 21:49:04 -07:00
|
|
|
print_info(" Required events: message.im, message.channels, app_mention")
|
|
|
|
|
print_info(" Optional for private channels: message.groups")
|
|
|
|
|
print_warning(" ⚠ Without message.channels the bot will ONLY work in DMs,")
|
|
|
|
|
print_warning(" not public channels.")
|
2026-03-09 14:00:11 -07:00
|
|
|
print_info(" 5. Install to Workspace: Settings → Install App")
|
2026-03-14 21:49:04 -07:00
|
|
|
print_info(" 6. Reinstall the app after any scope or event changes")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
2026-03-14 21:49:04 -07:00
|
|
|
" 7. After installing, invite the bot to channels: /invite @YourBot"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
2026-03-09 14:00:11 -07:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
2026-03-13 20:43:22 -07:00
|
|
|
" Full guide: https://hermes-agent.nousresearch.com/docs/user-guide/messaging/slack/"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
2026-02-19 12:33:09 -08:00
|
|
|
print()
|
|
|
|
|
bot_token = prompt("Slack Bot Token (xoxb-...)", password=True)
|
|
|
|
|
if bot_token:
|
|
|
|
|
save_env_value("SLACK_BOT_TOKEN", bot_token)
|
|
|
|
|
app_token = prompt("Slack App Token (xapp-...)", password=True)
|
|
|
|
|
if app_token:
|
|
|
|
|
save_env_value("SLACK_APP_TOKEN", app_token)
|
|
|
|
|
print_success("Slack tokens saved")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-02-19 12:33:09 -08:00
|
|
|
print()
|
|
|
|
|
print_info("🔒 Security: Restrict who can use your bot")
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
" To find a Member ID: click a user's name → View full profile → ⋮ → Copy member ID"
|
|
|
|
|
)
|
2026-02-19 12:33:09 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
allowed_users = prompt(
|
2026-03-14 21:49:04 -07:00
|
|
|
"Allowed user IDs (comma-separated, leave empty to deny everyone except paired users)"
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
2026-02-19 12:33:09 -08:00
|
|
|
if allowed_users:
|
|
|
|
|
save_env_value("SLACK_ALLOWED_USERS", allowed_users.replace(" ", ""))
|
|
|
|
|
print_success("Slack allowlist configured")
|
|
|
|
|
else:
|
2026-03-14 21:49:04 -07:00
|
|
|
print_warning(
|
|
|
|
|
"⚠️ No Slack allowlist set - unpaired users will be denied by default."
|
|
|
|
|
)
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
2026-03-14 21:49:04 -07:00
|
|
|
" Set SLACK_ALLOW_ALL_USERS=true or GATEWAY_ALLOW_ALL_USERS=true only if you intentionally want open workspace access."
|
2026-03-11 01:33:29 +05:30
|
|
|
)
|
|
|
|
|
|
2026-03-17 02:59:36 -07:00
|
|
|
# ── Matrix ──
|
|
|
|
|
existing_matrix = get_env_value("MATRIX_ACCESS_TOKEN") or get_env_value("MATRIX_PASSWORD")
|
|
|
|
|
if existing_matrix:
|
|
|
|
|
print_info("Matrix: already configured")
|
|
|
|
|
if prompt_yes_no("Reconfigure Matrix?", False):
|
|
|
|
|
existing_matrix = None
|
|
|
|
|
|
|
|
|
|
if not existing_matrix and prompt_yes_no("Set up Matrix?", False):
|
|
|
|
|
print_info("Works with any Matrix homeserver (Synapse, Conduit, Dendrite, or matrix.org).")
|
|
|
|
|
print_info(" 1. Create a bot user on your homeserver, or use your own account")
|
|
|
|
|
print_info(" 2. Get an access token from Element, or provide user ID + password")
|
|
|
|
|
print()
|
|
|
|
|
homeserver = prompt("Homeserver URL (e.g. https://matrix.example.org)")
|
|
|
|
|
if homeserver:
|
|
|
|
|
save_env_value("MATRIX_HOMESERVER", homeserver.rstrip("/"))
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print_info("Auth: provide an access token (recommended), or user ID + password.")
|
|
|
|
|
token = prompt("Access token (leave empty for password login)", password=True)
|
|
|
|
|
if token:
|
|
|
|
|
save_env_value("MATRIX_ACCESS_TOKEN", token)
|
|
|
|
|
user_id = prompt("User ID (@bot:server — optional, will be auto-detected)")
|
|
|
|
|
if user_id:
|
|
|
|
|
save_env_value("MATRIX_USER_ID", user_id)
|
|
|
|
|
print_success("Matrix access token saved")
|
|
|
|
|
else:
|
|
|
|
|
user_id = prompt("User ID (@bot:server)")
|
|
|
|
|
if user_id:
|
|
|
|
|
save_env_value("MATRIX_USER_ID", user_id)
|
|
|
|
|
password = prompt("Password", password=True)
|
|
|
|
|
if password:
|
|
|
|
|
save_env_value("MATRIX_PASSWORD", password)
|
|
|
|
|
print_success("Matrix credentials saved")
|
|
|
|
|
|
|
|
|
|
if token or get_env_value("MATRIX_PASSWORD"):
|
|
|
|
|
# E2EE
|
|
|
|
|
print()
|
2026-03-29 21:53:28 -07:00
|
|
|
want_e2ee = prompt_yes_no("Enable end-to-end encryption (E2EE)?", False)
|
|
|
|
|
if want_e2ee:
|
2026-03-17 02:59:36 -07:00
|
|
|
save_env_value("MATRIX_ENCRYPTION", "true")
|
|
|
|
|
print_success("E2EE enabled")
|
2026-03-29 21:53:28 -07:00
|
|
|
|
|
|
|
|
# Auto-install matrix-nio
|
|
|
|
|
matrix_pkg = "matrix-nio[e2e]" if want_e2ee else "matrix-nio"
|
|
|
|
|
try:
|
|
|
|
|
__import__("nio")
|
|
|
|
|
except ImportError:
|
|
|
|
|
print_info(f"Installing {matrix_pkg}...")
|
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
uv_bin = shutil.which("uv")
|
|
|
|
|
if uv_bin:
|
|
|
|
|
result = subprocess.run(
|
|
|
|
|
[uv_bin, "pip", "install", "--python", sys.executable, matrix_pkg],
|
|
|
|
|
capture_output=True,
|
|
|
|
|
text=True,
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
result = subprocess.run(
|
|
|
|
|
[sys.executable, "-m", "pip", "install", matrix_pkg],
|
|
|
|
|
capture_output=True,
|
|
|
|
|
text=True,
|
|
|
|
|
)
|
|
|
|
|
if result.returncode == 0:
|
|
|
|
|
print_success(f"{matrix_pkg} installed")
|
|
|
|
|
else:
|
|
|
|
|
print_warning(f"Install failed — run manually: pip install '{matrix_pkg}'")
|
|
|
|
|
if result.stderr:
|
|
|
|
|
print_info(f" Error: {result.stderr.strip().splitlines()[-1]}")
|
2026-03-17 02:59:36 -07:00
|
|
|
|
|
|
|
|
# Allowed users
|
|
|
|
|
print()
|
|
|
|
|
print_info("🔒 Security: Restrict who can use your bot")
|
|
|
|
|
print_info(" Matrix user IDs look like @username:server")
|
|
|
|
|
print()
|
|
|
|
|
allowed_users = prompt(
|
|
|
|
|
"Allowed user IDs (comma-separated, leave empty for open access)"
|
|
|
|
|
)
|
|
|
|
|
if allowed_users:
|
|
|
|
|
save_env_value("MATRIX_ALLOWED_USERS", allowed_users.replace(" ", ""))
|
|
|
|
|
print_success("Matrix allowlist configured")
|
|
|
|
|
else:
|
|
|
|
|
print_info(
|
|
|
|
|
"⚠️ No allowlist set - anyone who can message the bot can use it!"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Home room
|
|
|
|
|
print()
|
|
|
|
|
print_info("📬 Home Room: where Hermes delivers cron job results and notifications.")
|
|
|
|
|
print_info(" Room IDs look like !abc123:server (shown in Element room settings)")
|
|
|
|
|
print_info(" You can also set this later by typing /set-home in a Matrix room.")
|
|
|
|
|
home_room = prompt("Home room ID (leave empty to set later with /set-home)")
|
|
|
|
|
if home_room:
|
|
|
|
|
save_env_value("MATRIX_HOME_ROOM", home_room)
|
|
|
|
|
|
|
|
|
|
# ── Mattermost ──
|
|
|
|
|
existing_mattermost = get_env_value("MATTERMOST_TOKEN")
|
|
|
|
|
if existing_mattermost:
|
|
|
|
|
print_info("Mattermost: already configured")
|
|
|
|
|
if prompt_yes_no("Reconfigure Mattermost?", False):
|
|
|
|
|
existing_mattermost = None
|
|
|
|
|
|
|
|
|
|
if not existing_mattermost and prompt_yes_no("Set up Mattermost?", False):
|
|
|
|
|
print_info("Works with any self-hosted Mattermost instance.")
|
|
|
|
|
print_info(" 1. In Mattermost: Integrations → Bot Accounts → Add Bot Account")
|
|
|
|
|
print_info(" 2. Copy the bot token")
|
|
|
|
|
print()
|
|
|
|
|
mm_url = prompt("Mattermost server URL (e.g. https://mm.example.com)")
|
|
|
|
|
if mm_url:
|
|
|
|
|
save_env_value("MATTERMOST_URL", mm_url.rstrip("/"))
|
|
|
|
|
token = prompt("Bot token", password=True)
|
|
|
|
|
if token:
|
|
|
|
|
save_env_value("MATTERMOST_TOKEN", token)
|
|
|
|
|
print_success("Mattermost token saved")
|
|
|
|
|
|
|
|
|
|
# Allowed users
|
|
|
|
|
print()
|
|
|
|
|
print_info("🔒 Security: Restrict who can use your bot")
|
|
|
|
|
print_info(" To find your user ID: click your avatar → Profile")
|
|
|
|
|
print_info(" or use the API: GET /api/v4/users/me")
|
|
|
|
|
print()
|
|
|
|
|
allowed_users = prompt(
|
|
|
|
|
"Allowed user IDs (comma-separated, leave empty for open access)"
|
|
|
|
|
)
|
|
|
|
|
if allowed_users:
|
|
|
|
|
save_env_value("MATTERMOST_ALLOWED_USERS", allowed_users.replace(" ", ""))
|
|
|
|
|
print_success("Mattermost allowlist configured")
|
|
|
|
|
else:
|
|
|
|
|
print_info(
|
|
|
|
|
"⚠️ No allowlist set - anyone who can message the bot can use it!"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Home channel
|
|
|
|
|
print()
|
|
|
|
|
print_info("📬 Home Channel: where Hermes delivers cron job results and notifications.")
|
|
|
|
|
print_info(" To get a channel ID: click channel name → View Info → copy the ID")
|
|
|
|
|
print_info(" You can also set this later by typing /set-home in a Mattermost channel.")
|
|
|
|
|
home_channel = prompt("Home channel ID (leave empty to set later with /set-home)")
|
|
|
|
|
if home_channel:
|
|
|
|
|
save_env_value("MATTERMOST_HOME_CHANNEL", home_channel)
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# ── WhatsApp ──
|
2026-03-11 01:33:29 +05:30
|
|
|
existing_whatsapp = get_env_value("WHATSAPP_ENABLED")
|
2026-02-19 12:33:09 -08:00
|
|
|
if not existing_whatsapp and prompt_yes_no("Set up WhatsApp?", False):
|
2026-02-25 21:04:36 -08:00
|
|
|
print_info("WhatsApp connects via a built-in bridge (Baileys).")
|
2026-03-02 17:51:33 -08:00
|
|
|
print_info("Requires Node.js. Run 'hermes whatsapp' for guided setup.")
|
2026-02-19 12:33:09 -08:00
|
|
|
print()
|
2026-03-02 17:51:33 -08:00
|
|
|
if prompt_yes_no("Enable WhatsApp now?", True):
|
2026-02-19 12:33:09 -08:00
|
|
|
save_env_value("WHATSAPP_ENABLED", "true")
|
|
|
|
|
print_success("WhatsApp enabled")
|
2026-03-02 17:51:33 -08:00
|
|
|
print_info("Run 'hermes whatsapp' to choose your mode (separate bot number")
|
|
|
|
|
print_info("or personal self-chat) and pair via QR code.")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat(gateway): add webhook platform adapter for external event triggers
Add a generic webhook platform adapter that receives HTTP POSTs from
external services (GitHub, GitLab, JIRA, Stripe, etc.), validates HMAC
signatures, transforms payloads into agent prompts, and routes responses
back to the source or to another platform.
Features:
- Configurable routes with per-route HMAC secrets, event filters,
prompt templates with dot-notation payload access, skill loading,
and pluggable delivery (github_comment, telegram, discord, log)
- HMAC signature validation (GitHub SHA-256, GitLab token, generic)
- Rate limiting (30 req/min per route, configurable)
- Idempotency cache (1hr TTL, prevents duplicate runs on retries)
- Body size limits (1MB default, checked before reading payload)
- Setup wizard integration with security warnings and docs links
- 33 tests (29 unit + 4 integration), all passing
Security:
- HMAC secret required per route (startup validation)
- Setup wizard warns about internet exposure for webhook/SMS platforms
- Sandboxing (Docker/VM) recommended in docs for public-facing deployments
Files changed:
- gateway/config.py — Platform.WEBHOOK enum + env var overrides
- gateway/platforms/webhook.py — WebhookAdapter (~420 lines)
- gateway/run.py — factory wiring + auth bypass for webhook events
- hermes_cli/config.py — WEBHOOK_* env var definitions
- hermes_cli/setup.py — webhook section in setup_gateway()
- tests/gateway/test_webhook_adapter.py — 29 unit tests
- tests/gateway/test_webhook_integration.py — 4 integration tests
- website/docs/user-guide/messaging/webhooks.md — full user docs
- website/docs/reference/environment-variables.md — WEBHOOK_* vars
- website/sidebars.ts — nav entry
2026-03-20 06:33:36 -07:00
|
|
|
# ── Webhooks ──
|
|
|
|
|
existing_webhook = get_env_value("WEBHOOK_ENABLED")
|
|
|
|
|
if existing_webhook:
|
|
|
|
|
print_info("Webhooks: already configured")
|
|
|
|
|
if prompt_yes_no("Reconfigure webhooks?", False):
|
|
|
|
|
existing_webhook = None
|
|
|
|
|
|
|
|
|
|
if not existing_webhook and prompt_yes_no("Set up webhooks? (GitHub, GitLab, etc.)", False):
|
|
|
|
|
print()
|
|
|
|
|
print_warning(
|
|
|
|
|
"⚠ Webhook and SMS platforms require exposing gateway ports to the"
|
|
|
|
|
)
|
|
|
|
|
print_warning(
|
|
|
|
|
" internet. For security, run the gateway in a sandboxed environment"
|
|
|
|
|
)
|
|
|
|
|
print_warning(
|
|
|
|
|
" (Docker, VM, etc.) to limit blast radius from prompt injection."
|
|
|
|
|
)
|
|
|
|
|
print()
|
|
|
|
|
print_info(
|
|
|
|
|
" Full guide: https://hermes-agent.nousresearch.com/docs/user-guide/messaging/webhooks/"
|
|
|
|
|
)
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
port = prompt("Webhook port (default 8644)")
|
|
|
|
|
if port:
|
|
|
|
|
try:
|
|
|
|
|
save_env_value("WEBHOOK_PORT", str(int(port)))
|
|
|
|
|
print_success(f"Webhook port set to {port}")
|
|
|
|
|
except ValueError:
|
|
|
|
|
print_warning("Invalid port number, using default 8644")
|
|
|
|
|
|
|
|
|
|
secret = prompt("Global HMAC secret (shared across all routes)", password=True)
|
|
|
|
|
if secret:
|
|
|
|
|
save_env_value("WEBHOOK_SECRET", secret)
|
|
|
|
|
print_success("Webhook secret saved")
|
|
|
|
|
else:
|
|
|
|
|
print_warning("No secret set — you must configure per-route secrets in config.yaml")
|
|
|
|
|
|
|
|
|
|
save_env_value("WEBHOOK_ENABLED", "true")
|
|
|
|
|
print()
|
|
|
|
|
print_success("Webhooks enabled! Next steps:")
|
2026-03-29 15:15:17 -07:00
|
|
|
from hermes_constants import display_hermes_home as _dhh
|
|
|
|
|
print_info(f" 1. Define webhook routes in {_dhh()}/config.yaml")
|
feat(gateway): add webhook platform adapter for external event triggers
Add a generic webhook platform adapter that receives HTTP POSTs from
external services (GitHub, GitLab, JIRA, Stripe, etc.), validates HMAC
signatures, transforms payloads into agent prompts, and routes responses
back to the source or to another platform.
Features:
- Configurable routes with per-route HMAC secrets, event filters,
prompt templates with dot-notation payload access, skill loading,
and pluggable delivery (github_comment, telegram, discord, log)
- HMAC signature validation (GitHub SHA-256, GitLab token, generic)
- Rate limiting (30 req/min per route, configurable)
- Idempotency cache (1hr TTL, prevents duplicate runs on retries)
- Body size limits (1MB default, checked before reading payload)
- Setup wizard integration with security warnings and docs links
- 33 tests (29 unit + 4 integration), all passing
Security:
- HMAC secret required per route (startup validation)
- Setup wizard warns about internet exposure for webhook/SMS platforms
- Sandboxing (Docker/VM) recommended in docs for public-facing deployments
Files changed:
- gateway/config.py — Platform.WEBHOOK enum + env var overrides
- gateway/platforms/webhook.py — WebhookAdapter (~420 lines)
- gateway/run.py — factory wiring + auth bypass for webhook events
- hermes_cli/config.py — WEBHOOK_* env var definitions
- hermes_cli/setup.py — webhook section in setup_gateway()
- tests/gateway/test_webhook_adapter.py — 29 unit tests
- tests/gateway/test_webhook_integration.py — 4 integration tests
- website/docs/user-guide/messaging/webhooks.md — full user docs
- website/docs/reference/environment-variables.md — WEBHOOK_* vars
- website/sidebars.ts — nav entry
2026-03-20 06:33:36 -07:00
|
|
|
print_info(" 2. Point your service (GitHub, GitLab, etc.) at:")
|
|
|
|
|
print_info(" http://your-server:8644/webhooks/<route-name>")
|
|
|
|
|
print()
|
|
|
|
|
print_info(
|
|
|
|
|
" Route configuration guide:"
|
|
|
|
|
)
|
|
|
|
|
print_info(
|
|
|
|
|
" https://hermes-agent.nousresearch.com/docs/user-guide/messaging/webhooks/#configuring-routes"
|
|
|
|
|
)
|
|
|
|
|
print()
|
|
|
|
|
print_info(" Open config in your editor: hermes config edit")
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# ── Gateway Service Setup ──
|
2026-02-19 12:33:09 -08:00
|
|
|
any_messaging = (
|
2026-03-11 01:33:29 +05:30
|
|
|
get_env_value("TELEGRAM_BOT_TOKEN")
|
|
|
|
|
or get_env_value("DISCORD_BOT_TOKEN")
|
|
|
|
|
or get_env_value("SLACK_BOT_TOKEN")
|
2026-03-17 02:59:36 -07:00
|
|
|
or get_env_value("MATTERMOST_TOKEN")
|
|
|
|
|
or get_env_value("MATRIX_ACCESS_TOKEN")
|
|
|
|
|
or get_env_value("MATRIX_PASSWORD")
|
2026-03-11 01:33:29 +05:30
|
|
|
or get_env_value("WHATSAPP_ENABLED")
|
feat(gateway): add webhook platform adapter for external event triggers
Add a generic webhook platform adapter that receives HTTP POSTs from
external services (GitHub, GitLab, JIRA, Stripe, etc.), validates HMAC
signatures, transforms payloads into agent prompts, and routes responses
back to the source or to another platform.
Features:
- Configurable routes with per-route HMAC secrets, event filters,
prompt templates with dot-notation payload access, skill loading,
and pluggable delivery (github_comment, telegram, discord, log)
- HMAC signature validation (GitHub SHA-256, GitLab token, generic)
- Rate limiting (30 req/min per route, configurable)
- Idempotency cache (1hr TTL, prevents duplicate runs on retries)
- Body size limits (1MB default, checked before reading payload)
- Setup wizard integration with security warnings and docs links
- 33 tests (29 unit + 4 integration), all passing
Security:
- HMAC secret required per route (startup validation)
- Setup wizard warns about internet exposure for webhook/SMS platforms
- Sandboxing (Docker/VM) recommended in docs for public-facing deployments
Files changed:
- gateway/config.py — Platform.WEBHOOK enum + env var overrides
- gateway/platforms/webhook.py — WebhookAdapter (~420 lines)
- gateway/run.py — factory wiring + auth bypass for webhook events
- hermes_cli/config.py — WEBHOOK_* env var definitions
- hermes_cli/setup.py — webhook section in setup_gateway()
- tests/gateway/test_webhook_adapter.py — 29 unit tests
- tests/gateway/test_webhook_integration.py — 4 integration tests
- website/docs/user-guide/messaging/webhooks.md — full user docs
- website/docs/reference/environment-variables.md — WEBHOOK_* vars
- website/sidebars.ts — nav entry
2026-03-20 06:33:36 -07:00
|
|
|
or get_env_value("WEBHOOK_ENABLED")
|
2026-02-19 12:33:09 -08:00
|
|
|
)
|
|
|
|
|
if any_messaging:
|
|
|
|
|
print()
|
|
|
|
|
print_info("━" * 50)
|
|
|
|
|
print_success("Messaging platforms configured!")
|
2026-03-03 19:31:16 -08:00
|
|
|
|
2026-02-22 20:44:15 -08:00
|
|
|
# Check if any home channels are missing
|
|
|
|
|
missing_home = []
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("TELEGRAM_BOT_TOKEN") and not get_env_value(
|
|
|
|
|
"TELEGRAM_HOME_CHANNEL"
|
|
|
|
|
):
|
2026-02-22 20:44:15 -08:00
|
|
|
missing_home.append("Telegram")
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("DISCORD_BOT_TOKEN") and not get_env_value(
|
|
|
|
|
"DISCORD_HOME_CHANNEL"
|
|
|
|
|
):
|
2026-02-22 20:44:15 -08:00
|
|
|
missing_home.append("Discord")
|
2026-03-11 01:33:29 +05:30
|
|
|
if get_env_value("SLACK_BOT_TOKEN") and not get_env_value("SLACK_HOME_CHANNEL"):
|
2026-02-22 20:44:15 -08:00
|
|
|
missing_home.append("Slack")
|
2026-03-03 19:31:16 -08:00
|
|
|
|
2026-02-22 20:44:15 -08:00
|
|
|
if missing_home:
|
|
|
|
|
print()
|
2026-03-03 19:31:16 -08:00
|
|
|
print_warning(f"No home channel set for: {', '.join(missing_home)}")
|
2026-02-22 20:44:15 -08:00
|
|
|
print_info(" Without a home channel, cron jobs and cross-platform")
|
|
|
|
|
print_info(" messages can't be delivered to those platforms.")
|
|
|
|
|
print_info(" Set one later with /set-home in your chat, or:")
|
|
|
|
|
for plat in missing_home:
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
f" hermes config set {plat.upper()}_HOME_CHANNEL <channel_id>"
|
|
|
|
|
)
|
2026-03-03 19:31:16 -08:00
|
|
|
|
|
|
|
|
# Offer to install the gateway as a system service
|
|
|
|
|
import platform as _platform
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-03 19:31:16 -08:00
|
|
|
_is_linux = _platform.system() == "Linux"
|
|
|
|
|
_is_macos = _platform.system() == "Darwin"
|
|
|
|
|
|
|
|
|
|
from hermes_cli.gateway import (
|
2026-03-11 01:33:29 +05:30
|
|
|
_is_service_installed,
|
|
|
|
|
_is_service_running,
|
2026-03-14 21:06:52 -07:00
|
|
|
has_conflicting_systemd_units,
|
|
|
|
|
install_linux_gateway_from_setup,
|
|
|
|
|
print_systemd_scope_conflict_warning,
|
2026-03-11 01:33:29 +05:30
|
|
|
systemd_start,
|
|
|
|
|
systemd_restart,
|
|
|
|
|
launchd_install,
|
|
|
|
|
launchd_start,
|
|
|
|
|
launchd_restart,
|
2026-03-03 19:31:16 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
service_installed = _is_service_installed()
|
|
|
|
|
service_running = _is_service_running()
|
|
|
|
|
|
|
|
|
|
print()
|
2026-03-14 21:06:52 -07:00
|
|
|
if _is_linux and has_conflicting_systemd_units():
|
|
|
|
|
print_systemd_scope_conflict_warning()
|
|
|
|
|
print()
|
|
|
|
|
|
2026-03-03 19:31:16 -08:00
|
|
|
if service_running:
|
|
|
|
|
if prompt_yes_no(" Restart the gateway to pick up changes?", True):
|
|
|
|
|
try:
|
|
|
|
|
if _is_linux:
|
|
|
|
|
systemd_restart()
|
|
|
|
|
elif _is_macos:
|
|
|
|
|
launchd_restart()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print_error(f" Restart failed: {e}")
|
|
|
|
|
elif service_installed:
|
|
|
|
|
if prompt_yes_no(" Start the gateway service?", True):
|
|
|
|
|
try:
|
|
|
|
|
if _is_linux:
|
|
|
|
|
systemd_start()
|
|
|
|
|
elif _is_macos:
|
|
|
|
|
launchd_start()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print_error(f" Start failed: {e}")
|
|
|
|
|
elif _is_linux or _is_macos:
|
|
|
|
|
svc_name = "systemd" if _is_linux else "launchd"
|
2026-03-11 01:33:29 +05:30
|
|
|
if prompt_yes_no(
|
|
|
|
|
f" Install the gateway as a {svc_name} service? (runs in background, starts on boot)",
|
|
|
|
|
True,
|
|
|
|
|
):
|
2026-03-03 19:31:16 -08:00
|
|
|
try:
|
2026-03-14 21:06:52 -07:00
|
|
|
installed_scope = None
|
|
|
|
|
did_install = False
|
2026-03-03 19:31:16 -08:00
|
|
|
if _is_linux:
|
2026-03-14 21:06:52 -07:00
|
|
|
installed_scope, did_install = install_linux_gateway_from_setup(force=False)
|
2026-03-03 19:31:16 -08:00
|
|
|
else:
|
|
|
|
|
launchd_install(force=False)
|
2026-03-14 21:06:52 -07:00
|
|
|
did_install = True
|
2026-03-03 19:31:16 -08:00
|
|
|
print()
|
2026-03-14 21:06:52 -07:00
|
|
|
if did_install and prompt_yes_no(" Start the service now?", True):
|
2026-03-03 19:31:16 -08:00
|
|
|
try:
|
|
|
|
|
if _is_linux:
|
2026-03-14 21:06:52 -07:00
|
|
|
systemd_start(system=installed_scope == "system")
|
2026-03-03 19:31:16 -08:00
|
|
|
elif _is_macos:
|
|
|
|
|
launchd_start()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print_error(f" Start failed: {e}")
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print_error(f" Install failed: {e}")
|
|
|
|
|
print_info(" You can try manually: hermes gateway install")
|
|
|
|
|
else:
|
|
|
|
|
print_info(" You can install later: hermes gateway install")
|
2026-03-14 21:06:52 -07:00
|
|
|
if _is_linux:
|
|
|
|
|
print_info(" Or as a boot-time service: sudo hermes gateway install --system")
|
2026-03-03 19:31:16 -08:00
|
|
|
print_info(" Or run in foreground: hermes gateway")
|
|
|
|
|
else:
|
|
|
|
|
print_info("Start the gateway to bring your bots online:")
|
|
|
|
|
print_info(" hermes gateway # Run in foreground")
|
|
|
|
|
|
2026-02-19 12:33:09 -08:00
|
|
|
print_info("━" * 50)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
2026-03-06 18:11:35 -08:00
|
|
|
# Section 5: Tool Configuration (delegates to unified tools_config.py)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# =============================================================================
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-08 23:06:31 -07:00
|
|
|
def setup_tools(config: dict, first_install: bool = False):
|
2026-03-06 18:11:35 -08:00
|
|
|
"""Configure tools — delegates to the unified tools_command() in tools_config.py.
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-06 18:11:35 -08:00
|
|
|
Both `hermes setup tools` and `hermes tools` use the same flow:
|
|
|
|
|
platform selection → toolset toggles → provider/API key configuration.
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-08 23:06:31 -07:00
|
|
|
Args:
|
|
|
|
|
first_install: When True, uses the simplified first-install flow
|
|
|
|
|
(no platform menu, prompts for all unconfigured API keys).
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
"""
|
2026-03-06 18:11:35 -08:00
|
|
|
from hermes_cli.tools_config import tools_command
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-08 23:39:00 -07:00
|
|
|
tools_command(first_install=first_install, config=config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
|
2026-03-26 16:29:38 -07:00
|
|
|
# =============================================================================
|
|
|
|
|
# Post-Migration Section Skip Logic
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _get_section_config_summary(config: dict, section_key: str) -> Optional[str]:
|
|
|
|
|
"""Return a short summary if a setup section is already configured, else None.
|
|
|
|
|
|
|
|
|
|
Used after OpenClaw migration to detect which sections can be skipped.
|
|
|
|
|
``get_env_value`` is the module-level import from hermes_cli.config
|
|
|
|
|
so that test patches on ``setup_mod.get_env_value`` take effect.
|
|
|
|
|
"""
|
|
|
|
|
if section_key == "model":
|
|
|
|
|
has_key = bool(
|
|
|
|
|
get_env_value("OPENROUTER_API_KEY")
|
|
|
|
|
or get_env_value("OPENAI_API_KEY")
|
|
|
|
|
or get_env_value("ANTHROPIC_API_KEY")
|
|
|
|
|
)
|
|
|
|
|
if not has_key:
|
|
|
|
|
# Check for OAuth providers
|
|
|
|
|
try:
|
|
|
|
|
from hermes_cli.auth import get_active_provider
|
|
|
|
|
if get_active_provider():
|
|
|
|
|
has_key = True
|
|
|
|
|
except Exception:
|
|
|
|
|
pass
|
|
|
|
|
if not has_key:
|
|
|
|
|
return None
|
|
|
|
|
model = config.get("model")
|
|
|
|
|
if isinstance(model, str) and model.strip():
|
|
|
|
|
return model.strip()
|
|
|
|
|
if isinstance(model, dict):
|
|
|
|
|
return str(model.get("default") or model.get("model") or "configured")
|
|
|
|
|
return "configured"
|
|
|
|
|
|
|
|
|
|
elif section_key == "terminal":
|
|
|
|
|
backend = config.get("terminal", {}).get("backend", "local")
|
|
|
|
|
return f"backend: {backend}"
|
|
|
|
|
|
|
|
|
|
elif section_key == "agent":
|
|
|
|
|
max_turns = config.get("agent", {}).get("max_turns", 90)
|
|
|
|
|
return f"max turns: {max_turns}"
|
|
|
|
|
|
|
|
|
|
elif section_key == "gateway":
|
|
|
|
|
platforms = []
|
|
|
|
|
if get_env_value("TELEGRAM_BOT_TOKEN"):
|
|
|
|
|
platforms.append("Telegram")
|
|
|
|
|
if get_env_value("DISCORD_BOT_TOKEN"):
|
|
|
|
|
platforms.append("Discord")
|
|
|
|
|
if get_env_value("SLACK_BOT_TOKEN"):
|
|
|
|
|
platforms.append("Slack")
|
|
|
|
|
if get_env_value("WHATSAPP_PHONE_NUMBER_ID"):
|
|
|
|
|
platforms.append("WhatsApp")
|
|
|
|
|
if get_env_value("SIGNAL_ACCOUNT"):
|
|
|
|
|
platforms.append("Signal")
|
|
|
|
|
if platforms:
|
|
|
|
|
return ", ".join(platforms)
|
|
|
|
|
return None # No platforms configured — section must run
|
|
|
|
|
|
|
|
|
|
elif section_key == "tools":
|
|
|
|
|
tools = []
|
|
|
|
|
if get_env_value("ELEVENLABS_API_KEY"):
|
|
|
|
|
tools.append("TTS/ElevenLabs")
|
|
|
|
|
if get_env_value("BROWSERBASE_API_KEY"):
|
|
|
|
|
tools.append("Browser")
|
|
|
|
|
if get_env_value("FIRECRAWL_API_KEY"):
|
|
|
|
|
tools.append("Firecrawl")
|
|
|
|
|
if tools:
|
|
|
|
|
return ", ".join(tools)
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _skip_configured_section(
|
|
|
|
|
config: dict, section_key: str, label: str
|
|
|
|
|
) -> bool:
|
|
|
|
|
"""Show an already-configured section summary and offer to skip.
|
|
|
|
|
|
|
|
|
|
Returns True if the user chose to skip, False if the section should run.
|
|
|
|
|
"""
|
|
|
|
|
summary = _get_section_config_summary(config, section_key)
|
|
|
|
|
if not summary:
|
|
|
|
|
return False
|
|
|
|
|
print()
|
|
|
|
|
print_success(f" {label}: {summary}")
|
|
|
|
|
return not prompt_yes_no(f" Reconfigure {label.lower()}?", default=False)
|
|
|
|
|
|
|
|
|
|
|
2026-03-11 09:09:58 -07:00
|
|
|
# =============================================================================
|
|
|
|
|
# OpenClaw Migration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_OPENCLAW_SCRIPT = (
|
2026-03-30 17:34:43 -07:00
|
|
|
get_optional_skills_dir(PROJECT_ROOT / "optional-skills")
|
2026-03-12 02:49:29 +05:30
|
|
|
/ "migration"
|
|
|
|
|
/ "openclaw-migration"
|
|
|
|
|
/ "scripts"
|
|
|
|
|
/ "openclaw_to_hermes.py"
|
2026-03-11 09:09:58 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _offer_openclaw_migration(hermes_home: Path) -> bool:
|
|
|
|
|
"""Detect ~/.openclaw and offer to migrate during first-time setup.
|
|
|
|
|
|
|
|
|
|
Returns True if migration ran successfully, False otherwise.
|
|
|
|
|
"""
|
|
|
|
|
openclaw_dir = Path.home() / ".openclaw"
|
|
|
|
|
if not openclaw_dir.is_dir():
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
if not _OPENCLAW_SCRIPT.exists():
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print_header("OpenClaw Installation Detected")
|
|
|
|
|
print_info(f"Found OpenClaw data at {openclaw_dir}")
|
|
|
|
|
print_info("Hermes can import your settings, memories, skills, and API keys.")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
if not prompt_yes_no("Would you like to import from OpenClaw?", default=True):
|
2026-03-12 02:49:29 +05:30
|
|
|
print_info(
|
|
|
|
|
"Skipping migration. You can run it later via the openclaw-migration skill."
|
|
|
|
|
)
|
2026-03-11 09:09:58 -07:00
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
# Ensure config.yaml exists before migration tries to read it
|
|
|
|
|
config_path = get_config_path()
|
|
|
|
|
if not config_path.exists():
|
|
|
|
|
save_config(load_config())
|
|
|
|
|
|
|
|
|
|
# Dynamically load the migration script
|
|
|
|
|
try:
|
|
|
|
|
spec = importlib.util.spec_from_file_location(
|
|
|
|
|
"openclaw_to_hermes", _OPENCLAW_SCRIPT
|
|
|
|
|
)
|
|
|
|
|
if spec is None or spec.loader is None:
|
|
|
|
|
print_warning("Could not load migration script.")
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
mod = importlib.util.module_from_spec(spec)
|
feat: add 'hermes claw migrate' command + migration docs
- Add hermes_cli/claw.py with full CLI migration handler:
- hermes claw migrate (interactive migration with confirmation)
- --dry-run, --preset, --overwrite, --skill-conflict flags
- --source for custom OpenClaw path
- --yes to skip confirmation
- Clean formatted output matching setup wizard style
- Fix Python 3.11+ @dataclass compatibility bug in dynamic module loading:
- Register module in sys.modules before exec_module()
- Fixes both setup.py (PR #981) and new claw.py
- Add 16 tests in tests/hermes_cli/test_claw.py covering:
- Script discovery (project root, installed, missing)
- Command routing
- Dry-run, execute, cancellation, error handling
- Preset/secrets behavior, report formatting
- Documentation updates:
- README.md: Add 'hermes claw migrate' to Getting Started, new Migration section
- docs/migration/openclaw.md: Full migration guide with all options
- SKILL.md: Add CLI Command section at top of openclaw-migration skill
2026-03-12 08:20:12 -07:00
|
|
|
# Register in sys.modules so @dataclass can resolve the module
|
|
|
|
|
# (Python 3.11+ requires this for dynamically loaded modules)
|
|
|
|
|
import sys as _sys
|
|
|
|
|
_sys.modules[spec.name] = mod
|
|
|
|
|
try:
|
|
|
|
|
spec.loader.exec_module(mod)
|
|
|
|
|
except Exception:
|
|
|
|
|
_sys.modules.pop(spec.name, None)
|
|
|
|
|
raise
|
2026-03-11 09:09:58 -07:00
|
|
|
|
|
|
|
|
# Run migration with the "full" preset, execute mode, no overwrite
|
|
|
|
|
selected = mod.resolve_selected_options(None, None, preset="full")
|
|
|
|
|
migrator = mod.Migrator(
|
|
|
|
|
source_root=openclaw_dir.resolve(),
|
|
|
|
|
target_root=hermes_home.resolve(),
|
|
|
|
|
execute=True,
|
|
|
|
|
workspace_target=None,
|
2026-03-26 16:29:38 -07:00
|
|
|
overwrite=True,
|
2026-03-11 09:09:58 -07:00
|
|
|
migrate_secrets=True,
|
|
|
|
|
output_dir=None,
|
|
|
|
|
selected_options=selected,
|
|
|
|
|
preset_name="full",
|
|
|
|
|
)
|
|
|
|
|
report = migrator.migrate()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print_warning(f"Migration failed: {e}")
|
|
|
|
|
logger.debug("OpenClaw migration error", exc_info=True)
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
# Print summary
|
|
|
|
|
summary = report.get("summary", {})
|
|
|
|
|
migrated = summary.get("migrated", 0)
|
|
|
|
|
skipped = summary.get("skipped", 0)
|
|
|
|
|
conflicts = summary.get("conflict", 0)
|
|
|
|
|
errors = summary.get("error", 0)
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
if migrated:
|
|
|
|
|
print_success(f"Imported {migrated} item(s) from OpenClaw.")
|
|
|
|
|
if conflicts:
|
|
|
|
|
print_info(f"Skipped {conflicts} item(s) that already exist in Hermes.")
|
|
|
|
|
if skipped:
|
|
|
|
|
print_info(f"Skipped {skipped} item(s) (not found or unchanged).")
|
|
|
|
|
if errors:
|
|
|
|
|
print_warning(f"{errors} item(s) had errors — check the migration report.")
|
|
|
|
|
|
|
|
|
|
output_dir = report.get("output_dir")
|
|
|
|
|
if output_dir:
|
|
|
|
|
print_info(f"Full report saved to: {output_dir}")
|
|
|
|
|
|
|
|
|
|
print_success("Migration complete! Continuing with setup...")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# =============================================================================
|
|
|
|
|
# Main Wizard Orchestrator
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
|
|
SETUP_SECTIONS = [
|
|
|
|
|
("model", "Model & Provider", setup_model_provider),
|
2026-03-17 02:33:12 -07:00
|
|
|
("tts", "Text-to-Speech", setup_tts),
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
("terminal", "Terminal Backend", setup_terminal_backend),
|
|
|
|
|
("gateway", "Messaging Platforms (Gateway)", setup_gateway),
|
|
|
|
|
("tools", "Tools", setup_tools),
|
|
|
|
|
("agent", "Agent Settings", setup_agent_settings),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run_setup_wizard(args):
|
|
|
|
|
"""Run the interactive setup wizard.
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
Supports full, quick, and section-specific setup:
|
|
|
|
|
hermes setup — full or quick (auto-detected)
|
|
|
|
|
hermes setup model — just model/provider
|
|
|
|
|
hermes setup terminal — just terminal backend
|
|
|
|
|
hermes setup gateway — just messaging platforms
|
|
|
|
|
hermes setup tools — just tool configuration
|
|
|
|
|
hermes setup agent — just agent settings
|
|
|
|
|
"""
|
feat: nix flake — uv2nix build, NixOS module, persistent container mode (#20)
* feat: nix flake, uv2nix build, dev shell and home manager
* fixed nix run, updated docs for setup
* feat(nix): NixOS module with persistent container mode, managed guards, checks
- Replace homeModules.nix with nixosModules.nix (two deployment modes)
- Mode A (native): hardened systemd service with ProtectSystem=strict
- Mode B (container): persistent Ubuntu container with /nix/store bind-mount,
identity-hash-based recreation, GC root protection, symlink-based updates
- Add HERMES_MANAGED guards blocking CLI config mutation (config set, setup,
gateway install/uninstall) when running under NixOS module
- Add nix/checks.nix with build-time verification (binary, CLI, managed guard)
- Remove container.nix (no Nix-built OCI image; pulls ubuntu:24.04 at runtime)
- Simplify packages.nix (drop fetchFromGitHub submodules, PYTHONPATH wrappers)
- Rewrite docs/nixos-setup.md with full options reference, container
architecture, secrets management, and troubleshooting guide
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update config.py
* feat(nix): add CI workflow and enhanced build checks
- GitHub Actions workflow for nix flake check + build on linux/macOS
- Entry point sync check to catch pyproject.toml drift
- Expanded managed-guard check to cover config edit
- Wrap hermes-acp binary in Nix package
- Fix Path type mismatch in is_managed()
* Update MCP server package name; bundled skills support
* fix reading .env. instead have container user a common mounted .env file
* feat(nix): container entrypoint with privilege drop and sudo provisioning
Container was running as non-root via --user, which broke apt/pip installs
and caused crashes when $HOME didn't exist. Replace --user with a Nix-built
entrypoint script that provisions the hermes user, sudo (NOPASSWD), and
/home/hermes inside the container on first boot, then drops privileges via
setpriv. Writable layer persists so setup only runs once.
Also expands MCP server options to support HTTP transport and sampling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix group and user creation in container mode
* feat(nix): persistent /home/hermes and MESSAGING_CWD in container mode
Container mode now bind-mounts ${stateDir}/home to /home/hermes so the
agent's home directory survives container recreation. Previously it lived
in the writable layer and was lost on image/volume/options changes.
Also passes MESSAGING_CWD to the container so the agent finds its
workspace and documents, matching native mode behavior.
Other changes:
- Extract containerDataDir/containerHomeDir bindings (no more magic strings)
- Fix entrypoint chown to run unconditionally (volume mounts always exist)
- Add schema field to container identity hash for auto-recreation
- Add idempotency test (Scenario G) to config-roundtrip check
* docs: add Nix & NixOS setup guide to docs site
Add comprehensive Nix documentation to the Docusaurus site at
website/docs/getting-started/nix-setup.md, covering nix run/profile
install, NixOS module (native + container modes), declarative settings,
secrets management, MCP servers, managed mode, container architecture,
dev shell, flake checks, and full options reference.
- Register nix-setup in sidebar after installation page
- Add Nix callout tip to installation.md linking to new guide
- Add canonical version pointer in docs/nixos-setup.md
* docs: remove docs/nixos-setup.md, consolidate into website docs
Backfill missing details (restart/restartSec in full example,
gateway.pid, 0750 permissions, docker inspect commands) into
the canonical website/docs/getting-started/nix-setup.md and
delete the old standalone file.
* fix(nix): add compression.protect_last_n and target_ratio to config-keys.json
New keys were added to DEFAULT_CONFIG on main, causing the
config-drift check to fail in CI.
* fix(nix): skip checks on aarch64-darwin (onnxruntime wheel missing)
The full Python venv includes onnxruntime (via faster-whisper/STT)
which lacks a compatible uv2nix wheel on aarch64-darwin. Gate all
checks behind stdenv.hostPlatform.isLinux. The package and devShell
still evaluate on macOS.
* fix(nix): skip flake check and build on macOS CI
onnxruntime (transitive dep via faster-whisper) lacks a compatible
uv2nix wheel on aarch64-darwin. Run full checks and build on Linux
only; macOS CI verifies the flake evaluates without building.
* fix(nix): preserve container writable layer across nixos-rebuild
The container identity hash included the entrypoint's Nix store path,
which changes on every nixpkgs update (due to runtimeShell/stdenv
input-addressing). This caused false-positive identity mismatches,
triggering container recreation and losing the persistent writable layer.
- Use stable symlink (current-entrypoint) like current-package already does
- Remove entrypoint from identity hash (only image/volumes/options matter)
- Add GC root for entrypoint so nix-collect-garbage doesn't break it
- Remove global HERMES_HOME env var from addToSystemPackages (conflicted
with interactive CLI use, service already sets its own)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 01:08:02 +05:30
|
|
|
from hermes_cli.config import is_managed, managed_error
|
|
|
|
|
if is_managed():
|
|
|
|
|
managed_error("run setup wizard")
|
|
|
|
|
return
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
ensure_hermes_home()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
config = load_config()
|
|
|
|
|
hermes_home = get_hermes_home()
|
2026-03-11 01:33:29 +05:30
|
|
|
|
2026-03-11 15:52:35 +03:00
|
|
|
# Detect non-interactive environments (headless SSH, Docker, CI/CD)
|
|
|
|
|
non_interactive = getattr(args, 'non_interactive', False)
|
2026-03-14 02:37:29 -07:00
|
|
|
if not non_interactive and not is_interactive_stdin():
|
2026-03-11 15:52:35 +03:00
|
|
|
non_interactive = True
|
|
|
|
|
|
|
|
|
|
if non_interactive:
|
2026-03-14 02:37:29 -07:00
|
|
|
print_noninteractive_setup_guidance(
|
|
|
|
|
"Running in a non-interactive environment (no TTY detected)."
|
|
|
|
|
)
|
2026-03-11 15:52:35 +03:00
|
|
|
return
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Check if a specific section was requested
|
2026-03-11 01:33:29 +05:30
|
|
|
section = getattr(args, "section", None)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
if section:
|
|
|
|
|
for key, label, func in SETUP_SECTIONS:
|
|
|
|
|
if key == section:
|
|
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"┌─────────────────────────────────────────────────────────┐",
|
|
|
|
|
Colors.MAGENTA,
|
|
|
|
|
)
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print(color(f"│ ⚕ Hermes Setup — {label:<34s} │", Colors.MAGENTA))
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"└─────────────────────────────────────────────────────────┘",
|
|
|
|
|
Colors.MAGENTA,
|
|
|
|
|
)
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
func(config)
|
|
|
|
|
save_config(config)
|
|
|
|
|
print()
|
|
|
|
|
print_success(f"{label} configuration complete!")
|
|
|
|
|
return
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_error(f"Unknown setup section: {section}")
|
|
|
|
|
print_info(f"Available sections: {', '.join(k for k, _, _ in SETUP_SECTIONS)}")
|
|
|
|
|
return
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Check if this is an existing installation with a provider configured
|
|
|
|
|
from hermes_cli.auth import get_active_provider
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
active_provider = get_active_provider()
|
|
|
|
|
is_existing = (
|
|
|
|
|
bool(get_env_value("OPENROUTER_API_KEY"))
|
|
|
|
|
or bool(get_env_value("OPENAI_BASE_URL"))
|
|
|
|
|
or active_provider is not None
|
|
|
|
|
)
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"┌─────────────────────────────────────────────────────────┐",
|
|
|
|
|
Colors.MAGENTA,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"│ ⚕ Hermes Agent Setup Wizard │", Colors.MAGENTA
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"├─────────────────────────────────────────────────────────┤",
|
|
|
|
|
Colors.MAGENTA,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"│ Let's configure your Hermes Agent installation. │", Colors.MAGENTA
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"│ Press Ctrl+C at any time to exit. │", Colors.MAGENTA
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
print(
|
|
|
|
|
color(
|
|
|
|
|
"└─────────────────────────────────────────────────────────┘",
|
|
|
|
|
Colors.MAGENTA,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-26 16:29:38 -07:00
|
|
|
migration_ran = False
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
if is_existing:
|
|
|
|
|
# ── Returning User Menu ──
|
2026-02-23 23:06:47 +00:00
|
|
|
print()
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_header("Welcome Back!")
|
|
|
|
|
print_success("You already have Hermes configured.")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
menu_choices = [
|
2026-03-06 17:55:44 -08:00
|
|
|
"Quick Setup - configure missing items only",
|
|
|
|
|
"Full Setup - reconfigure everything",
|
|
|
|
|
"---",
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
"Model & Provider",
|
|
|
|
|
"Terminal Backend",
|
|
|
|
|
"Messaging Platforms (Gateway)",
|
|
|
|
|
"Tools",
|
|
|
|
|
"Agent Settings",
|
2026-03-06 17:55:44 -08:00
|
|
|
"---",
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
"Exit",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Separator indices (not selectable, but prompt_choice doesn't filter them,
|
|
|
|
|
# so we handle them below)
|
|
|
|
|
choice = prompt_choice("What would you like to do?", menu_choices, 0)
|
|
|
|
|
|
|
|
|
|
if choice == 0:
|
|
|
|
|
# Quick setup
|
|
|
|
|
_run_quick_setup(config, hermes_home)
|
|
|
|
|
return
|
|
|
|
|
elif choice == 1:
|
|
|
|
|
# Full setup — fall through to run all sections
|
|
|
|
|
pass
|
|
|
|
|
elif choice in (2, 8):
|
|
|
|
|
# Separator — treat as exit
|
|
|
|
|
print_info("Exiting. Run 'hermes setup' again when ready.")
|
|
|
|
|
return
|
|
|
|
|
elif choice == 9:
|
|
|
|
|
print_info("Exiting. Run 'hermes setup' again when ready.")
|
|
|
|
|
return
|
|
|
|
|
elif 3 <= choice <= 7:
|
2026-03-25 17:14:43 -07:00
|
|
|
# Individual section — map by key, not by position.
|
|
|
|
|
# SETUP_SECTIONS includes TTS but the returning-user menu skips it,
|
|
|
|
|
# so positional indexing (choice - 3) would dispatch the wrong section.
|
|
|
|
|
_RETURNING_USER_SECTION_KEYS = ["model", "terminal", "gateway", "tools", "agent"]
|
|
|
|
|
section_key = _RETURNING_USER_SECTION_KEYS[choice - 3]
|
|
|
|
|
section = next((s for s in SETUP_SECTIONS if s[0] == section_key), None)
|
|
|
|
|
if section:
|
|
|
|
|
_, label, func = section
|
|
|
|
|
func(config)
|
|
|
|
|
save_config(config)
|
|
|
|
|
_print_setup_summary(config, hermes_home)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
return
|
|
|
|
|
else:
|
|
|
|
|
# ── First-Time Setup ──
|
|
|
|
|
print()
|
|
|
|
|
print_info("We'll walk you through:")
|
|
|
|
|
print_info(" 1. Model & Provider — choose your AI provider and model")
|
|
|
|
|
print_info(" 2. Terminal Backend — where your agent runs commands")
|
2026-03-22 04:55:34 -07:00
|
|
|
print_info(" 3. Agent Settings — iterations, compression, session reset")
|
|
|
|
|
print_info(" 4. Messaging Platforms — connect Telegram, Discord, etc.")
|
|
|
|
|
print_info(" 5. Tools — configure TTS, web search, image generation, etc.")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print()
|
|
|
|
|
print_info("Press Enter to begin, or Ctrl+C to exit.")
|
|
|
|
|
try:
|
|
|
|
|
input(color(" Press Enter to start... ", Colors.YELLOW))
|
|
|
|
|
except (KeyboardInterrupt, EOFError):
|
|
|
|
|
print()
|
|
|
|
|
return
|
|
|
|
|
|
2026-03-11 09:09:58 -07:00
|
|
|
# Offer OpenClaw migration before configuration begins
|
2026-03-26 16:29:38 -07:00
|
|
|
migration_ran = _offer_openclaw_migration(hermes_home)
|
|
|
|
|
if migration_ran:
|
2026-03-11 09:09:58 -07:00
|
|
|
# Reload config in case migration wrote to it
|
|
|
|
|
config = load_config()
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# ── Full Setup — run all sections ──
|
|
|
|
|
print_header("Configuration Location")
|
|
|
|
|
print_info(f"Config file: {get_config_path()}")
|
|
|
|
|
print_info(f"Secrets file: {get_env_path()}")
|
|
|
|
|
print_info(f"Data folder: {hermes_home}")
|
|
|
|
|
print_info(f"Install dir: {PROJECT_ROOT}")
|
|
|
|
|
print()
|
|
|
|
|
print_info("You can edit these files directly or use 'hermes config edit'")
|
|
|
|
|
|
2026-03-26 16:29:38 -07:00
|
|
|
if migration_ran:
|
|
|
|
|
print()
|
|
|
|
|
print_info("Settings were imported from OpenClaw.")
|
|
|
|
|
print_info("Each section below will show what was imported — press Enter to keep,")
|
|
|
|
|
print_info("or choose to reconfigure if needed.")
|
|
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Section 1: Model & Provider
|
2026-03-26 16:29:38 -07:00
|
|
|
if not (migration_ran and _skip_configured_section(config, "model", "Model & Provider")):
|
|
|
|
|
setup_model_provider(config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Section 2: Terminal Backend
|
2026-03-26 16:29:38 -07:00
|
|
|
if not (migration_ran and _skip_configured_section(config, "terminal", "Terminal Backend")):
|
|
|
|
|
setup_terminal_backend(config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Section 3: Agent Settings
|
2026-03-26 16:29:38 -07:00
|
|
|
if not (migration_ran and _skip_configured_section(config, "agent", "Agent Settings")):
|
|
|
|
|
setup_agent_settings(config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Section 4: Messaging Platforms
|
2026-03-26 16:29:38 -07:00
|
|
|
if not (migration_ran and _skip_configured_section(config, "gateway", "Messaging Platforms")):
|
|
|
|
|
setup_gateway(config)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Section 5: Tools
|
2026-03-26 16:29:38 -07:00
|
|
|
if not (migration_ran and _skip_configured_section(config, "tools", "Tools")):
|
|
|
|
|
setup_tools(config, first_install=not is_existing)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# Save and show summary
|
|
|
|
|
save_config(config)
|
|
|
|
|
_print_setup_summary(config, hermes_home)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _run_quick_setup(config: dict, hermes_home):
|
|
|
|
|
"""Quick setup — only configure items that are missing."""
|
|
|
|
|
from hermes_cli.config import (
|
2026-03-11 01:33:29 +05:30
|
|
|
get_missing_env_vars,
|
|
|
|
|
get_missing_config_fields,
|
|
|
|
|
check_config_version,
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print_header("Quick Setup — Missing Items Only")
|
|
|
|
|
|
|
|
|
|
# Check what's missing
|
2026-03-11 01:33:29 +05:30
|
|
|
missing_required = [
|
|
|
|
|
v for v in get_missing_env_vars(required_only=False) if v.get("is_required")
|
|
|
|
|
]
|
|
|
|
|
missing_optional = [
|
|
|
|
|
v for v in get_missing_env_vars(required_only=False) if not v.get("is_required")
|
|
|
|
|
]
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
missing_config = get_missing_config_fields()
|
|
|
|
|
current_ver, latest_ver = check_config_version()
|
|
|
|
|
|
2026-03-11 01:33:29 +05:30
|
|
|
has_anything_missing = (
|
|
|
|
|
missing_required
|
|
|
|
|
or missing_optional
|
|
|
|
|
or missing_config
|
|
|
|
|
or current_ver < latest_ver
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
if not has_anything_missing:
|
|
|
|
|
print_success("Everything is configured! Nothing to do.")
|
|
|
|
|
print()
|
|
|
|
|
print_info("Run 'hermes setup' and choose 'Full Setup' to reconfigure,")
|
|
|
|
|
print_info("or pick a specific section from the menu.")
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
# Handle missing required env vars
|
|
|
|
|
if missing_required:
|
|
|
|
|
print()
|
|
|
|
|
print_info(f"{len(missing_required)} required setting(s) missing:")
|
|
|
|
|
for var in missing_required:
|
|
|
|
|
print(f" • {var['name']}")
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
for var in missing_required:
|
|
|
|
|
print()
|
|
|
|
|
print(color(f" {var['name']}", Colors.CYAN))
|
|
|
|
|
print_info(f" {var.get('description', '')}")
|
|
|
|
|
if var.get("url"):
|
|
|
|
|
print_info(f" Get key at: {var['url']}")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
if var.get("password"):
|
|
|
|
|
value = prompt(f" {var.get('prompt', var['name'])}", password=True)
|
|
|
|
|
else:
|
|
|
|
|
value = prompt(f" {var.get('prompt', var['name'])}")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
if value:
|
|
|
|
|
save_env_value(var["name"], value)
|
|
|
|
|
print_success(f" Saved {var['name']}")
|
2026-02-04 09:36:51 -08:00
|
|
|
else:
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print_warning(f" Skipped {var['name']}")
|
|
|
|
|
|
|
|
|
|
# Split missing optional vars by category
|
|
|
|
|
missing_tools = [v for v in missing_optional if v.get("category") == "tool"]
|
2026-03-11 01:33:29 +05:30
|
|
|
missing_messaging = [
|
|
|
|
|
v
|
|
|
|
|
for v in missing_optional
|
|
|
|
|
if v.get("category") == "messaging" and not v.get("advanced")
|
|
|
|
|
]
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
|
|
|
|
|
# ── Tool API keys (checklist) ──
|
|
|
|
|
if missing_tools:
|
|
|
|
|
print()
|
|
|
|
|
print_header("Tool API Keys")
|
|
|
|
|
|
|
|
|
|
checklist_labels = []
|
|
|
|
|
for var in missing_tools:
|
|
|
|
|
tools = var.get("tools", [])
|
|
|
|
|
tools_str = f" → {', '.join(tools[:2])}" if tools else ""
|
|
|
|
|
checklist_labels.append(f"{var.get('description', var['name'])}{tools_str}")
|
|
|
|
|
|
|
|
|
|
selected_indices = prompt_checklist(
|
|
|
|
|
"Which tools would you like to configure?",
|
|
|
|
|
checklist_labels,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
for idx in selected_indices:
|
|
|
|
|
var = missing_tools[idx]
|
|
|
|
|
_prompt_api_key(var)
|
|
|
|
|
|
|
|
|
|
# ── Messaging platforms (checklist then prompt for selected) ──
|
|
|
|
|
if missing_messaging:
|
|
|
|
|
print()
|
|
|
|
|
print_header("Messaging Platforms")
|
|
|
|
|
print_info("Connect Hermes to messaging apps to chat from anywhere.")
|
|
|
|
|
print_info("You can configure these later with 'hermes setup gateway'.")
|
|
|
|
|
|
|
|
|
|
# Group by platform (preserving order)
|
|
|
|
|
platform_order = []
|
|
|
|
|
platforms = {}
|
|
|
|
|
for var in missing_messaging:
|
|
|
|
|
name = var["name"]
|
|
|
|
|
if "TELEGRAM" in name:
|
|
|
|
|
plat = "Telegram"
|
|
|
|
|
elif "DISCORD" in name:
|
|
|
|
|
plat = "Discord"
|
|
|
|
|
elif "SLACK" in name:
|
|
|
|
|
plat = "Slack"
|
|
|
|
|
else:
|
|
|
|
|
continue
|
|
|
|
|
if plat not in platforms:
|
|
|
|
|
platform_order.append(plat)
|
|
|
|
|
platforms.setdefault(plat, []).append(var)
|
|
|
|
|
|
|
|
|
|
platform_labels = [
|
2026-03-11 01:33:29 +05:30
|
|
|
{
|
|
|
|
|
"Telegram": "📱 Telegram",
|
|
|
|
|
"Discord": "💬 Discord",
|
|
|
|
|
"Slack": "💼 Slack",
|
|
|
|
|
}.get(p, p)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
for p in platform_order
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
selected_indices = prompt_checklist(
|
|
|
|
|
"Which platforms would you like to set up?",
|
|
|
|
|
platform_labels,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
for idx in selected_indices:
|
|
|
|
|
plat = platform_order[idx]
|
|
|
|
|
vars_list = platforms[plat]
|
|
|
|
|
emoji = {"Telegram": "📱", "Discord": "💬", "Slack": "💼"}.get(plat, "")
|
|
|
|
|
print()
|
|
|
|
|
print(color(f" ─── {emoji} {plat} ───", Colors.CYAN))
|
|
|
|
|
print()
|
|
|
|
|
for var in vars_list:
|
|
|
|
|
print_info(f" {var.get('description', '')}")
|
|
|
|
|
if var.get("url"):
|
|
|
|
|
print_info(f" {var['url']}")
|
|
|
|
|
if var.get("password"):
|
|
|
|
|
value = prompt(f" {var.get('prompt', var['name'])}", password=True)
|
2026-02-07 00:05:04 +00:00
|
|
|
else:
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
value = prompt(f" {var.get('prompt', var['name'])}")
|
|
|
|
|
if value:
|
|
|
|
|
save_env_value(var["name"], value)
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
print_success(" ✓ Saved")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
else:
|
chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119)
Three categories of cleanup, all zero-behavioral-change:
1. F-strings without placeholders (154 fixes across 29 files)
- Converted f'...' to '...' where no {expression} was present
- Heaviest files: run_agent.py (24), cli.py (20), honcho_integration/cli.py (34)
2. Simplify defensive patterns in run_agent.py
- Added explicit self._is_anthropic_oauth = False in __init__ (before
the api_mode branch that conditionally sets it)
- Replaced 7x getattr(self, '_is_anthropic_oauth', False) with direct
self._is_anthropic_oauth (attribute always initialized now)
- Added _is_openrouter_url() and _is_anthropic_url() helper methods
- Replaced 3 inline 'openrouter' in self._base_url_lower checks
3. Remove dead code in small files
- hermes_cli/claw.py: removed unused 'total' computation
- tools/fuzzy_match.py: removed unused strip_indent() function and
pattern_stripped variable
Full test suite: 6184 passed, 0 failures
E2E PTY: banner clean, tool calls work, zero garbled ANSI
2026-03-25 19:47:58 -07:00
|
|
|
print_warning(" Skipped")
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
# Handle missing config fields
|
|
|
|
|
if missing_config:
|
2026-02-23 23:06:47 +00:00
|
|
|
print()
|
2026-03-11 01:33:29 +05:30
|
|
|
print_info(
|
|
|
|
|
f"Adding {len(missing_config)} new config option(s) with defaults..."
|
|
|
|
|
)
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
for field in missing_config:
|
|
|
|
|
print_success(f" Added {field['key']} = {field['default']}")
|
2026-03-11 01:33:29 +05:30
|
|
|
|
feat: modular setup wizard with section subcommands and tool-first UX
Restructure the monolithic hermes setup wizard into independently-runnable
sections with a category-first tool configuration experience.
Changes:
- Break setup into 5 sections: model, terminal, gateway, tools, agent
- Each section is a standalone function, runnable individually via
'hermes setup model', 'hermes setup terminal', etc.
- Returning users get a menu: Quick Setup / Full Setup / individual sections
- First-time users get a guided walkthrough of all sections
Tool Configuration UX overhaul:
- Replace flat API key checklist with category-first approach
- Show tool types (TTS, Web Search, Image Gen, etc.) as top-level items
- Within each category, let users pick a provider:
- TTS: Microsoft Edge (Free), OpenAI, ElevenLabs
- Web: Firecrawl Cloud, Firecrawl Self-Hosted
- Image Gen: FAL.ai
- Browser: Browserbase
- Smart Home: Home Assistant
- RL Training: Tinker/Atropos
- GitHub: Personal Access Token
- Shows configured status on each tool and provider
- Only prompts for API keys after provider selection
Also:
- Add section argument to setup argparse parser in main.py
- Update summary to show new section commands
- Add self-hosted Firecrawl and Home Assistant to tool setup
- All 2013 tests pass
2026-03-06 17:46:31 -08:00
|
|
|
# Update config version
|
|
|
|
|
config["_config_version"] = latest_ver
|
|
|
|
|
save_config(config)
|
|
|
|
|
|
|
|
|
|
# Jump to summary
|
2026-02-02 19:39:23 -08:00
|
|
|
_print_setup_summary(config, hermes_home)
|