Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions BUGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Bug tracker

Full bug list: <https://github.com/opticon454/Codeman/issues>
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# aicodeman

## 20260925-1326

- Added optional clipboard support alongside the GitHub CLI in Docker images.

## 1.33.0

### Minor Changes
Expand Down
4 changes: 4 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ They are not `.env` settings: turning a CLI on is a per-host choice, which is wh

The Azure CLI is the large one, about 600 MB of the roughly 670 MB the pair adds. A CLI left off leaves nothing functional behind: no apt repository, no package, no `azure-devops` extension and no credential-helper entry, so git for that host behaves exactly as it does without this feature. With both off the image is functionally unchanged; it still carries the `AZURE_EXTENSION_DIR` variable, an empty extensions directory and one small layer that copies and then removes the helper script.

When GitHub CLI is enabled, the images also install the small `xclip` helper so
`gh auth login` can copy its device-login code where an X11 clipboard is
available. It is not installed when `CODEMAN_INSTALL_GH=0`.

### Signing in

With a CLI on, the system Git configuration routes credentials through it:
Expand Down
5 changes: 4 additions & 1 deletion docker/agent.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ RUN set -eux; \
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg; \
echo "deb [arch=${arch} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list; \
pkgs="${pkgs} gh"; \
# GitHub CLI copies its device-login code with xclip when available. Keep
# this dependency inside the existing opt-in GitHub CLI branch so images
# without gh do not gain desktop-clipboard tooling. \
pkgs="${pkgs} gh xclip"; \
fi; \
if [ "${CODEMAN_INSTALL_AZ}" = 1 ]; then \
curl -fsSL -o /etc/apt/keyrings/microsoft.asc \
Expand Down
5 changes: 4 additions & 1 deletion docker/server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ RUN set -eux; \
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg; \
echo "deb [arch=${arch} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list; \
pkgs="${pkgs} gh"; \
# GitHub CLI copies its device-login code with xclip when available. Keep
# this dependency inside the existing opt-in GitHub CLI branch so images
# without gh do not gain desktop-clipboard tooling. \
pkgs="${pkgs} gh xclip"; \
fi; \
if [ "${CODEMAN_INSTALL_AZ}" = 1 ]; then \
curl -fsSL -o /etc/apt/keyrings/microsoft.asc \
Expand Down
7 changes: 7 additions & 0 deletions test/agent-image-build-args-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,11 @@ describe('optional gh / az in the agent image: both producers pass the same swit
expect(dockerfile, file).toMatch(/^ARG CODEMAN_INSTALL_AZ=0$/m);
}
});

it('installs clipboard support only with the optional GitHub CLI', () => {
for (const file of ['../docker/agent.Dockerfile', '../docker/server.Dockerfile']) {
const dockerfile = readFileSync(fileURLToPath(new URL(file, import.meta.url)), 'utf-8');
expect(dockerfile, file).toMatch(/if \[ "\$\{CODEMAN_INSTALL_GH\}" = 1 \]; then[\s\S]*?pkgs="\$\{pkgs\} gh xclip"/);
}
});
});
Loading