From 01d463428ca6681ece0ec9f2ea1751f54d9fb429 Mon Sep 17 00:00:00 2001 From: Ihor Date: Mon, 14 Sep 2026 13:50:30 +0000 Subject: [PATCH 1/2] feat(devcontainer): install GitHub Copilot CLI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Ihor --- .devcontainer/devcontainer.json | 2 +- .github/workflows/ci.yml | 2 +- AGENTS.md | 8 ++++---- README.md | 16 ++++++++++------ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2b07f1e..bae2fbd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -49,6 +49,6 @@ } } }, - "updateContentCommand": "npm install -g opencode-ai", + "updateContentCommand": "npm install -g opencode-ai @github/copilot", "postCreateCommand": "opencode --version && echo 'Development environment ready'" } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f1312a..d062ecd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,7 +117,7 @@ jobs: push: never runCmd: | set -eu - for cmd in python3 node npm gh opencode curl jq claude; do + for cmd in python3 node npm gh opencode copilot curl jq claude; do if ! command -v "$cmd" >/dev/null 2>&1; then echo "::error::$cmd is missing" exit 1 diff --git a/AGENTS.md b/AGENTS.md index c8f5ed6..77bbdf0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,9 +6,9 @@ Guidance for AI agents and automated contributors working in this repository. This repository is a lean development container template for GitHub Codespaces and local VS Code Dev Containers. It defines a reproducible Ubuntu 26.04 -environment with Python 3, Node.js LTS, GitHub CLI, Claude Code CLI, and -OpenCode TUI. The repository contains no application source code — all -meaningful files are configuration. +environment with Python 3, Node.js LTS, GitHub CLI, GitHub Copilot CLI, Claude +Code CLI, and OpenCode TUI. The repository contains no application source code +— all meaningful files are configuration. ## Repository layout @@ -103,7 +103,7 @@ docker build --pull -t dev-template:local .devcontainer/ npx -y @devcontainers/cli up --workspace-folder . --remove-existing-container npx @devcontainers/cli exec --workspace-folder . -- bash -c ' set -eu - for cmd in python3 node npm gh opencode curl jq claude; do + for cmd in python3 node npm gh opencode copilot curl jq claude; do command -v "$cmd" || { echo "MISSING: $cmd"; exit 1; } done claude --version diff --git a/README.md b/README.md index 16d64fa..925f227 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,10 @@ Codespaces and local VS Code Dev Containers. - Python 3 with `venv` and `pip` - Node.js LTS with `npm` - GitHub CLI + - GitHub Copilot CLI - Claude Code CLI (authenticated session persisted across rebuilds) - - OpenCode TUI installed via `updateContentCommand` (cached by prebuilds) + - OpenCode TUI and GitHub Copilot CLI installed via `updateContentCommand` + (cached by prebuilds) - Bash shell with common utilities - Build essentials (`gcc`, `make`, and related packages) via base image - VS Code extensions: @@ -35,9 +37,9 @@ The devcontainer is tuned for fast Codespaces startup: - `common-utils` configured with zsh and Oh My Zsh disabled - `curl`, `wget`, `jq`, and `git` sourced from the base image — not re-installed in the Dockerfile -- OpenCode TUI installed in `updateContentCommand` instead of - `postCreateCommand`, so it is cached during Codespaces prebuilds and not - re-run on every start +- OpenCode TUI and GitHub Copilot CLI installed in `updateContentCommand` + instead of `postCreateCommand`, so they are cached during Codespaces + prebuilds and not re-run on every start - Claude Code authentication stored in a named volume (`claude-code-config-${devcontainerId}`) so sign-in survives container rebuilds @@ -77,14 +79,16 @@ created from `main` will start in approximately **10–25 seconds**. 1. Click "Code" button on the GitHub repository 2. Select "Create codespace on main" 3. Wait for the environment to build -4. Run `claude` in the integrated terminal and follow the authentication prompt +4. Run `copilot` or `claude` in the integrated terminal and follow the + authentication prompt ### VS Code Local Dev Containers 1. Clone this repository 2. Open in VS Code 3. Click "Reopen in Container" when prompted -4. Run `claude` in the integrated terminal and follow the authentication prompt +4. Run `copilot` or `claude` in the integrated terminal and follow the + authentication prompt ## Repository Structure From b7d05c9ddf0d5df8b8b1bb76b56be04a0b861d67 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:06:46 +0000 Subject: [PATCH 2/2] docs: update AGENTS guardrail for Copilot CLI install Co-authored-by: idvoretskyi <118459+idvoretskyi@users.noreply.github.com> --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 77bbdf0..a8f8c8b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -131,7 +131,7 @@ npx @devcontainers/cli exec --workspace-folder . -- bash -c ' re-run its `install.cjs`) to `updateContentCommand` — that step runs as user `vscode` and fails with `EACCES` trying to rename the root-owned package (this broke CI in PR #51). `updateContentCommand` should only install - user-writable packages (currently just `opencode-ai`). + user-writable packages (currently `opencode-ai` and `@github/copilot`). - **CI runs on Copilot/bot-authored PR branches often show `action_required`** and won't execute automatically. Approve them in the GitHub UI, or run `gh run rerun --repo idvoretskyi/dev` to trigger them.