DEV Community

John  Ajera
John Ajera

Posted on

Building a DevContainer Feature for Amazon Q CLI (Inspired by a Kiwi Memory Game)

💡 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": {}
  }
}
Enter fullscreen mode Exit fullscreen mode

That’s it. Rebuild your Dev Container, and you're ready to run:

q help
Enter fullscreen mode Exit fullscreen mode

📅 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.

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

DevCycle image

Ship Faster, Stay Flexible.

DevCycle is the first feature flag platform with OpenFeature built-in to every open source SDK, designed to help developers ship faster while avoiding vendor-lock in.

Start shipping

👋 Kindness is contagious

Explore this insightful write-up, celebrated by our thriving DEV Community. Developers everywhere are invited to contribute and elevate our shared expertise.

A simple "thank you" can brighten someone’s day—leave your appreciation in the comments!

On DEV, knowledge-sharing fuels our progress and strengthens our community ties. Found this useful? A quick thank you to the author makes all the difference.

Okay