gh_q is a sample GitHub Command Line extension written in Go. It really can't do much. The point is that it will be able to do what ever you fantazie it should do. This tutorial will show you how to setup a repository with everything you need to start passing spec on to an agentic AI bot, and enable you to have a collaborative spec-driven workflow, where the bot does the heavy lifting and you stay in control
- Prepare your PC to run Docker and VS Code
- Create workspace file
- Setup a basic dev container (
.devcontainers/devcontainer.json) - Setup basic – always on – linters (
cspell,Markdownlint-cli2,prettier) - Setup git (
.gitignore,.gitconfig, and githooks ) - Setup TakTto support a Trunk-Based, Pull-Request free workflow (devx-cafe/gh-tt,
wrapup.yml,ready.yml,release.yml) - Setup Coilot (
copilot-instructions.md,.github.instructions/*.instructions.md) - Setup a flow that makes Copilot's Pull-Request centric work process compliant with your trunk-based PR-free flow
- Add a bare-minimum go cmd line project
- Optimize your flow with home-made parameter driven reusable actions
When you open a folder (repo) in VS Code and a Devcontainer is recognized in.devcontainers/**/devcontainer.json
then it will offer you to reopen the IDE in that container
Tip
Clone in container is generally prepared over Clone in volume. It gives you far better flexibility (which we will exploit later) and the performance difference is generally not worth mentioning. [!NOTE] You need your PC (host) to support
- git
- VS Code
- Docker (Docker Desktop)
Create a simple executable script that can setup a PC to support using
Devcontainers in VS Code – including git. Favor standard package managers
like 'choco', 'winget', 'brew', 'app-get' or what ever is relevant dependent
on the OS. Install them first if they are't installed already. If required
packages aren't available fall back to 'curl' to download installers and run
them. If your OS is windows; when you install Docker prioritized to install
WSL over Hyper-V. and install Ubuntu (latest) on WSL.
Resources:
Prompt:
I threw the following prompt to Gemini
Show the commands for installing:
- docker desktop (WSL+Ubuntu)
- VS Code
On a windows computer. Assume that I don't have WSL installed at forehand.
Perhaps come up with small *ps script
Gemini's suggestion (...spoiler alert)
[!CAUTION] This is script is never tested! Review and understand before you run it! It's likely that you can do better yourself!
# 1. Install WSL and Ubuntu (Requires Reboot)
Write-Host "Checking for WSL..." -ForegroundColor Cyan
if (!(Get-Command wsl -ErrorAction SilentlyContinue)) {
Write-Host "Installing WSL and Ubuntu..." -ForegroundColor Yellow
# This enables WSL features and installs Ubuntu by default
wsl --install
Write-Host "REBOOT REQUIRED. Please restart your computer and run this script again." -ForegroundColor Red
return
}
# 2. Install VS Code and Docker Desktop using winget
Write-Host "Installing Development Tools..." -ForegroundColor Cyan
$apps = @(
@{ id = "Microsoft.VisualStudioCode"; name = "VS Code" },
@{ id = "Docker.DockerDesktop"; name = "Docker Desktop" }
)
foreach ($app in $apps) {
Write-Host "Installing $($app.name)..." -ForegroundColor Yellow
winget install --id $($app.id) --silent --accept-package-agreements --accept-source-agreements
}
Write-Host "Setup Complete!" -ForegroundColor Green
Write-Host "Next Step: Open Ubuntu from the Start Menu to set your Linux username/password."
- *The ultimate test is that you...
- Open a terminal on your host (If you are on Windows do this from WSL - not PowerShell or CMD)
- Clone the
devx-cafe/hello-devcontainerrepo cdinto the repo root- Run
code . - In VS Code:
- Choose to Reopen in container
(Command Palette:
Dev Containers: Reopen In Container) - Open the terminal, run:
lsb_release -a
- Choose to Reopen in container
(Command Palette:
The output should be:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.4 LTS
Release: 24.04
Codename: noble