Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/cli-neon-plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"neon": minor
"neonctl": minor
---

Add `neon plugins` to install the Neon agent plugin into coding agents. A TTY asks agents, then confirms. `-y` installs into detected agents at project scope. `--agent` names specific agents. `--global` is user scope.
29 changes: 29 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,34 @@ On a TTY the command asks which agents and which skills, then shows a summary to

`--agent` names match `neon mcp`, minus agents that cannot install skills: `antigravity`, `cline`, `cline-cli`, `claude-code`, `claude-desktop`, `codex`, `cursor`, `gemini-cli`, `goose`, `github-copilot-cli`, `grok-build`, `opencode`, `vscode`, `windsurf`, `zed`. `mcporter` is a known MCP name that is then skipped.

## Install the Neon plugin (`plugins`)

`neon plugins` installs the Neon agent plugin (`neon-postgres`) by running `npx plugins add`. It does not call the Neon API.

```bash
# Interactive: agents, then confirm.
$ neon plugins

# Skip prompts. Every detected agent.
$ neon plugins -y

$ neon plugins --agent cursor --agent claude-code

# User-level install.
$ neon plugins --global
$ neon plugins --global --agent vscode
```

On a TTY the command asks which agents, then shows a summary to confirm. Detected agents start selected from project-folder markers such as `.cursor`. There is one plugin (`neon-postgres`); there is no plugin picker and no `update` subcommand.

`-y` skips those questions and installs into every detected agent. `--agent` names specific agents and skips the agent picker. Without a TTY, pass `-y` or `--agent`. `--agent` alone is enough because the plugin is fixed.

Default scope is `project`. `--global` is `user`. On macOS and Linux, Cursor and Claude Code store the plugin cache under `~/.claude/plugins`; on Windows, Cursor installs into Cursor extensions. `project` vs `user` is the scope field the plugins CLI records, not a directory in the repo. VS Code, GitHub Copilot CLI, and Grok Build only install user-level: they are skipped at the default scope with a warning, and `--agent vscode` without `--global` fails if nothing else is selected.

`--agent` names with a plugins mapping: `claude-code`, `claude-desktop`, `codex`, `cursor`, `github-copilot-cli`, `grok-build`, `vscode`. `claude-desktop` installs as Claude Code; naming both produces one install and lists both names in the table. `mcporter` is a known MCP name that is then skipped.

The plugins CLI installs every plugin it finds in the Neon plugin package. Today that is `neon-postgres`.

## Snapshots (`snapshots`)

`neon snapshots` (alias `neon snapshot`) manages **snapshots** — point-in-time backups of a branch that you can list, rename, expire, restore into a branch, or schedule automatically. Snapshots are a Beta Neon feature and were previously only available in the Console and REST API; this command group brings them to the CLI.
Expand Down Expand Up @@ -1171,6 +1199,7 @@ Id Name Project Created At Last Used At Last
| bootstrap | | Scaffold a project from a template |
| init | | Set up a project for a coding agent |
| mcp | | Install the Neon MCP server |
| plugins | | Install the Neon plugin |
| skills | `update` | Install Neon agent skills |
| bucket | `create`, `list`, `delete`, `object list`, `object get`, `object put`, `object delete` (incl. `--recursive`) | Manage buckets and their objects |
| [completion](https://neon.com/docs/reference/cli-completion) | | Generate a completion script |
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/commands/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
isCurrentBranchProbe,
isMcpCommand,
isMcpOauth,
isPluginsCommand,
isProfileCommand,
isSkillsCommand,
} from "../context.js";
Expand Down Expand Up @@ -431,8 +432,8 @@ export const ensureAuth = async (
return;
}

// Neon authentication is unrelated to the child skills CLI.
if (isSkillsCommand(props)) {
// Neon authentication is unrelated to the child skills and plugins CLIs.
if (isSkillsCommand(props) || isPluginsCommand(props)) {
return;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import * as neonAuth from "./neon_auth.js";
import * as open from "./open.js";
import * as operations from "./operations.js";
import * as orgs from "./orgs.js";
import * as plugins from "./plugins.js";
import * as profile from "./profile.js";
import * as projects from "./projects.js";
import * as psql from "./psql.js";
Expand Down Expand Up @@ -61,6 +62,7 @@ export default [
open,
init,
mcp,
plugins,
skills,
dataApi,
functions,
Expand Down
Loading
Loading