๐ก Building a DevContainer Feature for Amazon Q CLI (Inspired by a Kiwi Memory Game)
While experimenting with Amazon Q CLI, I stumbled upon a small but persistent friction point: getting it installed in a Dev Container every time.
So I solved it.
This is the story of building a memory game with Amazon Q, the packaging challenge I ran into, and how I solved it with a custom Dev Container Feature published on GitHub Container Registry (GHCR).
๐ฎ The Project: Q Kiwi Memory Game
I wanted to test how far I could go using Amazon Q CLI as a pair programmer. So I started a fun little repo called:
๐ q-kiwi-memory-game
It's a simple memory game powered by HTML/JS, designed with a clean goal: build entirely with Q CLI prompting.
I used the CLI to generate functions, refactor layout, and even tune CSS. The experience was surprisingly smoothโฆ but only after I sorted out the environment.
๐ The Problem: Reinstalling Q CLI Every Time
Amazon Q CLI isn't bundled in standard containers or features. And since Dev Containers are ephemeral or rebuilt often, I kept hitting the same pain:
โWhy do I have to install Amazon Q CLI manually every single time?โ
This broke flow. And since I love DevContainers for isolated development, I needed a better way.
โจ The Solution: DevContainer Feature for Amazon Q CLI
So I built this:
๐ ghcr.io/jajera/features/amazon-q-cli:1
This is a Dev Container Feature that installs the Amazon Q CLI into your environment, automatically.
You just reference it in your .devcontainer.json
:
{
"name": "With Amazon Q CLI",
"features": {
"ghcr.io/jajera/features/amazon-q-cli:1": {}
}
}
Thatโs it. Rebuild your Dev Container, and you're ready to run:
q help
๐
No more curl && tar && sudo mv
.
๐ง Under the Hood
The feature is built using the containers.dev feature spec, packaged and published via GHCR.
Repo: github.com/jajera/features
Image: ghcr.io/jajera/features/amazon-q-cli
The install script handles downloading the latest version of Q CLI from AWS, sets it in your path, and ensures it's ready for use as soon as your container starts.
๐งฌ Why This Matters
If you're experimenting with AI coding tools like Amazon Q CLI, you want your setup to be frictionless. This makes it:
- โ Easy to onboard
- โ Reproducible for teams
- โ Quick to rebuild without reinstall hell
Combine it with GitHub Codespaces or VS Code Remote Containers, and youโve got a ready-to-code AI-enhanced playground in seconds.
๐ Final Thoughts
Packaging up the Amazon Q CLI as a DevContainer feature wasn't just a convenienceโit's the kind of developer quality-of-life improvement that keeps flow going.
If you're building with Amazon Q or just want a smooth setup experience, I hope this helps.
๐ Game on.
๐ Happy building.
Top comments (0)