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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

&& sdk flush archives \
&& sdk flush temp \
&& mkdir /root/.m2 \
Expand All @@ -320,7 +320,7 @@ RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh |
&& bash -c ". $HOME/.nvm/nvm.sh \
&& nvm install v${NODE_VERSION} \
&& nvm alias default v${NODE_VERSION} \
&& npm install -g typescript yarn pnpm node-gyp"
&& npm install -g typescript yarn pnpm node-gyp @anthropic-ai/claude-code"

ENV PATH=$PATH:/root/.aws-iam:/root/.terraform:/workspace/bin

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/delete-preview/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/actions/deploy-gitpod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/actions/deploy-monitoring-satellite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion .github/actions/preview-create/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
steps:
- uses: actions/checkout@v4
- name: Setup Environment
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
ports:
- 6379:6379
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
env:
DB_HOST: "mysql"
DB_PORT: "23306"
Expand Down Expand Up @@ -521,7 +521,7 @@ jobs:
- create-runner
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
if: needs.configuration.outputs.with_integration_tests != '' && needs.configuration.outputs.is_scheduled_run != 'true'
concurrency:
group: ${{ needs.configuration.outputs.preview_name }}-integration-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-environment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ide-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
outputs:
name: ${{ steps.configuration.outputs.name }}
version: ${{ steps.configuration.outputs.version }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
needs: [configuration, infrastructure, create-runner]
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
volumes:
- /var/tmp:/var/tmp
- /tmp:/tmp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jetbrains-auto-update-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
update-jetbrains:
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
needs: [ create-runner ]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jetbrains-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
jetbrains-smoke-test-linux:
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-env-check-regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
if: ${{ needs.configuration.outputs.skip == 'false' }}
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
volumes:
- /var/tmp:/var/tmp
- /tmp:/tmp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-env-gc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
outputs:
names: ${{ steps.set-matrix.outputs.names }}
count: ${{ steps.set-matrix.outputs.count }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workspace-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
outputs:
name: ${{ steps.configuration.outputs.name }}
version: ${{ steps.configuration.outputs.version }}
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
needs: [configuration, infrastructure, create-runner]
runs-on: ${{ needs.create-runner.outputs.label }}
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
steps:
- uses: actions/checkout@v4
- name: Integration Test
Expand Down
9 changes: 8 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
workspaceLocation: gitpod/gitpod-ws.code-workspace
checkoutLocation: gitpod
ports:
Expand Down Expand Up @@ -80,6 +80,13 @@ tasks:
init: |
./components/gitpod-protocol/go/scripts/generate-config.sh
leeway exec --filter-type go -v -- go mod verify
- name: claude code
command: |
if [[ -z "${CLAUDE_JSON}" ]]; then
echo "Skipping setup for Claude Code. Setup a CLAUDE_JSON variable to reuse Claude Code in workspaces."
else
echo $CLAUDE_JSON > ~/.claude.json
fi
vscode:
extensions:
- EditorConfig.EditorConfig
Expand Down
47 changes: 47 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Claude Context for Gitpod

This file provides essential context for AI assistants working on the Gitpod codebase.

## Project Overview

Gitpod is a cloud development environment platform that provides automated, ready-to-code development environments for any Git repository. The platform consists of multiple interconnected services and components that work together to deliver seamless developer experiences.

## Memory Bank Structure

This repository maintains comprehensive documentation in the `memory-bank/` directory:

### Core Documentation
- **[Project Brief](memory-bank/projectbrief.md)** - Foundation document defining core requirements and goals
- **[Product Context](memory-bank/productContext.md)** - Why this project exists and problems it solves
- **[System Patterns](memory-bank/systemPatterns.md)** - System architecture and key technical decisions
- **[Tech Context](memory-bank/techContext.md)** - Technologies used and development setup
- **[Active Context](memory-bank/activeContext.md)** - Current work focus and recent changes
- **[Progress](memory-bank/progress.md)** - What works, what's left to build, and current status

### Component Documentation
The `memory-bank/components/` directory contains detailed documentation for each service and component in the Gitpod platform. Start with **[components.md](memory-bank/components.md)** for an overview.

## Working with This Codebase

1. **Start by reading the memory bank** - Always begin by reviewing the core documentation files above to understand the current state and context
2. **Component-specific work** - Refer to the relevant component documentation in `memory-bank/components/`
3. **Architecture decisions** - Check `memory-bank/systemPatterns.md` for established patterns and conventions
4. **Current focus** - Review `memory-bank/activeContext.md` for ongoing work and priorities

## Key Characteristics

- **Multi-service architecture** - Gitpod consists of dozens of interconnected services
- **Kubernetes-native** - Designed to run on Kubernetes with cloud-native patterns
- **Developer experience focus** - Every decision prioritizes developer productivity and experience
- **Workspace lifecycle management** - Complex orchestration of development environments
- **Security and isolation** - Strong emphasis on secure, isolated development environments

## Important Notes

- This is a production system serving thousands of developers
- Changes should be thoroughly tested and follow established patterns
- Security considerations are paramount given the multi-tenant nature
- Performance and scalability are critical concerns
- The codebase spans multiple languages (Go, TypeScript, Java) and technologies

Always refer to the memory bank documentation for the most current and detailed information about any aspect of the system.
4 changes: 2 additions & 2 deletions dev/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM gitpod/workspace-gitpod-dev:latest

ENV TRIGGER_REBUILD 42
ENV TRIGGER_REBUILD 43

USER root

Expand Down Expand Up @@ -127,7 +127,7 @@ USER gitpod
ARG GITPOD_NODE_VERSION=22.15.1
RUN bash -c ". .nvm/nvm.sh \
&& nvm install $GITPOD_NODE_VERSION \
&& npm install -g typescript yarn"
&& npm install -g typescript yarn @anthropic-ai/claude-code"
ENV PATH=/home/gitpod/.nvm/versions/node/v${GITPOD_NODE_VERSION}/bin:$PATH

## Register leeway autocompletion in bashrc
Expand Down
Loading