Skip to content
Back to skills

2866 Neon Cli F5da5b0c

ASecurity

The Neon CLI is a command-line interface for managing Neon Serverless Postgres directly from your terminal. It provides the same capabilities as the Neon Platform API and is ideal for scripting, CI/CD pipelines, and developers who prefer terminal workflows.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businesstypescriptpythonbashsqlnodegitapidatabaseci/cddocumentation

Works with

  • cursor
  • terminal
  • cli
  • api
  • mcp

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2866-neon-cli_f5da5b0c --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2866 Neon Cli F5da5b0c?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2866 Neon Cli F5da5b0c
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2866-neon-cli-f5da5b0c/badge)](https://www.skillsdirectory.com/skills/tools-only-2866-neon-cli-f5da5b0c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Neon CLI

The Neon CLI is a command-line interface for managing Neon Serverless Postgres directly from your terminal. It provides the same capabilities as the Neon Platform API and is ideal for scripting, CI/CD pipelines, and developers who prefer terminal workflows.

## Installation

**macOS (Homebrew):**

```bash
brew install neonctl
```

**npm (cross-platform):**

```bash
npm install -g neonctl
```

## Authentication

Authenticate with your Neon account:

```bash
neonctl auth
```

This opens a browser for OAuth authentication and stores credentials locally.

For CI/CD or non-interactive environments, use an API key:

```bash
export NEON_API_KEY=your-api-key
```

Get your API key from: https://console.neon.tech/app/settings/api-keys

## Common Commands

### Project Management

```bash
# List all projects
neonctl projects list

# Create a new project
neonctl projects create --name my-project

# Get project details
neonctl projects get <project-id>

# Delete a project
neonctl projects delete <project-id>
```

### Branch Operations

```bash
# List branches
neonctl branches list --project-id <project-id>

# Create a branch
neonctl branches create --project-id <project-id> --name dev

# Delete a branch
neonctl branches delete <branch-id> --project-id <project-id>
```

### Connection Strings

```bash
# Get connection string
neonctl connection-string --project-id <project-id>

# Get connection string for specific branch
neonctl connection-string --project-id <project-id> --branch-id <branch-id>

# Get pooled connection string
neonctl connection-string --project-id <project-id> --pooled
```

### SQL Execution

```bash
# Run SQL query
neonctl sql "SELECT * FROM users LIMIT 10" --project-id <project-id>

# Run SQL from file
neonctl sql --file schema.sql --project-id <project-id>
```

### Database Management

```bash
# List databases
neonctl databases list --project-id <project-id> --branch-id <branch-id>

# Create database
neonctl databases create --project-id <project-id> --name mydb

# List roles
neonctl roles list --project-id <project-id> --branch-id <branch-id>
```

## Output Formats

The CLI supports multiple output formats:

```bash
# JSON output (default for scripting)
neonctl projects list --output json

# Table output (human-readable)
neonctl projects list --output table

# YAML output
neonctl projects list --output yaml
```

## CI/CD Integration

Example GitHub Actions workflow:

```yaml
- name: Create preview branch
  env:
    NEON_API_KEY: ${{ secrets.NEON_API_KEY }}
  run: |
    neonctl branches create \
      --project-id ${{ vars.NEON_PROJECT_ID }} \
      --name preview-${{ github.event.pull_request.number }}
```

## CLI vs MCP Server vs SDKs

| Tool           | Best For                                          |
| -------------- | ------------------------------------------------- |
| Neon CLI       | Terminal workflows, scripts, CI/CD pipelines      |
| MCP Server     | AI-assisted development with Claude, Cursor, etc. |
| TypeScript SDK | Programmatic access in Node.js/TypeScript apps    |
| Python SDK     | Programmatic access in Python applications        |
| REST API       | Direct HTTP integration in any language           |

## Documentation Resources

| Topic          | URL                                                    |
| -------------- | ------------------------------------------------------ |
| CLI Reference  | https://neon.com/docs/reference/neon-cli              |
| CLI Install    | https://neon.com/docs/reference/cli-install           |
| CLI Auth       | https://neon.com/docs/reference/cli-auth              |
| CLI Projects   | https://neon.com/docs/reference/cli-projects          |
| CLI Branches   | https://neon.com/docs/reference/cli-branches          |
| CLI Connection | https://neon.com/docs/reference/cli-connection-string |

Fetch CLI documentation:

```bash
curl -H "Accept: text/markdown" https://neon.com/docs/reference/neon-cli
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.