-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcheck-setup.sh
More file actions
executable file
·73 lines (63 loc) · 1.84 KB
/
check-setup.sh
File metadata and controls
executable file
·73 lines (63 loc) · 1.84 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (c) 2026 Marcus Krueger
# Verify CodeForge setup is working correctly
# Run anytime with: check-setup
echo "CodeForge Setup Check"
echo "━━━━━━━━━━━━━━━━━━━━"
PASS=0
FAIL=0
WARN=0
check() {
local label="$1" cmd="$2"
if eval "$cmd" >/dev/null 2>&1; then
printf " ✓ %s\n" "$label"
PASS=$((PASS + 1))
else
printf " ✗ %s\n" "$label"
FAIL=$((FAIL + 1))
fi
}
warn_check() {
local label="$1" cmd="$2"
if eval "$cmd" >/dev/null 2>&1; then
printf " ✓ %s\n" "$label"
PASS=$((PASS + 1))
else
printf " ⚠ %s\n" "$label"
WARN=$((WARN + 1))
fi
}
echo ""
echo "Core:"
check "Claude Code installed" "command -v claude"
warn_check "Claude native binary" "[ -x ~/.local/bin/claude ]"
check "cc alias configured" "grep -q 'alias cc=' ~/.bashrc 2>/dev/null || grep -q 'alias cc=' ~/.zshrc 2>/dev/null"
check "Config directory exists" "[ -d '${CLAUDE_CONFIG_DIR:-$HOME/.claude}' ]"
check "Settings file exists" "[ -f '${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json' ]"
echo ""
echo "Authentication:"
warn_check "GitHub CLI authenticated" "gh auth status"
warn_check "Git user configured" "git config --global user.name"
echo ""
echo "Tools:"
check "Node.js" "command -v node"
check "Python" "command -v python3"
check "uv" "command -v uv"
warn_check "Go" "command -v go"
warn_check "Bun" "command -v bun"
warn_check "Docker" "command -v docker"
echo ""
echo "Development:"
warn_check "biome" "command -v biome"
warn_check "ruff" "command -v ruff"
warn_check "ast-grep" "command -v ast-grep"
warn_check "tmux" "command -v tmux"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━"
echo " $PASS passed, $FAIL failed, $WARN warnings"
if [ $FAIL -gt 0 ]; then
echo ""
echo " Run 'cc-tools' for detailed version info."
exit 1
fi