Skip to content

Add Claude Code for Gitpod and Gitpod Classic #20892

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 6 commits into from
Jun 11, 2025
Merged

Conversation

kylos101
Copy link
Contributor

@kylos101 kylos101 commented Jun 10, 2025

Description

Add support for Claude Code in this repo for Gitpod Classic and Gitpod.

Related Issue(s)

n/a

How to test

  1. If you've never used claude, run it once, that'll generate a configuration file at ~/.claude.json
  2. Copy the configuration file to Gitpod Classic and Gitpod as a variable and secret file, respectively.
    • ℹ️ Before you copy, empty the history and cachedChangelog fields to reduce length (Gitpod is limited to 4096)
    • For Gitpod Classic, create a User Variable called CLAUDE_JSON, and paste the file contents
    • For Gitpod, create a File Secret called CLAUDE_JSON, with a location of /root/.claude.json
  3. Run a Gitpod Classic workspace from this PR, and then try using Claude, it should just work (a task configures Claude on workspace start to use the variable)
  4. Run a Gitpod environment from this PR, and then try using Claude, it should just work (assuming you setup the File secret correctly, Gitpod will persist the secret file here for you)

Test results

image

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@roboquat roboquat added size/L and removed size/M labels Jun 10, 2025
maven 3.9.9 is no longer available

Bump java to have parity with workspace-images
Copy link
Contributor

⚠️ Hey reviewer! BE CAREFUL ⚠️
Review the code before opening in your Gitpod. .gitpod.yml was changed and it might be harmful.

RUN curl -fsSL "https://get.sdkman.io" | bash \
&& bash -c ". /root/.sdkman/bin/sdkman-init.sh \
&& sed -i 's/sdkman_selfupdate_enable=true/sdkman_selfupdate_enable=false/g' /root/.sdkman/etc/config \
&& sed -i 's/sdkman_selfupdate_feature=true/sdkman_selfupdate_feature=false/g' /root/.sdkman/etc/config \
&& sdk install java ${JAVA_VERSION} \
&& sdk default java ${JAVA_VERSION} \
&& sdk install gradle \
&& sdk install maven \
&& sdk install maven 3.9.10 \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devcontainer image build failed otherwise

@@ -293,15 +293,15 @@ RUN mkdir -p ~/.terraform \
&& printf "terraform -install-autocomplete 2> /dev/null\n" >>~/.bashrc

## Java
ENV JAVA_VERSION=11.0.23.fx-zulu
ENV JAVA_VERSION=11.0.27.fx-zulu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump to have parity with workspace-images

@roboquat roboquat merged commit 748e1f7 into main Jun 11, 2025
36 checks passed
@roboquat roboquat deleted the kylos101/add-claude-code branch June 11, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants