Skip to content

Commit cf05322

Browse files
committed
Install Claude Code setup key from File Secret
1 parent f95417f commit cf05322

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ RUN bash -c 'set -euo pipefail && \
88
tar -xzf /tmp/leeway.tar.gz -C /tmp && \
99
install -m 755 /tmp/leeway /usr/local/bin/ && \
1010
rm /tmp/leeway.tar.gz /tmp/leeway'
11+
12+
# Install claude-code globally
13+
RUN npm i -g @anthropic-ai/claude-code

.gitpod/automations.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,13 @@ tasks:
4646
- install-deps
4747
triggeredBy:
4848
- manual
49+
50+
setup-claude-code-key:
51+
name: Key for Claude Code
52+
command: |
53+
[ -f /opt/.anthropic_key.sh ] && {
54+
install -D -m 755 /opt/.anthropic_key.sh ~/.claude/.anthropic_key.sh
55+
result=$(cat ~/.claude/settings.json 2>/dev/null || echo "{}" | jq '.apiKeyHelper = "~/.claude/.anthropic_key.sh"') && echo "$result" > ~/.claude/settings.json || true
56+
} || true
57+
triggeredBy:
58+
- postEnvironmentStart

0 commit comments

Comments
 (0)