Running GitHub Copilot as an AI coding agent in the terminal means describing a task in plain language and having Copilot read files, write changes, and execute commands on your behalf, without switching to a browser or IDE plugin. The tool is available on all GitHub Copilot plans and is currently in public preview. To install GitHub Copilot CLI on Arch Linux, the AUR package github-copilot-cli declares nodejs as a runtime dependency, which pacman resolves and installs automatically alongside the copilot binary.
Update Arch Linux Before Installing GitHub Copilot CLI
Synchronize package databases and apply any pending upgrades before installing new software. Arch Linux is a rolling release, so a full upgrade first prevents dependency conflicts:
sudo pacman -Syu
This guide uses
sudofor commands that require root privileges. If your user is not in the sudoers file, run the commands as root or follow the guide on how to add and manage sudo users on Arch Linux.
Install GitHub Copilot CLI on Arch Linux via the AUR
GitHub Copilot CLI is not available in the official Arch Linux repositories. The AUR package github-copilot-cli fetches the upstream npm release, resolves the runtime dependencies including Node.js, and installs the copilot binary through pacman. Both yay and paru support AUR packages; if neither is installed, see the Arch Wiki AUR page for an overview of available helpers before continuing.
GitHub Copilot CLI is currently in public preview. Commands, options, and behavior may change before the stable release. Refer to the official GitHub Copilot CLI documentation for the latest details.
Install GitHub Copilot CLI with yay
If yay is not installed, follow the guide to install yay on Arch Linux before continuing.
yay -S github-copilot-cli
yay prompts you to review the PKGBUILD before building. After confirmation, it downloads the @github/copilot npm package from the npm registry, installs the runtime dependencies including Node.js, and installs the result through pacman. The installed package is approximately 235 MiB.
Install GitHub Copilot CLI with paru
If paru is not installed, see the guide to install paru on Arch Linux before continuing.
paru -S github-copilot-cli
Both helpers build the same AUR package and produce identical results.
If the legacy
github-copilotorgithub-copilot-cli-legacyAUR package is already installed, yay or paru will prompt you to remove it before proceeding. Both packages conflict withgithub-copilot-cliand provide the samecopilotbinary.
Authenticate GitHub Copilot CLI on Arch Linux
Copilot CLI requires authentication before the first use. The copilot login command initiates an OAuth device flow directly from the terminal:
copilot login
The command outputs a verification URL and a one-time code. Open the URL in a browser, enter the code on GitHub’s device authorization page, and approve the request. The CLI stores credentials locally and reuses them for all subsequent sessions.
For non-interactive environments such as CI/CD pipelines, export a fine-grained personal access token with the Copilot Requests permission as the
GH_TOKENorGITHUB_TOKENenvironment variable instead of runningcopilot login. If your account is organization-managed, a Copilot administrator may need to enable the CLI in the organization’s Copilot settings before authentication succeeds.
Verify GitHub Copilot CLI on Arch Linux
Confirm the copilot binary is installed and the version matches the installed AUR package:
copilot --version
Expected output:
GitHub Copilot CLI 0.0.412. Run 'copilot update' to check for updates.
The version number increments with each upstream npm release. To confirm the binary location:
which copilot
/usr/sbin/copilot
Run GitHub Copilot CLI on Arch Linux
After authentication, launch a Copilot agent session from any directory:
copilot
Copilot opens an interactive session and waits for a task description in plain language. Describe what you want done, such as “add error handling to parser.py” or “write unit tests for the login function”, and the agent reads the relevant files, drafts changes, and requests confirmation before applying each edit. To pre-load a task and skip the opening prompt, pass it with -i:
copilot -i "describe your task here"
For scripts and automation where each operation should apply without prompting, add --allow-all:
copilot -p "describe your task here" --allow-all
The
--allow-allflag grants the agent permission to read and write any file and run shell commands without per-step confirmation. Use it only in trusted environments where you have reviewed the task scope. To target a specific AI model, pass--modelfollowed by any identifier shown incopilot --help, for examplecopilot --model claude-sonnet-4.6.
Update GitHub Copilot CLI on Arch Linux
The AUR package tracks the upstream npm releases published to the copilot-cli repository. Include github-copilot-cli in a regular full system upgrade:
yay -Syu
To update only the GitHub Copilot CLI package without upgrading other packages:
yay -S github-copilot-cli
Replace yay with paru in both commands if you installed via paru.
The built-in
copilot updatecommand downloads npm releases outside pacman’s knowledge, which creates a mismatch between the installed files and the pacman database. Useyay -Syufor all updates to keep the package database consistent.
Remove GitHub Copilot CLI from Arch Linux
Remove the package and any orphaned dependencies it introduced:
yay -Rns github-copilot-cli
The -Rns flags remove the package (-R), unneeded dependencies (-s), and backup configuration files (-n). Review the package list before confirming; dependencies such as nodejs are only removed if no other installed package requires them.
Confirm the package is no longer installed:
pacman -Qi github-copilot-cli
error: package 'github-copilot-cli' was not found
The package removal does not touch locally stored credentials and session configuration. To remove them as well, delete the Copilot config directory:
rm -rf ~/.copilot
This directory holds authentication tokens and any session configuration written by the CLI. Omit this step if you plan to reinstall, as the credentials carry over automatically.
Troubleshoot GitHub Copilot CLI on Arch Linux
Authentication Fails or Returns a Subscription Error
If copilot login completes the OAuth device flow but immediately returns a subscription or permissions error, the GitHub account either does not have an active Copilot subscription or the plan does not include CLI access.
Before re-authenticating, confirm the subscription is active at github.com/settings/copilot. If it shows as active but the error persists, the account may be organization-managed and require an administrator to enable CLI access in the organization’s Copilot policy settings. Once the subscription or policy is confirmed, run the login flow again:
copilot login
After authentication completes, run copilot --version to confirm the CLI can reach GitHub without errors.
AUR Build Fails During npm Package Download
If yay -S github-copilot-cli exits with a network timeout or checksum error during the source download step, the npm registry was unreachable or returned an incomplete response. The PKGBUILD validates the download with b2sum before building, so no corrupt files are installed.
First, confirm connectivity to the npm registry:
curl -Is https://registry.npmjs.org/@github/copilot | head -n 1
HTTP/2 200
A 200 response confirms the registry is reachable. If the command times out, the issue is network-level; wait a few minutes and retry the build:
yay -S github-copilot-cli
Authentication Token Expires or Gets Revoked
If copilot fails immediately with an authentication or token error after a period of inactivity, the stored credentials have expired or been invalidated. Tokens have a finite lifetime and are also revoked when the subscription lapses, the token is manually removed in GitHub settings, or an organization administrator withdraws access.
Re-run the login flow to issue a fresh token:
copilot login
After the device flow completes, start a brief interactive session with copilot to confirm the new token is valid.
Frequently Asked Questions
Yes. GitHub Copilot CLI is a terminal-based coding agent. Running copilot opens an interactive session where you describe tasks in plain language, such as “add error handling to parser.py” or “write unit tests for the login function”. The agent reads the relevant files, drafts the changes, and asks for confirmation before applying each edit. For automated pipelines, the --allow-all flag enables fully autonomous operation without per-step prompts.
GitHub Copilot CLI requires an active GitHub Copilot subscription and is available on all tiers including the free plan. Users on GitHub Copilot Free are subject to that plan’s usage limits. Pro, Business, and Enterprise subscribers have higher or unlimited usage depending on their tier.
gh copilot is an extension for the GitHub CLI (gh) that provides Copilot-powered suggestions and explanations for shell commands. The standalone GitHub Copilot CLI covered in this guide is a separate terminal agent designed for multi-step agentic coding tasks: reading files, writing code, executing commands, and iterating until a task is complete. They are separate tools with different scopes and can coexist on the same system.
GitHub Copilot CLI is the interactive terminal agent covered in this guide: it opens a session, accepts natural-language task descriptions, and autonomously edits files and runs commands. The GitHub Copilot SDK (Copilot API) is a programmatic interface for developers who want to embed Copilot capabilities into their own tools, scripts, or applications. Use the CLI for day-to-day coding tasks in the terminal; use the SDK if you are building a tool that calls Copilot under the hood.
No. The github-copilot-cli AUR package lists nodejs as a runtime dependency. If Node.js is not already present on your system, yay or paru installs it automatically as part of the build process.
Conclusion
GitHub Copilot CLI is installed and authenticated on Arch Linux. Point it at any codebase, describe a task in plain language, and the agent reads files, writes changes, and runs commands without switching contexts. The AUR package stays current through yay -Syu, so no separate update process is needed. Since the tool remains in public preview, review the GitHub Copilot CLI documentation for breaking changes before using it in critical workflows. For a complete development setup, see the guides to Node.js on Arch Linux and Git on Arch Linux.
Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed:
<code>command</code>command<strong>bold</strong><em>italic</em><a href="URL">link</a><blockquote>quote</blockquote>