diff --git a/README.md b/README.md index b3f3b32..67c9809 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,23 @@ ai.example.com { ## Client Configuration +### Finding Your Auth Token + +The proxy auth token is the `authToken` value in `config.json` on the server where the proxy runs. To retrieve it: + +```bash +ssh mini-server "node -e \"console.log(JSON.parse(require('fs').readFileSync('/home/harrison/ai-proxy/config.json','utf-8')).authToken)\"" +``` + +Or just SSH in and read the file directly: + +```bash +ssh mini-server +cat ~/ai-proxy/config.json | grep authToken +``` + +This is the token you'll use in all client configurations below. + ### Claude Code CLI Add to `~/.claude/settings.json`: diff --git a/deploy.sh b/deploy.sh index 7a519fe..3abd4ec 100755 --- a/deploy.sh +++ b/deploy.sh @@ -25,7 +25,7 @@ if [ ! -f "$PROXY_DIR/config.json" ]; then exit 1 fi -echo "[1/5] Config found." +echo "[1/4] Config found." # --- Step 2: Generate auth token if still default --- AUTH_TOKEN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$PROXY_DIR/config.json','utf-8')).authToken)") @@ -40,10 +40,10 @@ if [ "$AUTH_TOKEN" = "CHANGE_ME_TO_A_LONG_RANDOM_STRING" ]; then exit 1 fi -echo "[2/5] Auth token is set." +echo "[2/4] Auth token is set." # --- Step 3: Test the proxy locally --- -echo "[3/5] Testing proxy startup..." +echo "[3/4] Testing proxy startup..." source "$HOME/.nvm/nvm.sh" timeout 5 node "$PROXY_DIR/proxy.mjs" & PROXY_PID=$! @@ -66,7 +66,7 @@ else fi # --- Step 4: Install systemd service --- -echo "[4/5] Installing systemd service..." +echo "[4/4] Installing systemd service..." sudo cp "$PROXY_DIR/$SERVICE_NAME.service" "/etc/systemd/system/$SERVICE_NAME.service" sudo systemctl daemon-reload sudo systemctl enable "$SERVICE_NAME"