Skip to content

Commit f7e96b9

Browse files
chore(devenv): Skip claude onboarding in dev container (#834)
1 parent ad7262b commit f7e96b9

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.devcontainer/scripts/post-create.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ cd /workspaces/sourcebot
1010

1111
# 1. Initialize git submodules (in case initializeCommand didn't run)
1212
echo ""
13-
echo "[1/4] Initializing git submodules..."
13+
echo "[1/5] Initializing git submodules..."
1414
git submodule update --init --recursive
1515

1616
# 2. Build Zoekt and install dependencies (uses Makefile)
1717
echo ""
18-
echo "[2/4] Building Zoekt and installing dependencies..."
18+
echo "[2/5] Building Zoekt and installing dependencies..."
1919
make
2020

2121
echo ""
22-
echo "[3/4] Running database migrations..."
22+
echo "[3/5] Running database migrations..."
2323
yarn dev:prisma:migrate:dev
2424

2525
echo ""
26-
echo "[4/4] Creating default config.json..."
26+
echo "[4/5] Creating default config.json..."
2727
cat > config.json << 'EOF'
2828
{
2929
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
@@ -36,6 +36,21 @@ cat > config.json << 'EOF'
3636
}
3737
EOF
3838

39+
echo ""
40+
echo "[5/5] Configuring Claude Code to skip onboarding..."
41+
# Create or update ~/.claude.json to skip onboarding
42+
if [ -f ~/.claude.json ]; then
43+
# Update existing file
44+
node -e "const fs=require('fs');const cfg=JSON.parse(fs.readFileSync('$HOME/.claude.json','utf8'));cfg.hasCompletedOnboarding=true;fs.writeFileSync('$HOME/.claude.json',JSON.stringify(cfg,null,2));"
45+
else
46+
# Create minimal config with onboarding skipped
47+
cat > ~/.claude.json << 'EOF'
48+
{
49+
"hasCompletedOnboarding": true
50+
}
51+
EOF
52+
fi
53+
3954
echo ""
4055
echo "=========================================="
4156
echo "Post-create setup complete!"

0 commit comments

Comments
 (0)