Skip to content

Add Claude Code and Gemini CLI to Workbench apps#342

Open
michaelxiao7 wants to merge 1 commit intoverily-src:masterfrom
michaelxiao7:vscode-ai
Open

Add Claude Code and Gemini CLI to Workbench apps#342
michaelxiao7 wants to merge 1 commit intoverily-src:masterfrom
michaelxiao7:vscode-ai

Conversation

@michaelxiao7
Copy link

@michaelxiao7 michaelxiao7 commented Mar 19, 2026

  • Create gemini-cli devcontainer feature
  • Add Claude Code and Gemini CLI to VSCode, RStudio, JupyterLab, NeMo Jupyter and Parabricks Jupyter
  • Install AI extensions (Claude Code, Gemini) in VSCode app

PHP-135615

@michaelxiao7 michaelxiao7 self-assigned this Mar 19, 2026
@michaelxiao7 michaelxiao7 requested review from a team as code owners March 19, 2026 20:14
@michaelxiao7 michaelxiao7 force-pushed the vscode-ai branch 2 times, most recently from 198123d to 167386b Compare March 19, 2026 21:40
…upyter and Parabricks Jupyter. Install AI extensions (Claude Code, Gemini) in VSCode app
@michaelxiao7 michaelxiao7 changed the title Add AI code assistants and Cursor IDE app Add Claude Code and Gemini CLI to Workbench apps Mar 19, 2026

# Wrap gcloud to unset DISPLAY per-invocation so auth commands don't try
# to open a browser via X11 in headless devcontainer environments.
printf 'function gcloud() { DISPLAY= command gcloud "$@"; }\n'
Copy link
Contributor

Choose a reason for hiding this comment

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

could these env variables be set and exported rather than wrapping the commands? I wouldn't think they would cause issues with other commands?


# Wrap gemini to set NO_BROWSER=1 per-invocation to force device code flow
# instead of opening a browser window.
printf 'function gemini() { NO_BROWSER=1 NO_COLOR=1 command gemini "$@"; }\n'
Copy link
Contributor

Choose a reason for hiding this comment

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

why NO_COLOR?

@@ -0,0 +1,74 @@
#!/usr/bin/env bash
set -eu
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

chown -R "${username}:" "${nvm_dir}"
fi

# Fix npm cache: npm install -g as root creates root-owned files in user's ~/.npm
Copy link
Contributor

Choose a reason for hiding this comment

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

what if you installed it as the user?
sudo -u "${username}" npm ...


# Gemini: https://open-vsx.org/extension/Google/geminicodeassist
# Claude: https://open-vsx.org/extension/Anthropic/claude-code
RUN GEMINI_VERSION=$(curl -fsSL "https://open-vsx.org/api/Google/geminicodeassist/latest" | grep -o '"version":"[^"]*"' | head -1 | cut -d'"' -f4) && \
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use jq here instead of grep/head/cut?

We can even get the full download url with curl ... | jq -r '.files.download'


# Gemini: https://open-vsx.org/extension/Google/geminicodeassist
# Claude: https://open-vsx.org/extension/Anthropic/claude-code
RUN GEMINI_VERSION=$(curl -fsSL "https://open-vsx.org/api/Google/geminicodeassist/latest" | grep -o '"version":"[^"]*"' | head -1 | cut -d'"' -f4) && \
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I recently learned in Dockerfiles it's preferred to have the && at the beginning of the line rather than the end. Also could you indent continuations of commands to distinguish them a bit more?

    && curl ... \
        ... \
        -o ... \
    && CLAUDE_VERSION=...

Comment on lines +24 to +27
"ghcr.io/devcontainers/features/node": {
"version": "24.11.0"
},
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
Copy link
Contributor

Choose a reason for hiding this comment

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

can we pin these features to a hash and add them to https://github.com/verily-src/workbench-app-devcontainers/blob/master/feature-versions/state.json so they can be auto-updated?

# Edge case: Disable auto-update to prevent gemini from trying to re-exec
# itself on first run, which fails on freshly provisioned machines.
mkdir -p "${user_home}/.gemini"
printf '{"general.enableAutoUpdate": false}\n' > "${user_home}/.gemini/settings.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

did this fix that freezing issue you showed me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants