nipa-cli 0.1.5 → 0.1.6
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 +50 -10
- package/dist/nipa.js +102 -90
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,26 +1,66 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- contentType: Landing · plan: docs/content-plan.md -->
|
|
2
2
|
|
|
3
|
-
nipa
|
|
3
|
+
<h1 align="center">nipa</h1>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p align="center">Log in to Nipa Cloud once a day. Run OpenStack tools all day.</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://github.com/PunGrumpy/nipa/blob/main/docs/quickstart.md"><strong>Quickstart</strong></a> ·
|
|
9
|
+
<a href="https://github.com/PunGrumpy/nipa/blob/main/docs/cli-reference.md"><strong>CLI reference</strong></a> ·
|
|
10
|
+
<a href="https://github.com/PunGrumpy/nipa/blob/main/docs/troubleshooting.md"><strong>Troubleshooting</strong></a> ·
|
|
11
|
+
<a href="https://github.com/PunGrumpy/nipa/releases/latest"><strong>Releases</strong></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
nipa logs in to Nipa Cloud with your password and a one-time password (OTP) code, then runs `openstack`, `terraform` or any OpenStack tool with that session. You type an OTP code once a day, not once per command.
|
|
17
|
+
|
|
18
|
+
Install nipa from npm. It needs Node.js 22.13 or later:
|
|
8
19
|
|
|
9
20
|
```sh
|
|
10
21
|
npm install -g nipa-cli
|
|
11
22
|
```
|
|
12
23
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Run your first commands
|
|
24
|
+
Without Node.js, download the binary for your platform from the [latest release](https://github.com/PunGrumpy/nipa/releases/latest).
|
|
16
25
|
|
|
17
|
-
Log in, then
|
|
26
|
+
Log in, then run commands with that session:
|
|
18
27
|
|
|
19
28
|
```sh
|
|
20
29
|
nipa login
|
|
21
30
|
nipa server ls
|
|
31
|
+
nipa server inspect web-1
|
|
32
|
+
nipa os volume list
|
|
33
|
+
nipa tf plan
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`nipa server` lists, inspects, starts, stops and restarts your servers, and shows a server's history and console log. `nipa flavor`, `volume`, `network`, `sg`, `ip`, `lb`, `k8s` and `db` list the rest of your project through the API the Space portal calls, which works where `openstack` can't reach a service, such as Kubernetes on production. `nipa sg inspect` shows a security group's rules and the servers that use it. `nipa quota` shows how much of each quota your project uses. `nipa db inspect` says whether a database is healthy and where to connect to it. `nipa lb inspect` shows why a load balancer doesn't serve. `nipa open server web-1` opens a server's page in the Space portal. `nipa os` runs `openstack` and `nipa tf` runs `terraform`. Run `nipa --help` for every command.
|
|
37
|
+
|
|
38
|
+
To use one profile and project in a folder, such as your Terraform code, run `nipa -P staging link my-project` there.
|
|
39
|
+
|
|
40
|
+
When a command fails, run `nipa doctor`. It checks your profile, session and network in one go and says what to fix.
|
|
41
|
+
|
|
42
|
+
## Documentation
|
|
43
|
+
|
|
44
|
+
Pick the page for what you want to do:
|
|
45
|
+
|
|
46
|
+
- [Run your first command with nipa](https://github.com/PunGrumpy/nipa/blob/main/docs/quickstart.md): install, log in and list servers
|
|
47
|
+
- [Use nipa with a staging Keystone](https://github.com/PunGrumpy/nipa/blob/main/docs/profiles.md): add a profile and switch to it
|
|
48
|
+
- [How nipa logs in with MFA](https://github.com/PunGrumpy/nipa/blob/main/docs/how-login-works.md): what nipa sends to Keystone and where it keeps the token
|
|
49
|
+
- [Fix login and session errors](https://github.com/PunGrumpy/nipa/blob/main/docs/troubleshooting.md): find the cause of an error message
|
|
50
|
+
|
|
51
|
+
## Contributing
|
|
52
|
+
|
|
53
|
+
nipa is a TypeScript monorepo that runs on [Bun](https://bun.sh), with the CLI in `packages/cli`. Install the dependencies, then run the checks that CI runs:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
bun install
|
|
57
|
+
bun run test
|
|
58
|
+
bun run check
|
|
59
|
+
bun run typecheck
|
|
22
60
|
```
|
|
23
61
|
|
|
24
|
-
|
|
62
|
+
The tests run against a fake Keystone, so you don't need an account. [Add a command to nipa](https://github.com/PunGrumpy/nipa/blob/main/docs/add-a-command.md) and [Release nipa](https://github.com/PunGrumpy/nipa/blob/main/docs/releasing.md) cover the rest, including [Conventional Commits](https://www.conventionalcommits.org) and changesets.
|
|
63
|
+
|
|
64
|
+
## License
|
|
25
65
|
|
|
26
|
-
|
|
66
|
+
[MIT](https://github.com/PunGrumpy/nipa/blob/main/LICENSE)
|