Conversation
- Install gh CLI via official apt repo and gh-copilot extension in Dockerfile - Add .gh config dir to SHARED_DIRS and CONFIG_SOURCES in config.ts - Mount ~/.config/gh into containers via getCoreMounts() in mounts.ts - Update init message in commands.ts to mention GitHub Copilot CLI - Add GitHub Copilot CLI section to Permissions.md - Update storage structure in ConsumerGuide.md and README.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds GitHub Copilot CLI (gh copilot) as an additional “first-class” harness in the code-container environment by installing the tooling in the image and persisting/mounting host gh configuration into containers.
Changes:
- Install
ghCLI +github/gh-copilotextension in the Docker image. - Copy
~/.config/ghinto~/.code-container/configs/.ghand mount it into containers at/root/.config/gh. - Update user-facing docs/messages to include
gh copilotsetup and storage structure.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Dockerfile | Adds installation steps for gh and gh-copilot extension. |
| src/config.ts | Adds .gh to shared config dirs and copies ~/.config/gh into container configs. |
| src/mounts.ts | Adds default mount for .gh into /root/.config/gh. |
| src/commands.ts | Updates init prompt text to include GitHub Copilot CLI configs. |
| Permissions.md | Documents gh auth behavior inside the container. |
| internal/ConsumerGuide.md | Updates usage examples and storage structure to include .gh/. |
| README.md | Updates manual config copy list to include ~/.config/gh. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| `${CONFIGS_DIR}/.codex:/root/.codex`, | ||
| `${CONFIGS_DIR}/.gh:/root/.config/gh`, | ||
| `${CONFIGS_DIR}/.opencode:/root/.config/opencode`, |
There was a problem hiding this comment.
ensureMountsFile() returns early when ~/.code-container/MOUNTS.txt already exists, so this new default mount for .gh will only apply to fresh installs. That contradicts the PR description claim that “every container mounts it” and means existing users won’t get authenticated gh copilot unless they manually update MOUNTS.txt and recreate containers. Consider adding a migration path (e.g., append any missing core mounts to an existing MOUNTS.txt, or prompt the user to add the new mount).
Summary
Adds GitHub Copilot CLI (
gh copilot) as a first-class harness, following the same pattern as Claude Code, Codex, Gemini, and OpenCode.Changes
Dockerfile— InstallsghCLI via official apt repo and thegh-copilotextension at build timesrc/config.ts— Adds".gh"toSHARED_DIRSand~/.config/gh → .ghtoCONFIG_SOURCESsrc/mounts.ts— Mountsconfigs/.ghinto containers at/root/.config/ghsrc/commands.ts— Updates init message to mention GitHub Copilot CLIPermissions.md— Adds GitHub Copilot CLI auth/setup sectioninternal/ConsumerGuide.md— Adds.gh/to storage structure andgh copilotto usage examplesREADME.md— Adds~/.config/ghto manual config copy list and storage structureHow it works
Running
container initcopies~/.config/gh(GitHub auth tokens) into~/.code-container/configs/.gh/. Every container mounts it at/root/.config/ghsogh copilotruns authenticated automatically.