Add Cursor shell plugin#612
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new cursor plugin to the shell-plugins registry for authenticating Cursor’s agent CLI via CURSOR_API_KEY, including env-var based provisioning/import support.
Changes:
- Introduces a new Cursor plugin (
cursor.New()) with platform metadata and theagentexecutable definition. - Adds an API key credential type that provisions/imports via
CURSOR_API_KEY. - Adds unit tests for the credential provisioner and importer.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugins/cursor/plugin.go | Defines the cursor plugin metadata and wires credentials/executables. |
| plugins/cursor/cursor.go | Declares the Cursor CLI executable (agent) and authentication requirements. |
| plugins/cursor/api_key.go | Implements the API key credential schema, env-var provisioner, and env-var importer. |
| plugins/cursor/api_key_test.go | Tests env-var provisioning and importing behavior for CURSOR_API_KEY. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scottisloud
left a comment
There was a problem hiding this comment.
Thanks for the Cursor CLI Plugin contribution!
One change before merge, similar to your other recent contribution:
- Exclude
agent status. The docs describeagent statusas checking whether you're authenticated — it should not require a 1Password item first. Please addneedsauth.NotForExactArgs("status")alongside the existing helpers incursor.go.
Optional (not blocking):
- Consider also skipping auth when
--api-keyis passed on the command line (documented alternate to the env var), similar toplugins/sentry/sentry_cli.go.
Once status is excluded, I'll take another look!
scottisloud
left a comment
There was a problem hiding this comment.
Thanks again for making these changes and for the contribution @eddumelendez ! LGTM
Look out for this in a future version of the 1Password CLI.
Overview
Adds a new Cursor shell plugin for the
agentCLI.The plugin provisions an auth token through
CURSOR_API_KEY. It also supports importing an existing token fromCURSOR_API_KEY.Type of change
Related Issue(s)
N/A
How To Test
Run plugin validation:
Run the Cursor plugin tests:
go test ./plugins/cursorExample authenticated command for functional testing:
agent "explain this repo"Changelog
Authenticate the Cursor CLI using Touch ID and other unlock options with 1Password Shell Plugins.