360 Secure SkillHub
360 安全技能中心

Neon

提供 neonctl 命令行工具的安装、认证与命令参考,覆盖 Neon 的项目、分支、数据库、角色、端点及连接字符串管理,并建议程序化调用时使用 JSON 输出。内容以命令表为主,未说明错误处理、权限最小化与删除操作的确认或回滚方式。

melvynx
melvynx
热度 81.97
最近更新 2026-05-11 17:30:11
分类:开发依赖:代码执行 / 第三方 API应用场景:DevOps / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cli-neon
Metadata
name
neon
description
Manage Neon Serverless Postgres via CLI - projects, branches, databases, roles, endpoints, connection strings. Use when user mentions 'neon', 'neonctl', 'serverless postgres', or wants to manage Neon databases.
category
devtools
install_command
npm i -g neonctl

neon

Setup

npm i -g neonctl

Verify installation:

neonctl --version

Always use --output json flag when calling commands programmatically.

Authentication

neonctl auth

Resources

Projects

Command Description
neonctl projects list List all projects
neonctl projects create --name <name> Create a new project
neonctl projects delete <id> Delete a project
neonctl projects get <id> Get project details

Branches

Command Description
neonctl branches list --project-id <id> List all branches
neonctl branches create --project-id <id> --name <name> Create a branch
neonctl branches delete <branch-id> --project-id <id> Delete a branch
neonctl branches get <branch-id> --project-id <id> Get branch details
neonctl branches reset <branch-id> --project-id <id> --parent Reset branch to parent

Databases

Command Description
neonctl databases list --project-id <id> --branch-id <id> List databases
neonctl databases create --project-id <id> --branch-id <id> --name <name> Create a database
neonctl databases delete <name> --project-id <id> --branch-id <id> Delete a database

Roles

Command Description
neonctl roles list --project-id <id> List all roles
neonctl roles create --project-id <id> --branch-id <id> --name <name> Create a role
neonctl roles delete <name> --project-id <id> --branch-id <id> Delete a role

Endpoints

Command Description
neonctl endpoints list --project-id <id> List all endpoints

Connection Strings

Command Description
neonctl connection-string --project-id <id> Get default connection string
neonctl connection-string --project-id <id> --branch-id <id> Get connection string for a branch
neonctl connection-string --project-id <id> --branch-id <id> --database-name <db> --role-name <role> Get connection string with specific db and role

Context

Command Description
neonctl set-context --project-id <id> Set project context to avoid passing --project-id

Global Flags

Flag Description
--output json Output result as JSON
--project-id <id> Specify project ID
--api-key <key> Use API key for authentication
--no-color Disable colored output