Skip to content

Add shell plugin for Netlify CLI - #627

Merged
rr3khan merged 3 commits into
1Password:mainfrom
eddumelendez:netlify-support
Oct 18, 2026
Merged

rr3khan merged 3 commits 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
Contributor

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 thread plugins/netlify/personal_access_token_test.go
Comment thread plugins/netlify/personal_access_token_test.go
rr3khan and others added 2 commits October 18, 2026 18:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
netlify login stores the token in config.json under users.<userId>.auth.token
(~/Library/Preferences/netlify on macOS, ~/.config/netlify on Linux), per
https://docs.netlify.com/api-and-cli-guides/cli-guides/get-started-with-cli/#configjson-location.
Keep the NETLIFY_AUTH_TOKEN importer and also try the config file.

@rr3khan rr3khan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@eddumelendez Thanks for the contribution. I also added a check to import from the stored config.json approved and will merge. This plugin will be included in a future cli release.

@rr3khan
rr3khan merged commit e452330 into 1Password:main Oct 18, 2026
3 checks passed
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.

3 participants