blob: 8594c424640a11bb7b80b5be83bdad05af75aa39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
post_install() {
local pkgname="hermes-agent"
# Auto-configure browser executable path if system Chrome/Chromium exists
local env_file="${HERMES_HOME:-$HOME/.hermes}/.env"
if [ -f "$env_file" ] && ! grep -q '^AGENT_BROWSER_EXECUTABLE_PATH=' "$env_file" 2>/dev/null; then
local browser_path=""
for candidate in google-chrome google-chrome-stable chromium chromium-browser chrome; do
browser_path="$(command -v "$candidate" 2>/dev/null)" && break
done
if [ -n "$browser_path" ]; then
printf '\n# Hermes Agent browser tools — use the system Chrome/Chromium binary.\nAGENT_BROWSER_EXECUTABLE_PATH=%s\n' "$browser_path" >> "$env_file"
echo "==> Configured browser tools to use $browser_path"
fi
fi
echo "==> Hermes Agent has been installed."
echo "==> To get started, run:"
echo " mkdir -p ~/.hermes/{cron,sessions,logs,memories,skills,pairing,hooks,image_cache,audio_cache,whatsapp/session}"
echo " cp /opt/$pkgname/cli-config.yaml.example ~/.hermes/config.yaml"
echo " cp /opt/$pkgname/.env.example ~/.hermes/.env"
echo " cp -r /opt/$pkgname/skills ~/.hermes/"
echo " ln -s /opt/$pkgname/scripts/whatsapp-bridge ~/.hermes/whatsapp-bridge"
echo "==> Add your API keys to ~/.hermes/.env"
echo "==> Then run 'hermes model' to configure your provider."
echo "==> Run 'hermes doctor' to verify your setup."
}
post_upgrade() {
post_install
}
|