-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_claude_code.cgr
More file actions
26 lines (20 loc) · 1.07 KB
/
install_claude_code.cgr
File metadata and controls
26 lines (20 loc) · 1.07 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
--- Install Claude Code ---
using apt/install_package
target "local" local:
[install Claude Code prerequisites] from apt/install_package:
name = "curl"
[install Claude Code] timeout 5m, retry 1x wait 10s:
first [install Claude Code prerequisites]
skip if $ command -v claude >/dev/null 2>&1 || [ -x "$HOME/.local/bin/claude" ]
run $ curl -fsSL https://claude.ai/install.sh | bash
[add Claude Code to PATH] timeout 1m:
first [install Claude Code]
skip if $ grep -Fqx 'export PATH="$HOME/.local/bin:$PATH"' "$HOME/.bashrc"
run $ printf '\nexport PATH="$HOME/.local/bin:$PATH"\n' >> "$HOME/.bashrc"
[update Claude Code] timeout 5m, retry 1x wait 10s:
first [install Claude Code], [add Claude Code to PATH]
skip if $ ! command -v claude >/dev/null 2>&1 && [ ! -x "$HOME/.local/bin/claude" ]
run $ export PATH="$HOME/.local/bin:$PATH" && claude update
verify "claude available":
first [install Claude Code], [update Claude Code], [add Claude Code to PATH]
run $ export PATH="$HOME/.local/bin:$PATH" && command -v claude && claude --version