neonctl 1.25.3 → 1.25.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -22
- package/commands/auth.js +3 -1
- package/commands/user.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
The Neon CLI
|
|
2
|
-
|
|
3
|
-
The Neon CLI command name is `neonctl`. The GitHub repository for the Neon CLI is found [here](https://github.com/neondatabase/neonctl).
|
|
1
|
+
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).
|
|
4
2
|
|
|
5
3
|
## Install the Neon CLI
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
**npm**
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
```shell
|
|
8
|
+
npm i -g neonctl
|
|
9
|
+
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Requires Node.js 18.0 or higher.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**Howebrew**
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
```shell
|
|
16
|
+
brew install neonctl
|
|
17
|
+
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
**Binary (macOS, Linux, Windows)**
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
npm -v
|
|
23
|
-
```
|
|
21
|
+
Download a binary file [here](https://github.com/neondatabase/neonctl/releases).
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
### Upgrade
|
|
24
|
+
|
|
25
|
+
**npm**
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
```shell
|
|
28
|
+
npm update -g neonctl
|
|
29
|
+
```
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
Requires Node.js 18.0 or higher.
|
|
32
|
+
|
|
33
|
+
**Howebrew**
|
|
30
34
|
|
|
31
35
|
```shell
|
|
32
|
-
|
|
36
|
+
brew upgrade neonctl
|
|
33
37
|
```
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
**Binary (macOS, Linux, Windows)**
|
|
36
40
|
|
|
37
|
-
To upgrade
|
|
41
|
+
To upgrade a binary version, download the latest binary file, as described above, and replace your old binary with the new one.
|
|
38
42
|
|
|
39
43
|
## Connect
|
|
40
44
|
|
|
@@ -70,6 +74,7 @@ The Neon CLI supports autocompletion, which you can configure in a few easy step
|
|
|
70
74
|
| [roles](https://neon.tech/docs/reference/cli-roles) | `list`, `create`, `delete` | Manage roles |
|
|
71
75
|
| [operations](https://neon.tech/reference/cli-operations) | `list` | Manage operations |
|
|
72
76
|
| [connection-string](https://neon.tech/reference/cli-connection-string) | | Get connection string |
|
|
77
|
+
| [set-context](https://neon.tech/reference/cli-set-context) | | Set context for session |
|
|
73
78
|
| [completion](https://neon.tech/reference/cli-completion) | | Generate a completion script |
|
|
74
79
|
|
|
75
80
|
## Global options
|
|
@@ -136,7 +141,7 @@ Global options are supported with any Neon CLI command.
|
|
|
136
141
|
|
|
137
142
|
## Contribute
|
|
138
143
|
|
|
139
|
-
To run the CLI locally execute build command after making changes:
|
|
144
|
+
To run the CLI locally, execute the build command after making changes:
|
|
140
145
|
|
|
141
146
|
```shell
|
|
142
147
|
npm run build
|
|
@@ -148,7 +153,7 @@ To develop continuously:
|
|
|
148
153
|
npm run watch
|
|
149
154
|
```
|
|
150
155
|
|
|
151
|
-
To run commands from the local build replace the `neonctl` command with `node dist
|
|
156
|
+
To run commands from the local build, replace the `neonctl` command with `node dist`; for example:
|
|
152
157
|
|
|
153
158
|
```shell
|
|
154
159
|
node dist branches --help
|
package/commands/auth.js
CHANGED
|
@@ -9,7 +9,9 @@ import { CREDENTIALS_FILE } from '../config.js';
|
|
|
9
9
|
export const command = 'auth';
|
|
10
10
|
export const aliases = ['login'];
|
|
11
11
|
export const describe = 'Authenticate';
|
|
12
|
-
export const builder = (yargs) => yargs
|
|
12
|
+
export const builder = (yargs) => yargs.option('context-file', {
|
|
13
|
+
hidden: true,
|
|
14
|
+
});
|
|
13
15
|
export const handler = async (args) => {
|
|
14
16
|
await authFlow(args);
|
|
15
17
|
};
|
package/commands/user.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { writer } from '../writer.js';
|
|
2
2
|
export const command = 'me';
|
|
3
3
|
export const describe = 'Show current user';
|
|
4
|
-
export const builder = (yargs) => yargs
|
|
4
|
+
export const builder = (yargs) => yargs.option('context-file', {
|
|
5
|
+
hidden: true,
|
|
6
|
+
});
|
|
5
7
|
export const handler = async (args) => {
|
|
6
8
|
await me(args);
|
|
7
9
|
};
|