8000 GitHub - logesh-blackbox/neonctl: Neon CLI tool. The Neon CLI is a command-line interface that lets you manage Neon Serverless Postgres directly from the terminal.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Neon CLI tool. The Neon CLI is a command-line interface that lets you manage Neon Serverless Postgres directly from the terminal.

License

Notifications You must be signed in to change notification settings

logesh-blackbox/neonctl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neon CLI

The Neon CLI is a command-line interface that lets you manage Neon Serverless Postgres directly from the terminal. For the complete documentation, see Neon CLI.

Table of Contents

Prerequisites

  • Node.js 18.0 or higher (for npm installation)
  • macOS, Linux, or Windows operating system

Install the Neon CLI

Choose one of the following installation methods:

npm

npm i -g neonctl

Homebrew

brew install neonctl

Binary (macOS, Linux, Windows)

Download the latest binary file from our releases page.

Upgrade

You can upgrade your Neon CLI installation using the same method you used to install it:

npm

npm update -g neonctl

Homebrew

brew upgrade neonctl

Binary Download the latest binary file from our releases page and replace your existing binary.

Connect

There are two ways to authenticate with Neon:

Browser Authentication

neonctl auth

This command launches a browser window where you can authorize the Neon CLI to access your Neon account.

API Key Authentication

neonctl projects list --api-key <neon_api_key>

For information about obtaining a Neon API key, see Authentication in the Neon API Reference.

Configure autocompletion

The Neon CLI supports autocompletion to enhance your productivity. To set it up:

  1. Generate the completion script:
neonctl completion
  1. Follow the instructions provided by the command to configure autocompletion for your shell.

For detailed instructions, see Neon CLI commands — completion.

Commands

Command Subcommands Description Example
auth Authenticate neonctl auth
projects list, create, update, delete, get Manage projects neonctl projects list
ip-allow list, add, remove, reset Manage IP Allow neonctl ip-allow list
me Show current user neonctl me
branches list, create, rename, add-compute, set-default, delete, get Manage branches neonctl branches list
databases list, create, delete Manage databases neonctl databases list
roles list, create, delete Manage roles neonctl roles list
operations list Manage operations neonctl operations list
connection-string Get connection string neonctl connection-string
set-context Set context for session neonctl set-context
completion Generate completion script neonctl completion

Global options

Global options can be used with any Neon CLI command:

Option Description Type Default
-o, --output Set output format (json, yaml, or table) string table
--config-dir Path to configuration directory string /home/<user>/.config/neonctl
--api-key Neon API key string ""
--analytics Manage analytics boolean true
-v, --version Show version number boolean -
-h, --help Show help boolean -

Output Formats

  • -o, --output
    neonctl me --output json  # Get user info in JSON format
    neonctl projects list --output yaml  # List projects in YAML format

Configuration Directory

  • --config-dir
    neonctl projects list --config-dir /custom/config/path

API Key Authentication

  • --api-key
    neonctl projects list --api-key <your_api_key>

Analytics Settings

  • --analytics
    neonctl projects list --no-analytics  # Disable analytics for this command

Version Information

  • -v, --version
    neonctl --version

Help Documentation

  • -h, --help
    neonctl --help  # General help
    neonctl branches --help  # Command-specific help
    neonctl branches create --help  # Subcommand help

Contribute

To run the CLI locally:

  1. Build the CLI:
npm run build
  1. For continuous development:
npm run watch
  1. Test local changes:
node dist <command>  # Example: node dist branches --help

Contributing Guidelines

  1. Fork the repository and create your branch from main
  2. Install dependencies: npm install
  3. Make your changes and add tests if needed
  4. Update documentation as necessary
  5. Submit a pull request

For more detailed documentation, visit our Neon CLI Documentation.

About

Neon CLI tool. The Neon CLI is a command-line interface that lets you manage Neon Serverless Postgres directly from the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.7%
  • JavaScript 7.3%
  • HTML 3.8%
  • Python 1.1%
  • Shell 0.1%
0