Adds a bootstrap launcher and a blocking first-run onboarding wizard that guides new users through minimum Hermes setup from the browser UI. Supported provider flows: OpenRouter, Anthropic, OpenAI, custom OpenAI-compatible. OAuth/terminal-first flows remain via 'hermes model'. Security hardening applied during review: - /api/onboarding/setup restricted to loopback when auth disabled - Newline injection guard in _write_env_file - esc() on setup.unsupported_note in onboarding.js - Test isolation fix (send_key instead of bot_name in contamination test) - Skip markers for PyYAML-dependent tests in agent-less environments Tests: 693 passed (up from 679) Co-authored-by: Nathan Esquenazi <nesquena@gmail.com> Co-authored-by: gabogabucho <gabogabucho@gmail.com>
26 lines
596 B
Bash
Executable File
26 lines
596 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
if [[ -f "${REPO_ROOT}/.env" ]]; then
|
|
set -a
|
|
# shellcheck source=/dev/null
|
|
source "${REPO_ROOT}/.env"
|
|
set +a
|
|
fi
|
|
|
|
PYTHON="${HERMES_WEBUI_PYTHON:-}"
|
|
if [[ -z "${PYTHON}" ]]; then
|
|
if command -v python3 >/dev/null 2>&1; then
|
|
PYTHON="$(command -v python3)"
|
|
elif command -v python >/dev/null 2>&1; then
|
|
PYTHON="$(command -v python)"
|
|
else
|
|
echo "[XX] Python 3 is required to run bootstrap.py" >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
exec "${PYTHON}" "${REPO_ROOT}/bootstrap.py" --no-browser "$@"
|