Skip to content

Add shell plugin for Netlify CLI#627

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

Add shell plugin for Netlify CLI#627
eddumelendez wants to merge 1 commit into
1Password:mainfrom
eddumelendez:netlify-support

Conversation

@eddumelendez

Copy link
Copy Markdown
Contributor

Overview

Adds a shell plugin for the Netlify CLI. The plugin provisions the
NETLIFY_AUTH_TOKEN environment variable from 1Password, enabling seamless authentication without
exposing the personal access token in shell history or dotfiles.

Type of change

  • Created a new plugin

Related Issue(s)

  • Relates: #

How To Test

After installing the plugin, run any Netlify CLI command that requires authentication:

netlify sites:list

1Password will provision NETLIFY_AUTH_TOKEN automatically before the command runs.

Changelog

Authenticate the Netlify CLI using 1Password Shell Plugins with credentials stored securely in your 1Password vault.

Copilot AI review requested due to automatic review settings July 16, 2026 23:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new 1Password Shell Plugin for the Netlify CLI that provisions NETLIFY_AUTH_TOKEN from a stored Personal Access Token, enabling authenticated Netlify CLI usage without storing tokens in shell configuration.

Changes:

  • Added a new netlify plugin definition with platform metadata and executable configuration.
  • Implemented a Personal Access Token credential type that provisions/imports via NETLIFY_AUTH_TOKEN.
  • Added unit tests for the credential provisioner and importer.

Reviewed changes

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

File Description
plugins/netlify/plugin.go Declares the Netlify plugin and wires credentials + executable into the plugin schema.
plugins/netlify/netlify.go Defines the Netlify CLI executable and its NeedsAuth rules plus credential usage.
plugins/netlify/personal_access_token.go Implements the Personal Access Token credential type with env-var provision/import mapping.
plugins/netlify/personal_access_token_test.go Adds tests validating env-var provisioning and importing for NETLIFY_AUTH_TOKEN.

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

Comment on lines +14 to +20
ItemFields: map[sdk.FieldName]string{
fieldname.Token: "kV9wTq3ZtN0aB4cD7eF1gH5iJ8kL2mN6oP0qR4sT8uV",
},
ExpectedOutput: sdk.ProvisionOutput{
Environment: map[string]string{
"NETLIFY_AUTH_TOKEN": "kV9wTq3ZtN0aB4cD7eF1gH5iJ8kL2mN6oP0qR4sT8uV",
},
Comment on lines +29 to +36
Environment: map[string]string{
"NETLIFY_AUTH_TOKEN": "kV9wTq3ZtN0aB4cD7eF1gH5iJ8kL2mN6oP0qR4sT8uV",
},
ExpectedCandidates: []sdk.ImportCandidate{
{
Fields: map[sdk.FieldName]string{
fieldname.Token: "kV9wTq3ZtN0aB4cD7eF1gH5iJ8kL2mN6oP0qR4sT8uV",
},
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