feat: initial infra repo
- docker-services: 14 generic compose templates (portainer, npm, vaultwarden, gitea, jotty, nextcloud-aio, rustdesk, audiobookshelf, calibre-web, plex, erugo, jswiki, speedtest, watchtower) - install-scripts: bash scripts for Ubuntu server bootstrap, docker, portainer, npm, backup, restore - ansible: 4 playbooks (bootstrap, deploy-services, update-services, security-hardening) + roles skeleton - hermes-install: Hermes CLI setup on macOS - macos-setup: Brewfile + osx-defaults + fish-config - home-nas-tools: metadata index for NAS projects (no binaries) - docs: architecture, security, contributing - README, LICENSE (MIT), .gitignore
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Instalace Hermes Agent na macOS
|
||||
# - vyžaduje Homebrew a Fish shell
|
||||
# - nainstaluje Hermes CLI
|
||||
# - přidá aliasy do Fish
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "$(uname)" != "Darwin" ]]; then
|
||||
echo "Tento skript je pouze pro macOS" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Kontrola Homebrew
|
||||
if ! command -v brew &>/dev/null; then
|
||||
echo "▶ Instaluji Homebrew..."
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
# Kontrola Fish
|
||||
if ! command -v fish &>/dev/null; then
|
||||
echo "▶ Instaluji Fish..."
|
||||
brew install fish
|
||||
fi
|
||||
|
||||
# Instalace Hermes (přes pip)
|
||||
echo "▶ Instaluji Hermes přes pip..."
|
||||
python3 -m pip install --user hermes-agent
|
||||
|
||||
# Přidání do PATH (pokud není)
|
||||
PIP_BIN="$HOME/Library/Python/3.9/bin"
|
||||
if [[ -d "$PIP_BIN" ]] && [[ ":$PATH:" != *":$PIP_BIN:"* ]]; then
|
||||
cat >> ~/.zshrc <<EOF
|
||||
export PATH="\$HOME/Library/Python/3.9/bin:\$PATH"
|
||||
EOF
|
||||
export PATH="$PIP_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# Ověření
|
||||
if command -v hermes &>/dev/null; then
|
||||
echo "✓ Hermes nainstalován: $(hermes --version)"
|
||||
else
|
||||
echo "⚠ Hermes není v PATH. Přidej ručně: export PATH=\"\$HOME/Library/Python/3.9/bin:\$PATH\""
|
||||
fi
|
||||
|
||||
# Fish alias
|
||||
FISH_CONFIG="$HOME/.config/fish/config.fish"
|
||||
mkdir -p "$(dirname "$FISH_CONFIG")"
|
||||
if ! grep -q "alias hermes=" "$FISH_CONFIG" 2>/dev/null; then
|
||||
cat >> "$FISH_CONFIG" <<'EOF'
|
||||
|
||||
# Hermes Agent
|
||||
alias h='hermes'
|
||||
alias hchat='hermes chat'
|
||||
alias hgit='hermes git'
|
||||
alias hd='hermes docker'
|
||||
EOF
|
||||
echo "✓ Fish aliasy přidány"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "🎉 Hotovo! Nastav API klíč:"
|
||||
echo " security add-generic-password -s hermes:api -a user -w <klíč> -U"
|
||||
echo " hermes config set api-key <klíč>"
|
||||
Reference in New Issue
Block a user