Skip to content

Conversation

@mscarpenter
Copy link

Summary

This PR adds GitHub Codespaces support to the Learning project, making it easier for users to get started without local setup.

Changes

  • ✅ Added .devcontainer/devcontainer.json with Node.js 20 environment
  • ✅ Created .env.example template for API key configuration
  • ✅ Updated .gitignore to allow .env.example while blocking secrets
  • ✅ Added "Quick Start with Codespaces" section to README

Testing

  • Verified devcontainer configuration is valid JSON
  • Confirmed automatic npm install on container creation
  • Tested port forwarding setup for dev server (port 3000)

Resolves #154

- Add .devcontainer configuration
- Create .env.example template
- Update .gitignore and README

Resolves google-gemini#154
@google-cla
Copy link

google-cla bot commented Nov 25, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link

Summary of Changes

Hello @mscarpenter, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the developer experience for the Learning project by integrating GitHub Codespaces. This allows users to launch a fully configured development environment directly in their browser, eliminating the need for complex local setup and streamlining the onboarding process for new contributors or learners.

Highlights

  • GitHub Codespaces Integration: Added full support for GitHub Codespaces, enabling users to quickly set up and run the project without requiring any local environment configuration.
  • Development Container Configuration: Introduced a .devcontainer/devcontainer.json file to define the Codespaces environment, including Node.js 20, Git, GitHub CLI, and automatic npm install.
  • Environment Variable Template: Created an .env.example file to provide a clear template for API key configuration, improving developer onboarding and clarity.
  • README Update: Updated the README.md with a new "Quick Start with Codespaces" section, offering step-by-step instructions for using the new feature.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR adds GitHub Codespaces support, which is a great enhancement for developer onboarding. The changes are well-structured, including the devcontainer configuration, an example environment file, and updated documentation. My review includes a few suggestions to further streamline the Codespaces experience by automating more of the setup process and providing recommended tooling. I've also suggested updates to the README to make launching a Codespace even easier and to align the documentation with the proposed automated setup.

Comment on lines 1 to 20
{
"name": "Gemini Learning - Pedagogical Concept Graph",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"forwardPorts": [
3000
],
"portsAttributes": {
"3000": {
"label": "Learning App",
"onAutoForward": "notify"
}
},
"postCreateCommand": "npm install",
"postStartCommand": "echo '🚀 Ready! Run: npm run dev' && echo '📝 Set GOOGLE_API_KEY in .env.local (copy from .env.example)'",
"remoteUser": "node"
} No newline at end of file

Choose a reason for hiding this comment

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

medium

This is a great start for the devcontainer configuration! To make it even more seamless for developers, you could make a couple of improvements:

  1. Automate .env.local creation: The postStartCommand can be updated to automatically copy .env.example to .env.local if it doesn't exist. This saves the user a manual step.
  2. Add recommended VS Code extensions: Including extensions like ESLint, Prettier, and Tailwind CSS in a customizations block ensures everyone has a consistent and optimized development environment.

Here is a suggested version incorporating these changes.

{
    "name": "Gemini Learning - Pedagogical Concept Graph",
    "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
    "features": {
        "ghcr.io/devcontainers/features/git:1": {},
        "ghcr.io/devcontainers/features/github-cli:1": {}
    },
    "customizations": {
        "vscode": {
            "extensions": [
                "dbaeumer.vscode-eslint",
                "esbenp.prettier-vscode",
                "bradlc.vscode-tailwindcss"
            ]
        }
    },
    "forwardPorts": [
        3000
    ],
    "portsAttributes": {
        "3000": {
            "label": "Learning App",
            "onAutoForward": "notify"
        }
    },
    "postCreateCommand": "npm install",
    "postStartCommand": "if [ ! -f .env.local ]; then cp .env.example .env.local && echo '✅ Created .env.local from .env.example.'; fi && echo '🚀 Ready! Run: npm run dev' && echo '📝 Set GOOGLE_API_KEY in .env.local'",
    "remoteUser": "node"
}

### Prerequisites
### 🚀 Quick Start with GitHub Codespaces

The fastest way to get started is using GitHub Codespaces - no local setup required!

Choose a reason for hiding this comment

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

medium

To make it even easier for users to start a Codespace, you can add an "Open in GitHub Codespaces" badge. This provides a one-click way to launch the environment directly from the README.

Suggested change
The fastest way to get started is using GitHub Codespaces - no local setup required!
The fastest way to get started is using GitHub Codespaces - no local setup required!
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/google-gemini/workshops)

Comment on lines 113 to 114
cp .env.example .env.local
# Edit .env.local and add your GOOGLE_API_KEY from https://aistudio.google.com/app/apikey

Choose a reason for hiding this comment

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

medium

If you adopt the suggestion to automate the creation of .env.local in devcontainer.json, these instructions should be updated to reflect that the user no longer needs to manually copy the file. This will make the setup process even smoother and less error-prone.

Suggested change
cp .env.example .env.local
# Edit .env.local and add your GOOGLE_API_KEY from https://aistudio.google.com/app/apikey
# A .env.local file is automatically created for you when the Codespace starts.
# Edit .env.local and add your GOOGLE_API_KEY from https://aistudio.google.com/app/apikey

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey, @mscarpenter! Can you sign the CLA (see above); so we can merge?

Copy link
Author

Choose a reason for hiding this comment

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

Hi @klutometis! I've signed the CLA and the checks are passing now. Ready for merge!

@jimwhite jimwhite mentioned this pull request Nov 26, 2025
1 task
@jimwhite
Copy link

I have a different PR for this #155 and a FR #154

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.

Make the Learning project (Little PAIPer) runnable using GitHub Codespaces

3 participants