Skip to content

Add GitHub Copilot CLI shell plugin#603

Open
eddumelendez wants to merge 1 commit into
1Password:mainfrom
eddumelendez:copilot-support
Open

Add GitHub Copilot CLI shell plugin#603
eddumelendez wants to merge 1 commit into
1Password:mainfrom
eddumelendez:copilot-support

Conversation

@eddumelendez
Copy link
Copy Markdown

@eddumelendez eddumelendez commented May 29, 2026

Overview

Adds a new GitHub Copilot shell plugin for the copilot CLI.

The plugin provisions an auth token through COPILOT_GITHUB_TOKEN, which is the environment variable supported by Copilot CLI. It also supports importing an existing token from COPILOT_GITHUB_TOKEN.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

N/A

How To Test

Run plugin validation:

make copilot/validate

Run the Copilot plugin tests:

go test ./plugins/copilot

Example authenticated command for functional testing:

copilot -p "explain this repo" -s

Changelog

Authenticate the GitHub Copilot CLI using Touch ID and other unlock options with 1Password Shell Plugins.

Copilot AI review requested due to automatic review settings May 29, 2026 04:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new shell-plugin for the GitHub Copilot CLI, enabling 1Password to manage the COPILOT_GITHUB_TOKEN credential used to authenticate the copilot CLI.

Changes:

  • Introduces the copilot plugin definition, platform info, and registration of the credential type + executable.
  • Defines the AuthToken credential (with env var mapping, provisioner, and importer) plus tests.
  • Defines the CopilotCLI executable with a NeedsAuth rule excluding help/version/login/logout/completion subcommands.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
plugins/copilot/plugin.go Registers the Copilot plugin with platform metadata, credentials, and executables.
plugins/copilot/copilot.go Defines the Copilot CLI executable and the conditions under which authentication is required.
plugins/copilot/auth_token.go Defines the AuthToken credential, env var mapping, provisioner, and importer.
plugins/copilot/auth_token_test.go Tests for the provisioner and importer behavior of the AuthToken credential.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/copilot/copilot.go Outdated
Comment on lines +25 to +32
return needsauth.IfAll(
needsauth.NotForExactArgs("-h"),
needsauth.NotForExactArgs("--help"),
needsauth.NotForExactArgs("-help"),
needsauth.NotForExactArgs("-v"),
needsauth.NotForExactArgs("--version"),
needsauth.NotForExactArgs("-version"),
needsauth.NotForExactArgs("-V"),
Comment thread plugins/copilot/copilot.go Outdated
Comment on lines +33 to +37
notForFirstArg("help"),
notForFirstArg("version"),
notForFirstArg("completion"),
notForFirstArg("login"),
notForFirstArg("logout"),
Comment on lines +15 to +16
DocsURL: sdk.URL("https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli"),
ManagementURL: sdk.URL("https://github.com/settings/personal-access-tokens/new"),
Comment thread plugins/copilot/plugin.go
Name: "copilot",
Platform: schema.PlatformInfo{
Name: "GitHub Copilot",
Homepage: sdk.URL("https://github.com/features/copilot/cli"),
@eddumelendez eddumelendez changed the title Add GitHub Copilo CLI shell plugin Add GitHub Copilot CLI shell plugin May 29, 2026
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants