{"id":18464943,"url":"https://github.com/neondatabase/neonctl","last_synced_at":"2026-02-26T13:05:27.550Z","repository":{"id":180727416,"uuid":"529548675","full_name":"neondatabase/neonctl","owner":"neondatabase","description":"Neon CLI tool. The Neon CLI is a command-line interface that lets you manage Neon Serverless Postgres directly from the terminal.","archived":false,"fork":false,"pushed_at":"2025-05-04T08:17:20.000Z","size":1936,"stargazers_count":73,"open_issues_count":15,"forks_count":23,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-05-04T09:24:24.589Z","etag":null,"topics":["cli","database","postgres","postgresql","serverless"],"latest_commit_sha":null,"homepage":"https://neon.tech/docs/reference/neon-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neondatabase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-27T10:10:24.000Z","updated_at":"2025-05-04T08:17:23.000Z","dependencies_parsed_at":"2023-11-09T13:42:01.556Z","dependency_job_id":"55c184b5-323f-4504-865e-46e7d9c32a27","html_url":"https://github.com/neondatabase/neonctl","commit_stats":null,"previous_names":["neondatabase/neonctl"],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneonctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneonctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneonctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneonctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neondatabase","download_url":"https://codeload.github.com/neondatabase/neonctl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253231220,"owners_count":21875078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","database","postgres","postgresql","serverless"],"created_at":"2024-11-06T09:11:36.055Z","updated_at":"2026-02-26T13:05:27.538Z","avatar_url":"https://github.com/neondatabase.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Databases"],"sub_categories":[],"readme":"The Neon CLI is a command-line interface that lets you manage [Neon Serverless Postgres](https://neon.tech/) directly from the terminal. For the complete documentation, see [Neon CLI](https://neon.tech/docs/reference/neon-cli).\n\n## Install the Neon CLI\n\n**npm**\n\n```shell\nnpm i -g neonctl\n```\n\nRequires Node.js 18.0 or higher.\n\n**Howebrew**\n\n```shell\nbrew install neonctl\n```\n\n**Binary (macOS, Linux, Windows)**\n\nDownload a binary file [here](https://github.com/neondatabase/neonctl/releases).\n\n### Upgrade\n\n**npm**\n\n```shell\nnpm update -g neonctl\n```\n\nRequires Node.js 18.0 or higher.\n\n**Howebrew**\n\n```shell\nbrew upgrade neonctl\n```\n\n**Binary (macOS, Linux, Windows)**\n\nTo upgrade a binary version, download the latest binary file, as described above, and replace your old binary with the new one.\n\n## Connect\n\nRun the following command to authenticate a connection to Neon:\n\n```bash\nneonctl auth\n```\n\nThe `auth` command launches a browser window where you can authorize the Neon CLI to access your Neon account. Running a Neon CLI command without authenticating with [neonctl auth](https://neon.tech/docs/reference/cli-auth) automatically launches the browser authentication process.\n\nAlternatively, you can authenticate a connection with a Neon API key using the `--api-key` option when running a Neon CLI command. For example, an API key is used with the following `neonctl projects list` command:\n\n```bash\nneonctl projects list --api-key \u003cneon_api_key\u003e\n```\n\nFor information about obtaining an Neon API key, see [Authentication](https://api-docs.neon.tech/reference/authentication), in the _Neon API Reference_.\n\n## Configure autocompletion\n\nThe Neon CLI supports autocompletion, which you can configure in a few easy steps. See [Neon CLI commands — completion](https://neon.tech/docs/reference/cli-completion) for instructions.\n\n## Commands\n\n| Command                                                                    | Subcommands                                                                                 | Description                  |\n| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------- |\n| [auth](https://neon.com/docs/reference/cli-auth)                           |                                                                                             | Authenticate                 |\n| [projects](https://neon.com/docs/reference/cli-projects)                   | `list`, `create`, `update`, `delete`, `get`                                                 | Manage projects              |\n| [ip-allow](https://neon.com/docs/reference/cli-ip-allow)                   | `list`, `add`, `remove`, `reset`                                                            | Manage IP Allow              |\n| [me](https://neon.com/docs/reference/cli-me)                               |                                                                                             | Show current user            |\n| [branches](https://neon.com/docs/reference/cli-branches)                   | `list`, `create`, `rename`, `add-compute`, `set-default`, `set-expiration`, `delete`, `get` | Manage branches              |\n| [databases](https://neon.com/docs/reference/cli-databases)                 | `list`, `create`, `delete`                                                                  | Manage databases             |\n| [roles](https://neon.com/docs/reference/cli-roles)                         | `list`, `create`, `delete`                                                                  | Manage roles                 |\n| [operations](https://neon.com/docs/reference/cli-operations)               | `list`                                                                                      | Manage operations            |\n| [connection-string](https://neon.com/docs/reference/cli-connection-string) |                                                                                             | Get connection string        |\n| [set-context](https://neon.com/docs/reference/cli-set-context)             |                                                                                             | Set context for session      |\n| [completion](https://neon.com/docs/reference/cli-completion)               |                                                                                             | Generate a completion script |\n\n## Global options\n\nGlobal options are supported with any Neon CLI command.\n\n| Option                      | Description                                                 | Type    | Default                        |\n| :-------------------------- | :---------------------------------------------------------- | :------ | :----------------------------- |\n| [-o, --output](#output)     | Set the Neon CLI output format (`json`, `yaml`, or `table`) | string  | table                          |\n| [--config-dir](#config-dir) | Path to the Neon CLI configuration directory                | string  | `/home/\u003cuser\u003e/.config/neonctl` |\n| [--api-key](#api-key)       | Neon API key                                                | string  | \"\"                             |\n| [--analytics](#analytics)   | Manage analytics                                            | boolean | true                           |\n| [-v, --version](#version)   | Show the Neon CLI version number                            | boolean | -                              |\n| [-h, --help](#help)         | Show the Neon CLI help                                      | boolean | -                              |\n\n- \u003ca id=\"output\"\u003e\u003c/a\u003e`-o, --output`\n\n  Sets the output format. Supported options are `json`, `yaml`, and `table`. The default is `table`. Table output may be limited. The `json` and `yaml` output formats show all data.\n\n  ```bash\n  neonctl me --output json\n  ```\n\n- \u003ca id=\"config-dir\"\u003e\u003c/a\u003e`--config-dir`\n\n  Specifies the path to the `neonctl` configuration directory. To view the default configuration directory containing you `credentials.json` file, run `neonctl --help`. The credentials file is created when you authenticate using the `neonctl auth` command. This option is only necessary if you move your `neonctl` configuration file to a location other than the default.\n\n  ```bash\n  neonctl projects list --config-dir /home/dtprice/.config/neonctl\n  ```\n\n- \u003ca id=\"api-key\"\u003e\u003c/a\u003e`--api-key`\n\n  Specifies your Neon API key. You can authenticate using a Neon API key when running a Neon CLI command instead of using `neonctl auth`. For information about obtaining an Neon API key, see [Authentication](https://api-docs.neon.tech/reference/authentication), in the _Neon API Reference_.\n\n  ```bash\n  neonctl \u003ccommand\u003e --api-key \u003cneon_api_key\u003e\n  ```\n\n- \u003ca id=\"analytics\"\u003e\u003c/a\u003e`--analytics`\n\n  Analytics are enabled by default to gather information about the CLI commands and options that are used by our customers. This data collection assists in offering support, and allows for a better understanding of typical usage patterns so that we can improve user experience. Neon does not collect user-defined data, such as project IDs or command payloads. To opt-out of analytics data collection, specify `--no-analytics` or `--analytics false`.\n\n- \u003ca id=\"version\"\u003e\u003c/a\u003e`-v, --version`\n\n  Shows the Neon CLI version number.\n\n  ```bash\n  $ neonctl --version\n  1.15.0\n  ```\n\n- \u003ca id=\"help\"\u003e\u003c/a\u003e`-h, --help`\n\n  Shows the `neonctl` command-line help. You can view help for `neonctl`, a `neonctl` command, or a `neonctl` subcommand, as shown in the following examples:\n\n  ```bash\n  neonctl --help\n\n  neonctl branches --help\n\n  neonctl branches create --help\n  ```\n\n## Contribute\n\nTo run the CLI locally, execute the build command after making changes:\n\n```shell\nbun install\nbun run build\n```\n\nTo develop continuously:\n\n```shell\nbun run watch\n```\n\nTo run commands from the local build, replace the `neonctl` command with `node dist`; for example:\n\n```shell\nnode dist branches --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneondatabase%2Fneonctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneondatabase%2Fneonctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneondatabase%2Fneonctl/lists"}