-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclaude-code.sh
More file actions
executable file
·34 lines (26 loc) · 1.1 KB
/
Copy pathclaude-code.sh
File metadata and controls
executable file
·34 lines (26 loc) · 1.1 KB
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
29
30
31
32
33
34
#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/env.sh"
# HOST_HOME is set by env.sh (auto-detected from agent-box parent directory)
echo "[claude] start"
# Download installer
curl -L --progress-bar --connect-timeout 10 --max-time 300 --retry 3 \
-o /tmp/claude-install.sh https://claude.ai/install.sh
echo "[claude] downloaded"
# Run installer with logging
timeout 300 bash -x /tmp/claude-install.sh 2>&1 | tee /tmp/claude-install.log
# Ensure PATH for current shell and future shells
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
# Claude initialization / config linking
echo "[claude] finished"
# Install Codex CLI (pinned to 0.132.0 — newer breaks AMD Gateway)
if ! command -v codex >/dev/null 2>&1; then
echo "[codex] Installing @openai/codex@0.132.0..."
npm install -g @openai/codex@0.132.0 2>&1 | tail -1
echo "[codex] finished"
else
echo "[codex] already installed ($(codex --version 2>/dev/null))"
fi
# Configure Codex for the AMD Gateway and default GPT-5.6 Sol model.
"${SCRIPT_DIR}/codex-key.sh"