proxcli 0.7.1__tar.gz → 0.7.2__tar.gz
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.
- {proxcli-0.7.1 → proxcli-0.7.2}/CHANGELOG.md +8 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/PKG-INFO +18 -1
- {proxcli-0.7.1 → proxcli-0.7.2}/README.md +17 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/main.py +55 -1
- {proxcli-0.7.1 → proxcli-0.7.2}/pyproject.toml +1 -1
- {proxcli-0.7.1 → proxcli-0.7.2}/uv.lock +2 -2
- {proxcli-0.7.1 → proxcli-0.7.2}/.env.example +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/.github/workflows/ci.yml +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/.gitignore +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/.python-version +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/AGENTS.md +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/PLAN.md +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/PROJECT.md +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/PROMPT.md +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/TODO.md +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/auth.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/cluster.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/completion.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/container.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/firewall_helpers.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/node.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/pool.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/storage.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/tasks.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/cli/vm.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/client/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/client/auth.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/client/client.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/client/exceptions.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/config/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/config/config.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/config/models.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/output/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/output/formatter.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/output/json_fmt.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/output/table_fmt.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/output/yaml_fmt.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/utils/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/utils/helpers.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/proxmox/utils/logging.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/conftest.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_auth.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_cli/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_cli/test_main.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_client.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_config.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_integration/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_output/__init__.py +0 -0
- {proxcli-0.7.1 → proxcli-0.7.2}/tests/test_output/test_formatter.py +0 -0
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.2] - 2026-06-20
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Helpful hint when global flags are placed after the resource subcommand.
|
|
14
|
+
Running `proxmox vm list --output table` now shows:
|
|
15
|
+
`Error: Global flag '--output' must come before the resource. Try: proxmox --output vm list ...`
|
|
16
|
+
|
|
10
17
|
## [0.7.1] - 2026-06-20
|
|
11
18
|
|
|
12
19
|
### Fixed
|
|
@@ -93,6 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
93
100
|
- CSRF ticket auto-refresh on 401.
|
|
94
101
|
- AI-agent-friendly: default JSON output, strict exit codes, `--dry-run` mode.
|
|
95
102
|
|
|
103
|
+
[0.7.2]: https://github.com/xezpeleta/proxcli/releases/tag/v0.7.2
|
|
96
104
|
[0.7.1]: https://github.com/xezpeleta/proxcli/releases/tag/v0.7.1
|
|
97
105
|
[0.7.0]: https://github.com/xezpeleta/proxcli/releases/tag/v0.7.0
|
|
98
106
|
[0.6.0]: https://github.com/xezpeleta/proxcli/releases/tag/v0.6.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: proxcli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: A CLI tool to interact with Proxmox VE nodes and clusters via the REST API
|
|
5
5
|
Author-email: Xabi Ezpeleta <xezpeleta@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -108,6 +108,23 @@ proxmox vm list --username root@pam --url https://pve:8006
|
|
|
108
108
|
proxmox --insecure vm list
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
+
### Manual config file
|
|
112
|
+
|
|
113
|
+
If you prefer to hand-edit credentials, create `~/.config/proxmox-cli/credentials.json` (chmod 600):
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"url": "https://192.168.1.10:8006",
|
|
118
|
+
"username": "root@pam",
|
|
119
|
+
"auth_method": "api_token",
|
|
120
|
+
"api_token_id": "my-token",
|
|
121
|
+
"api_token_secret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
122
|
+
"verify_tls": false
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
For password auth, use `"auth_method": "password"` with a `"password"` field instead of `api_token_id` / `api_token_secret`.
|
|
127
|
+
|
|
111
128
|
## Command Reference
|
|
112
129
|
|
|
113
130
|
### Global flags
|
|
@@ -85,6 +85,23 @@ proxmox vm list --username root@pam --url https://pve:8006
|
|
|
85
85
|
proxmox --insecure vm list
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
### Manual config file
|
|
89
|
+
|
|
90
|
+
If you prefer to hand-edit credentials, create `~/.config/proxmox-cli/credentials.json` (chmod 600):
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"url": "https://192.168.1.10:8006",
|
|
95
|
+
"username": "root@pam",
|
|
96
|
+
"auth_method": "api_token",
|
|
97
|
+
"api_token_id": "my-token",
|
|
98
|
+
"api_token_secret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
99
|
+
"verify_tls": false
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
For password auth, use `"auth_method": "password"` with a `"password"` field instead of `api_token_id` / `api_token_secret`.
|
|
104
|
+
|
|
88
105
|
## Command Reference
|
|
89
106
|
|
|
90
107
|
### Global flags
|
|
@@ -193,10 +193,64 @@ def _print_command_help(args: argparse.Namespace) -> None:
|
|
|
193
193
|
)
|
|
194
194
|
|
|
195
195
|
|
|
196
|
+
GLOBAL_FLAGS = {
|
|
197
|
+
"--url", "--username", "--password", "--password-stdin", "--api-token",
|
|
198
|
+
"--output", "--dry-run", "--insecure", "--timeout", "--verbose", "--version",
|
|
199
|
+
"-h", "--help",
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
# Flags that take a value (the value follows the flag)
|
|
203
|
+
GLOBAL_FLAGS_WITH_VALUE = {"--url", "--username", "--password", "--api-token", "--output", "--timeout"}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def _hint_global_flags_order(argv: list[str]) -> None:
|
|
207
|
+
"""If user placed global flags after the resource, show a helpful hint."""
|
|
208
|
+
resource_pos = -1
|
|
209
|
+
resources = {"auth", "vm", "node", "pool", "container", "storage", "cluster", "completion", "task"}
|
|
210
|
+
for i, arg in enumerate(argv):
|
|
211
|
+
if arg in resources:
|
|
212
|
+
resource_pos = i
|
|
213
|
+
break
|
|
214
|
+
if resource_pos < 0:
|
|
215
|
+
return
|
|
216
|
+
# Check if any global flag (with or without value) appears after the resource
|
|
217
|
+
for i in range(resource_pos, len(argv)):
|
|
218
|
+
arg = argv[i]
|
|
219
|
+
if arg in GLOBAL_FLAGS:
|
|
220
|
+
# Build a corrected example
|
|
221
|
+
resource_part = argv[resource_pos:]
|
|
222
|
+
flags_before = []
|
|
223
|
+
for j in range(resource_pos):
|
|
224
|
+
if argv[j] in GLOBAL_FLAGS or (j > 0 and argv[j-1] in GLOBAL_FLAGS_WITH_VALUE):
|
|
225
|
+
flags_before.append(argv[j])
|
|
226
|
+
example = f"proxmox {arg} {' '.join(resource_part[:2])} ..."
|
|
227
|
+
log_error(
|
|
228
|
+
f"Global flag '{arg}' must come before the resource. "
|
|
229
|
+
f"Try: {example}"
|
|
230
|
+
)
|
|
231
|
+
return
|
|
232
|
+
# Check if this arg is the value of a previous global flag
|
|
233
|
+
if i > 0 and argv[i-1] in GLOBAL_FLAGS_WITH_VALUE and i-1 > resource_pos:
|
|
234
|
+
log_error(
|
|
235
|
+
f"Global flag '{argv[i-1]}' must come before the resource. "
|
|
236
|
+
f"Try: proxmox {argv[i-1]} {arg} {' '.join(argv[resource_pos:resource_pos+2])} ..."
|
|
237
|
+
)
|
|
238
|
+
return
|
|
239
|
+
|
|
240
|
+
|
|
196
241
|
def main(argv: list[str] | None = None) -> None:
|
|
197
242
|
"""Main entry point."""
|
|
198
243
|
parser = build_root_parser()
|
|
199
|
-
|
|
244
|
+
|
|
245
|
+
effective_argv = argv if argv is not None else sys.argv[1:]
|
|
246
|
+
|
|
247
|
+
try:
|
|
248
|
+
args = parser.parse_args(effective_argv)
|
|
249
|
+
except SystemExit as e:
|
|
250
|
+
# If argparse rejected the args, check for global flags placed after resource
|
|
251
|
+
if effective_argv:
|
|
252
|
+
_hint_global_flags_order(effective_argv)
|
|
253
|
+
sys.exit(e.code if isinstance(e.code, int) else 1)
|
|
200
254
|
|
|
201
255
|
# --help or no subcommand: just show help
|
|
202
256
|
if args.resource is None:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 3
|
|
3
3
|
requires-python = ">=3.10"
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
@@ -254,7 +254,7 @@ wheels = [
|
|
|
254
254
|
|
|
255
255
|
[[package]]
|
|
256
256
|
name = "proxcli"
|
|
257
|
-
version = "0.7.
|
|
257
|
+
version = "0.7.2"
|
|
258
258
|
source = { editable = "." }
|
|
259
259
|
dependencies = [
|
|
260
260
|
{ name = "httpx" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|