@fredlackey/cli-proxmox 0.0.2 → 0.0.3

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 CHANGED
@@ -8,29 +8,30 @@ Command-line interface for [Proxmox VE](https://www.proxmox.com/en/proxmox-virtu
8
8
  npm install -g @fredlackey/cli-proxmox
9
9
  ```
10
10
 
11
- ## Configure
11
+ ## Usage
12
+
13
+ Every command accepts credentials directly as flags. No setup step is required.
12
14
 
13
15
  ```
14
- proxmox configure \
16
+ proxmox vm list \
15
17
  --base-url https://pve.example.com:8006 \
16
18
  --token-id 'root@pam!terraform-token' \
17
- --token-secret <secret> \
18
- --default-node pm-b
19
- ```
20
-
21
- Running `proxmox configure` without flags prompts for each value interactively. Credentials are stored in `~/.config/cli-proxmox/config.json` and that file is the only config source. There are no environment variables to set.
22
-
23
- TLS certificate verification is disabled by default since Proxmox typically uses self-signed certs. Pass `--verify-ssl` to `configure` if you have a properly signed certificate.
19
+ --token-secret <secret>
24
20
 
25
- ## Usage
26
-
27
- ```
28
- proxmox vm list
29
21
  proxmox vm clone \
22
+ --base-url https://pve.example.com:8006 \
23
+ --token-id 'root@pam!terraform-token' \
24
+ --token-secret <secret> \
30
25
  --vmid 9000 \
31
26
  --newid 200 \
32
27
  --name web-prod \
33
28
  --full
29
+ ```
30
+
31
+ If you've already run `proxmox configure`, you can omit the credential flags:
32
+
33
+ ```
34
+ proxmox vm list
34
35
  proxmox snapshot create \
35
36
  --vmid 200 \
36
37
  --snapname before-upgrade \
@@ -39,6 +40,30 @@ proxmox storage content --storage local --content iso
39
40
  proxmox task wait --upid <upid> --timeout 120
40
41
  ```
41
42
 
43
+ ## Configure (Optional)
44
+
45
+ **The `configure` command is optional.** Every command accepts credentials directly as flags (e.g. `--base-url`, `--token-id`, `--token-secret`). You never need to run `configure` to use this tool. It exists as a convenience so you don't have to pass the same flags on every invocation.
46
+
47
+ ```
48
+ proxmox configure \
49
+ --base-url https://pve.example.com:8006 \
50
+ --token-id 'root@pam!terraform-token' \
51
+ --token-secret <secret> \
52
+ --default-node pm-b
53
+ ```
54
+
55
+ Running `proxmox configure` without flags prompts for each value interactively. Credentials are stored in `~/.config/cli-proxmox/config.json` and that file is the only config source. There are no environment variables to set.
56
+
57
+ TLS certificate verification is disabled by default since Proxmox typically uses self-signed certs. Pass `--verify-ssl` to `configure` if you have a properly signed certificate.
58
+
59
+ If a required credential is missing at runtime, the error tells you exactly what to do:
60
+
61
+ ```json
62
+ {
63
+ "error": "Missing required value: --token-id. Pass it as a flag or run \"proxmox configure\"."
64
+ }
65
+ ```
66
+
42
67
  ## Full Command Reference
43
68
 
44
69
  For the complete list of commands and flags, see [COMMANDS.md](COMMANDS.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fredlackey/cli-proxmox",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "AI-first CLI for managing Proxmox VE nodes, VMs, storage, and snapshots",
5
5
  "author": {
6
6
  "name": "Fred Lackey",
@@ -124,7 +124,7 @@ export function resolveNode(opts, creds) {
124
124
  if (opts && opts.node) return opts.node;
125
125
  if (creds && creds.defaultNode) return creds.defaultNode;
126
126
  const err = new Error(
127
- 'No node specified. Pass --node <name> or set a defaultNode in ~/.config/cli-proxmox/config.json.'
127
+ 'No node specified. Pass --node <name> or run "proxmox configure" to set a defaultNode.'
128
128
  );
129
129
  err.code = 'missing_required_value';
130
130
  err.detail = { key: 'node', flag: '--node' };