From cba3430395f731611a0d8df94e19072a7a64bc56 Mon Sep 17 00:00:00 2001 From: saifuddin Date: Mon, 22 Jun 2026 10:55:45 +0000 Subject: [PATCH] Update install.sh --- install.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/install.sh b/install.sh index 494238e..3e2ca6a 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,6 @@ YELLOW='\033[1;33m' RESET='\033[0m' SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -HERMES_AGENT_DIR="$HOME/.hermes/hermes-agent" PATCHES_DIR="$HOME/.hermes/patches" MARKER="# hermes-claude-auth managed" @@ -62,34 +61,6 @@ fi chmod 644 "$SITECUSTOMIZE" printf "${GREEN}[✓] Installed hook into %s${RESET}\n" "$SITECUSTOMIZE" -# macOS: hermes-agent reads Claude subscription credentials from -# ~/.claude/.credentials.json, but Claude Code on macOS stores them in -# Keychain only. Mirror the Keychain entry into the file so auth works -# out of the box. No-op on Linux (Claude Code writes the file directly). -if [ "$(uname -s)" = "Darwin" ]; then - CRED_FILE="$HOME/.claude/.credentials.json" - if KEYCHAIN_CRED="$(security find-generic-password -s 'Claude Code-credentials' -w 2>/dev/null)"; then - mkdir -p "$(dirname "$CRED_FILE")" - if [ ! -f "$CRED_FILE" ] || [ "$(cat "$CRED_FILE" 2>/dev/null)" != "$KEYCHAIN_CRED" ]; then - printf '%s' "$KEYCHAIN_CRED" > "$CRED_FILE" - chmod 600 "$CRED_FILE" - printf "${GREEN}[✓] Mirrored Claude Code credentials from Keychain → %s${RESET}\n" "$CRED_FILE" - else - printf "${GREEN}[✓] Claude Code credentials file already matches Keychain${RESET}\n" - fi - elif [ ! -f "$CRED_FILE" ]; then - printf "${YELLOW}[!] macOS detected but no 'Claude Code-credentials' Keychain entry found${RESET}\n" - printf " Run: claude auth login --claudeai\n" - fi -fi - -if systemctl --user is-active hermes-gateway.service >/dev/null 2>&1; then - systemctl --user restart hermes-gateway.service - printf "${GREEN}[✓] Restarted hermes-gateway.service${RESET}\n" -else - printf "${YELLOW}[!] hermes-gateway not running — restart manually when ready${RESET}\n" -fi - printf "\n${GREEN}Installation complete.${RESET}\n" printf " Patch: %s/anthropic_billing_bypass.py\n" "$PATCHES_DIR" printf " Hook: %s\n" "$SITECUSTOMIZE"