Skip to content

Commit bd1ce11

Browse files
authored
chore: add config for claude code on web (supabase#42044)
To use Claude Code on web, we need the LLM to have access to dependencies. This creates a install_pkgs.sh script that runs `pnpm install` only in the Claude Code remove environment.
1 parent db6ef58 commit bd1ce11

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.claude/scripts/install_pkgs.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if [ "$CLAUDE_CODE_REMOTE" != "true" ]; then
4+
exit 0
5+
fi
6+
7+
pnpm install

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"matcher": "startup",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/scripts/install_pkgs.sh"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ next-env.d.ts
117117
.vercel
118118

119119
# AI assistant local files
120-
.claude/
120+
.claude/*
121+
!.claude/settings.json
122+
!.claude/scripts/
121123
CLAUDE.md
122124

123125
#include template .env file for docker-compose
@@ -149,4 +151,4 @@ gcloud.json
149151
# Sentry CLI config
150152
**/.sentryclirc
151153

152-
keys.json
154+
keys.json

0 commit comments

Comments
 (0)