This repository provides dev container Features for installing AI coding assistants in your development containers.
- Goose: Install the Goose AI coding assistant from Block in your dev container
- Gemini CLI: Install the Google Gemini CLI for AI-powered development
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/mikegehard/ai-assistants-devcontainers-feature/gemini-cli:1.0": {}
},
"runArgs": ["--env-file",".env"]
}{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/mikegehard/ai-assistants-devcontainers-feature/goose:1.0": {},
"ghcr.io/mikegehard/ai-assistants-devcontainers-feature/gemini-cli:1.0": {}
},
"runArgs": ["--env-file",".env"]
}For Goose to function properly, you'll need to set up API keys. The recommended approach is to use .env files:
- Create a
.envfile in your project root or in the location specified by your Goose configuration - Use the provided
.env.examplefile as a reference:ANTHROPIC_API_KEY=your_anthropic_api_key_here GOOGLE_API_KEY=your_gemini_api_key_here - Copy
.env.exampleto.envand add your actual API keys - Ensure your
.envfile is added to.gitignoreto prevent accidentally committing sensitive information
For the Gemini CLI to work, you'll need to configure your Google AI API key:
- Get your API key from Google AI Studio
- Set it as an environment variable:
GEMINI_API_KEY=your_gemini_api_key_here - Add this to your
.envfile or set it in your dev container environment
- The
goosefeature doesn't currently take any options - The
gemini-clifeature doesn't currently take any options
.
├── src
│ ├── goose # Goose Feature
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
│ └── gemini # Gemini CLI Feature
│ ├── devcontainer-feature.json
│ └── install.sh
└── test # Tests for the Features
├── goose
│ ├── test.json
│ └── test.sh
└── gemini
├── test.json
└── test.sh
To test the feature, use the Dev Container CLI:
devcontainer features testThis will build test containers with both features installed and run the tests defined in test/goose/test.sh and test/gemini/test.sh.
To publish a new version of this feature:
- Update the code as needed and test locally
- Update the version in the appropriate feature's
devcontainer-feature.jsonfile (src/goose/devcontainer-feature.jsonorsrc/gemini/devcontainer-feature.json) - Commit your changes and push to the main branch
- Create and push a new version tag:
git tag v1.0.0 # Replace with your version git push origin v1.0.0 - The GitHub Actions workflow will automatically:
- Run all tests on multiple base images
- Publish the feature to GitHub Container Registry if tests pass
- Generate updated documentation and create a PR
After the release is published, users can install the feature using the reference in their devcontainer.json file.
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b my-new-feature - Make your changes
- Test your changes:
devcontainer features test(tests both features) ordevcontainer features test -f goose/devcontainer features test -f geminifor individual features - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
To build and test your feature in another project before publishing:
- Create a tarball of your feature:
This creates a tarball in the
devcontainer features package -f -o ./output ./src
./outputdirectory.
This approach allows you to test your feature changes in real projects before publishing a new version.
This project is licensed under the MIT License - see the LICENSE file for details.
- Block for creating the Goose AI coding assistant
- Google for creating the Gemini CLI
- Dev Containers for the dev container specification
{ "name": "My Dev Container", "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "ghcr.io/mikegehard/ai-assistants-devcontainers-feature/goose:1.0": {} }, "runArgs": ["--env-file",".env"] }