@krovacloud/cli 0.3.2 → 0.4.1
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/CHANGELOG.md +12 -0
- package/README.md +87 -6
- package/dist/index.js +1070 -0
- package/dist/index.js.map +1 -0
- package/package.json +40 -23
- package/bin/krova.js +0 -29
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@krovacloud/cli` are documented here.
|
|
4
|
+
|
|
5
|
+
## 0.4.1
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Re-homed into the **krova-node** monorepo. The source now lives at
|
|
10
|
+
`github.com/krovacloud/krova-node` — this release restores npm provenance and
|
|
11
|
+
the correct repository link (the previous per-package repo was made private).
|
|
12
|
+
|
package/README.md
CHANGED
|
@@ -1,16 +1,97 @@
|
|
|
1
1
|
# @krovacloud/cli
|
|
2
2
|
|
|
3
3
|
The **Krova Cloud** command-line interface (`krova`) — manage Cubes (Firecracker
|
|
4
|
-
microVMs), browse the catalog, and
|
|
4
|
+
microVMs), browse the catalog, log in through your browser, and SSH into a Cube,
|
|
5
|
+
all from your terminal. A pure Node.js CLI built on
|
|
6
|
+
[`@krovacloud/sdk`](https://www.npmjs.com/package/@krovacloud/sdk) — no native
|
|
7
|
+
binary, no Go toolchain.
|
|
5
8
|
|
|
6
9
|
```sh
|
|
7
10
|
npm i -g @krovacloud/cli
|
|
8
11
|
krova --help
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
x64 + arm64) — no Go toolchain required. npm selects the correct
|
|
13
|
-
`@krovacloud/cli-<os>-<arch>` binary automatically via its `os`/`cpu` fields.
|
|
14
|
+
Requires Node.js ≥ 20.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
## Log in
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
krova login # browser device-authorization flow
|
|
20
|
+
# or paste an API key:
|
|
21
|
+
krova auth login # prompts (hidden) for a kro_… key
|
|
22
|
+
krova whoami # confirm the active context + space
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Credentials are stored in `~/.config/krova/config.json` (mode `0600`), as named
|
|
26
|
+
**contexts** — switch accounts/spaces like `kubectl`/`aws` profiles. The file
|
|
27
|
+
format is compatible with the previous CLI, so existing logins keep working.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
krova context list
|
|
31
|
+
krova context use <name>
|
|
32
|
+
krova context rename <old> <new>
|
|
33
|
+
krova context delete <name>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Cubes
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
krova list # list Cubes (alias: krova cubes list, ls)
|
|
40
|
+
krova get <cube> # show one Cube (name or ID)
|
|
41
|
+
krova cubes create \
|
|
42
|
+
--name web --image ubuntu-24.04 \
|
|
43
|
+
--vcpu 1 --ram 1 --disk 10 \
|
|
44
|
+
--ssh-key "$(cat ~/.ssh/id_ed25519.pub)"
|
|
45
|
+
krova cubes sleep <cube>
|
|
46
|
+
krova cubes wake <cube>
|
|
47
|
+
krova cubes ssh-port <cube> --port 2222
|
|
48
|
+
krova cubes delete <cube>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`<cube>` is a Cube **name or ID** — a unique name resolves automatically.
|
|
52
|
+
|
|
53
|
+
## SSH
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
krova ssh <cube> # interactive shell
|
|
57
|
+
krova ssh <cube> -- uname -a # run a command non-interactively
|
|
58
|
+
krova ssh <cube> -i ~/.ssh/id_ed25519 -L 8080:localhost:80
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The CLI fetches the Cube's SSH endpoint and, when the server provides them,
|
|
62
|
+
**pins the host keys** to `~/.config/krova/known_hosts` with strict host-key
|
|
63
|
+
checking (no trust-on-first-use window). The destination is always passed after
|
|
64
|
+
a `--` separator, with host/user validated against option-injection — a hostile
|
|
65
|
+
value aborts before `ssh` ever runs.
|
|
66
|
+
|
|
67
|
+
## Catalog
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
krova regions # regions with available capacity
|
|
71
|
+
krova images # OS images
|
|
72
|
+
krova pricing # per-resource hourly pricing
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Webhooks
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
krova webhooks listen --secret "$KROVA_WEBHOOK_SECRET"
|
|
79
|
+
# verifies each delivery's HMAC signature and prints the event
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Global flags
|
|
83
|
+
|
|
84
|
+
Available on every command (flag > env var > context):
|
|
85
|
+
|
|
86
|
+
| Flag | Env | Purpose |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `--api-key <key>` | `KROVA_API_KEY` | API key |
|
|
89
|
+
| `--space <id>` | `KROVA_SPACE_ID` | Space ID (else auto-detected) |
|
|
90
|
+
| `--base-url <url>` | `KROVA_BASE_URL` | override the API base URL |
|
|
91
|
+
| `--context <name>` | `KROVA_CONTEXT` | select a named context |
|
|
92
|
+
| `--json` | | machine-readable JSON output |
|
|
93
|
+
| `--timeout <dur>` | | per-request timeout (e.g. `30s`) |
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|