Can confirm that the build is broken. Using yay and zsh. Cleaned everything multiple times.
Search Criteria
Package Details: github-copilot-cli 1.0.71-1
Package Actions
| Git Clone URL: | https://aur.archlinux.org/github-copilot-cli.git (read-only, click to copy) |
|---|---|
| Package Base: | github-copilot-cli |
| Description: | GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal. |
| Upstream URL: | https://github.com/github/copilot-cli |
| Keywords: | ai cli copilot github |
| Licenses: | LicenseRef-GitHub-Copilot |
| Conflicts: | github-copilot, github-copilot-cli-legacy |
| Provides: | copilot |
| Replaces: | github-copilot |
| Submitter: | Dominiquini |
| Maintainer: | Dominiquini (Edu4rdSHL) |
| Last Packager: | Dominiquini |
| Votes: | 14 |
| Popularity: | 2.31 |
| First Submitted: | 2025-10-23 17:21 (UTC) |
| Last Updated: | 2026-07-16 12:52 (UTC) |
Dependencies (7)
- gcc-libs (gcc-libs-gitAUR, gcc-libs-fast-optimizedAUR, gccrs-libs-gitAUR, gcc-libs-snapshotAUR)
- glib2 (glib2-gitAUR, glib2-patched-thumbnailerAUR)
- glibc (glibc-gitAUR, glibc-git-native-pgoAUR, glibc-eacAUR)
- libsecret
- nodejs (nodejs-gitAUR, nodejs-lts-hydrogenAUR, python-nodejs-wheelAUR, nodejs-lts-iron, nodejs-lts-jod, nodejs-lts-krypton)
- jq (jq-gitAUR, jaq-binAUR, jq-staticAUR, jaq-gitAUR) (make)
- npm (npm-corepackAUR, python-nodejs-wheelAUR) (make)
Required by (1)
- emdash-git (optional)
Sources (2)
pkr commented on 2026-05-04 11:10 (UTC)
jasursadikov commented on 2026-05-04 09:37 (UTC)
@Edu4rdSHL even though
error: Invalid command format.
Did you mean: copilot -i "completion bash"?
For non-interactive mode, use the -p or --prompt option.
Try 'copilot --help' for more information.
==> ERROR: A failure occurred in package().
Aborting...
ttobsen commented on 2026-05-04 08:33 (UTC)
It looks like the build failure may be related to npm install fetching the optional dependency @github/copilot-linux-x64 from the internet during packaging. If this optional native binary gets installed, it appears to take precedence over the JS fallback (index.js). The native binary in the current release does not seem to expose a completion subcommand, while the JS fallback does.
This could explain why the build succeeds in some environments but not others — in environments where npm skips the optional dependency (e.g. due to network restrictions in certain chroot setups), the JS fallback is used and the build succeeds.
It may also be worth noting that the PKGBUILD appears to trigger an undeclared network fetch during package() for this optional dependency, which is not listed as a source with a checksum.
The failure has now been reproduced by multiple users across 1.0.39 and 1.0.40, both with AUR helpers and with plain makepkg. Could you share the exact steps to reproduce your successful build, including how your chroot environment is set up? That would help narrow down why it behaves differently in your environment.
mburakov commented on 2026-05-04 06:52 (UTC)
Unfortunately, building this fails:
$ curl 'https://aur.archlinux.org/cgit/aur.git/snapshot/github-copilot-cli.tar.gz' | tar xz; cd github-copilot-cli; makepkg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2761 0 2761 0 0 13606 0 0
==> Making package: github-copilot-cli 1.0.40-1 (Mon May 4 08:50:35 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading copilot-1.0.40.tgz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36.25M 100 36.25M 0 0 6.00M 0 00:06 00:06 6.05M
-> Downloading CHANGELOG-1.0.40.md...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 114.1k 100 114.1k 0 0 879.1k 0 0
==> Validating source files with b2sums...
copilot-1.0.40.tgz ... Passed
CHANGELOG-1.0.40.md ... Passed
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package()...
-> Install using Using NPM
-> Fix ownership of ALL FILES
-> Remove references to PKGDIR
-> Fixing 'package.json'
-> More fixes for 'package.json'
-> Generating autocompletions for Bash
error: Invalid command format.
Did you mean: copilot -i "completion bash"?
For non-interactive mode, use the -p or --prompt option.
Try 'copilot --help' for more information.
==> ERROR: A failure occurred in package().
Aborting...
Edu4rdSHL commented on 2026-05-03 17:58 (UTC)
Again, please build in a clean chroot environment; it builds correctly. If you're having issues, it's a problem with your AUR helper.
jasursadikov commented on 2026-05-03 17:55 (UTC)
I am struggling to install
error: Invalid command format.
Did you mean: copilot -i "completion bash"?
For non-interactive mode, use the -p or --prompt option.
Try 'copilot --help' for more information.
==> ERROR: A failure occurred in package().
Aborting...
-> error making: github-copilot-cli-exit status 4
-> Failed to install the following packages. Manual intervention is required:
github-copilot-cli - exit status 4
ttobsen commented on 2026-04-29 10:28 (UTC) (edited on 2026-04-29 10:31 (UTC) by ttobsen)
Build fails in 1.0.39: autocompletion generation broken
The build fails during Generating autocompletions for Bash/Zsh/Fish because
copilot completion <shell> is not a valid command in the native binary shipped
with 1.0.39.
The copilot wrapper (npm-loader.js) prefers the bundled native ELF binary
(@github/copilot-linux-x64) over the JS fallback (index.js). The native
binary in this release does not expose a completion subcommand, even though it
exists in index.js.
Fix: invoke node index.js directly for the three completion steps:
diff --git a/PKGBUILD b/PKGBUILD
index d6d5554..47df86f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -63,16 +63,18 @@ package() {
chmod 644 "${pkgjson}"
done
+ local _jsentry="${pkgdir}/usr/lib/node_modules/${_npmmodule}/index.js"
+
msg2 "Generating autocompletions for Bash"
- "${pkgdir}/usr/bin/copilot" completion bash > copilot
+ node "${_jsentry}" completion bash > copilot
install -Dm644 copilot "${pkgdir}/usr/share/bash-completion/completions/copilot"
msg2 "Generating autocompletions for Zsh"
- "${pkgdir}/usr/bin/copilot" completion zsh > _copilot
+ node "${_jsentry}" completion zsh > _copilot
install -Dm644 _copilot "${pkgdir}/usr/share/zsh/site-functions/_copilot"
msg2 "Generating autocompletions Fish"
- "${pkgdir}/usr/bin/copilot" completion fish > copilot.fish
+ node "${_jsentry}" completion fish > copilot.fish
install -Dm644 copilot.fish "${pkgdir}/usr/share/fish/vendor_completions.d/copilot.fish"
msg2 "Install README file"
Edu4rdSHL commented on 2026-04-28 21:56 (UTC)
Build in a clean chroot, the packages were tested there and they work
michaellee commented on 2026-04-28 14:49 (UTC) (edited on 2026-04-28 14:49 (UTC) by michaellee)
I think the most recent PKGBUILD update adding autocompletions has some bad syntax. Getting this error:
==> Starting package()...
-> Install using Using NPM
-> Fix ownership of ALL FILES
-> Remove references to PKGDIR
-> Fixing 'package.json'
-> More fixes for 'package.json'
-> Generating autocompletions for Bash
error: Invalid command format.
Did you mean: copilot -i "completion bash"?
For non-interactive mode, use the -p or --prompt option.
Try 'copilot --help' for more information.
==> ERROR: A failure occurred in package().
Aborting...
-> error making: github-copilot-cli-exit status 4
UnseenArch commented on 2026-04-28 14:18 (UTC)
Thanks for adding the completion files!
But I think the completion file for fish should be in /usr/share/fish/vendor_completions.d/ directory, because /usr/share/fish/completions/ is populated by the fish package itself.
You can see for example in the ripgrep package https://archlinux.org/packages/extra/x86_64/ripgrep/files/
Also, I don't think -s does anything when running npm install -g so you might as well remove it. If it does do something, by all means keep it.
Pinned Comments
Edu4rdSHL commented on 2026-05-11 19:26 (UTC)
For everyone having build issues with the shell completion, follow the following steps:
~/.copilot/pkgfoldermakepkg, use-CThat should solve your problem. However, if the issue persists, build your package in a clean chroot environment.
There aren't problems with packaging, and nothing will be changed on our side, so avoid commenting on a problem that has already been discussed many times. Thanks!