-
Notifications
You must be signed in to change notification settings - Fork 139
Small changes to make dev / test work in Claude Code Web #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b5349cf
Add environment setup instructions for web/cloud sessions
claude a744365
Use CLAUDE_CODE_REMOTE env var to detect web sessions
claude aa45335
working setup for Claude Code Web
Soph fe56a33
working handling of mise paths
Soph 5484ef6
more robust gpg signing disable
Soph 0b5df29
disable for test commits too
Soph dc58c0b
Merge branch 'main' into claude/setup-dns-mise-xqmU7
gtrrz-victor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/bin/bash | ||
| # Remote environment setup for Claude Code web sessions | ||
| # This script configures DNS and installs mise in cloud containers | ||
|
|
||
| set -e | ||
|
|
||
| # Only run in remote (web/cloud) environments | ||
| if [ "$CLAUDE_CODE_REMOTE" != "true" ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Setting up remote environment..." | ||
|
|
||
| # 1. Configure DNS (required in web containers) | ||
| echo "Configuring DNS..." | ||
| echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null | ||
Soph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
Soph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # 2. Install mise if not already installed | ||
| if ! command -v mise &> /dev/null; then | ||
| echo "Installing mise..." | ||
| curl -fsSL https://mise.run | sh | ||
Soph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Add mise to PATH for this script | ||
| export PATH="$HOME/.local/bin:$PATH" | ||
| fi | ||
Soph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # 3. Trust mise config and install tools | ||
| echo "Installing project tools..." | ||
| cd "$CLAUDE_PROJECT_DIR" | ||
| mise trust | ||
| mise install | ||
Soph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
Soph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # 4. Persist mise activation for subsequent commands | ||
| # Capture environment changes from mise activation and write exports to CLAUDE_ENV_FILE | ||
| if [ -n "$CLAUDE_ENV_FILE" ]; then | ||
| echo "Persisting mise environment..." | ||
| # Capture exports before and after mise activation, then write only the diff | ||
| ENV_BEFORE=$(export -p | sort) | ||
| eval "$(mise activate bash)" | ||
| ENV_AFTER=$(export -p | sort) | ||
| comm -13 <(echo "$ENV_BEFORE") <(echo "$ENV_AFTER") >> "$CLAUDE_ENV_FILE" | ||
| fi | ||
|
|
||
| echo "Remote environment setup complete!" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.