qualys-cli 0.1.1__tar.gz → 0.1.3__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.
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/CHANGELOG.md +31 -1
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/PKG-INFO +36 -84
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/README.md +33 -78
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/pyproject.toml +3 -10
- {qualys_cli-0.1.1/docs → qualys_cli-0.1.3/src/qualys_cli/_docs}/usage.html +9 -7
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/cli.py +1 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/asset.py +25 -4
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/ca.py +43 -5
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/pm.py +9 -3
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/user.py +4 -1
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/vm.py +3 -1
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/extras.py +46 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_asset.py +54 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_ca.py +36 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_features.py +28 -0
- qualys_cli-0.1.3/tests/test_pm.py +100 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_user.py +34 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_vm.py +24 -0
- qualys_cli-0.1.1/tests/test_pm.py +0 -57
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/.gitignore +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/LICENSE +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/__init__.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/__main__.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/audit.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/auth.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/cache.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/client.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/__init__.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/cs.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/csam.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/etm.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/pc.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/scanauth.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/sub.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/tc.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/commands/was.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/config.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/flair.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/formatters.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/history.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/http_server.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/mcp_server.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/metrics.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/platforms.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/src/qualys_cli/queries.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/__init__.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/conftest.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_agent_mode.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_all_commands_smoke.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_audit.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_client.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_csam.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_error_handling.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_etm.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_flair.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_formatters.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_global_flags.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_help.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_high_fixes.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_main.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_med_fixes.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_pc.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_resiliency.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_scanauth.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_security_fixes.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_sub.py +0 -0
- {qualys_cli-0.1.1 → qualys_cli-0.1.3}/tests/test_tc.py +0 -0
|
@@ -6,6 +6,35 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.3] — 2026-07-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `ca agent list` and `ca agent count` now accept `--status Active|Inactive`,
|
|
13
|
+
mapped to the Qualys `agentInfo.status` (`STATUS_ACTIVE`/`STATUS_INACTIVE`)
|
|
14
|
+
search criterion.
|
|
15
|
+
- `qualys-cli docs` command — locates or opens the bundled HTML command
|
|
16
|
+
reference that ships inside the package (`--open`/`--no-open`/`--stdout`).
|
|
17
|
+
The sub-app existed but was never registered on the CLI.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- `asset ip add` failed with HTTP 400 because it never sent a module flag. It
|
|
21
|
+
now sends `enable_vm=1` by default and exposes `--vm/--no-vm`, `--pc`,
|
|
22
|
+
`--sca`, and `--certview` (at least one is required by the API).
|
|
23
|
+
- `vm option-profile delete` sent the profile ID under `ids`; the API requires
|
|
24
|
+
the singular `id`, so deletes returned HTTP 400.
|
|
25
|
+
- `user create` never sent `action=add`, which the `/msp/user.php` API requires
|
|
26
|
+
to create a user.
|
|
27
|
+
- `pm job create` and `pm job update` now send the API-required `type` field;
|
|
28
|
+
`pm job change-status` posts job IDs under `ids` (was the wrong key `jobIds`).
|
|
29
|
+
- Corrected the README instructions for locating the bundled usage reference
|
|
30
|
+
(the old `sys.prefix/share/...` path was never where the file shipped).
|
|
31
|
+
|
|
32
|
+
## [0.1.2] — 2026-07-08
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- Metadata-only republish: simplified `[project.urls]`/description in
|
|
36
|
+
`pyproject.toml`. No functional changes from 0.1.1.
|
|
37
|
+
|
|
9
38
|
## [0.1.1] — 2026-07-08
|
|
10
39
|
|
|
11
40
|
### Security
|
|
@@ -102,6 +131,7 @@ Initial public release.
|
|
|
102
131
|
- Ruff lint clean (E, F, I, UP, B, C4, SIM rule sets).
|
|
103
132
|
- Codegen pipeline (`scripts/`) is opt-in via the `codegen` extra.
|
|
104
133
|
|
|
105
|
-
[Unreleased]: https://github.com/qualys/qualys-cli/compare/v0.1.
|
|
134
|
+
[Unreleased]: https://github.com/qualys/qualys-cli/compare/v0.1.2...HEAD
|
|
135
|
+
[0.1.2]: https://github.com/qualys/qualys-cli/compare/v0.1.1...v0.1.2
|
|
106
136
|
[0.1.1]: https://github.com/qualys/qualys-cli/compare/v0.1.0...v0.1.1
|
|
107
137
|
[0.1.0]: https://github.com/qualys/qualys-cli/releases/tag/v0.1.0
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qualys-cli
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary:
|
|
5
|
-
Project-URL: Homepage, https://
|
|
6
|
-
Project-URL: Documentation, https://github.com/qualys/qualys-cli#readme
|
|
7
|
-
Project-URL: Issues, https://github.com/qualys/qualys-cli/issues
|
|
8
|
-
Project-URL: Changelog, https://github.com/qualys/qualys-cli/blob/main/CHANGELOG.md
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Unified command-line interface for the Qualys Cloud Platform REST APIs (VM, PC, PM, ETM, WAS, TotalCloud, Cloud Agent, Container Security, CSAM, Subscription, Asset, and User management).
|
|
5
|
+
Project-URL: Homepage, https://www.qualys.com
|
|
9
6
|
Author: qualys-cli contributors
|
|
10
7
|
License: MIT License
|
|
11
8
|
|
|
@@ -67,17 +64,16 @@ Description-Content-Type: text/markdown
|
|
|
67
64
|
|
|
68
65
|
# qualys-cli
|
|
69
66
|
|
|
70
|
-
[](https://github.com/qualys/qualys-cli/actions/workflows/ci.yml)
|
|
71
67
|
[](https://pypi.org/project/qualys-cli/)
|
|
72
68
|
[](https://pypi.org/project/qualys-cli/)
|
|
73
|
-
[](
|
|
69
|
+
[](https://pypi.org/project/qualys-cli/)
|
|
74
70
|
|
|
75
|
-
A unified command-line interface for the Qualys REST APIs —
|
|
76
|
-
Patch Management, ETM, WAS, TotalCloud (TC), Cloud Agent (CA),
|
|
77
|
-
Security (CS), CSAM, Subscription, Asset, and User management. Rich
|
|
78
|
-
output, JSON / YAML / JSONL export, automatic retry with backoff, JWT
|
|
79
|
-
refresh, OS-keyring credential storage, and a clean machine-readable mode
|
|
80
|
-
scripting and AI agents.
|
|
71
|
+
A unified command-line interface for the Qualys Cloud Platform REST APIs —
|
|
72
|
+
covering VM, PC, Patch Management, ETM, WAS, TotalCloud (TC), Cloud Agent (CA),
|
|
73
|
+
Container Security (CS), CSAM, Subscription, Asset, and User management. Rich
|
|
74
|
+
table output, JSON / YAML / JSONL export, automatic retry with backoff, JWT
|
|
75
|
+
auto-refresh, OS-keyring credential storage, and a clean machine-readable mode
|
|
76
|
+
for scripting and AI agents.
|
|
81
77
|
|
|
82
78
|
```text
|
|
83
79
|
╭─────────────────────────────────────────────────╮
|
|
@@ -87,22 +83,17 @@ scripting and AI agents.
|
|
|
87
83
|
╰─────────────────────────────────────────────────╯
|
|
88
84
|
```
|
|
89
85
|
|
|
90
|
-
##
|
|
86
|
+
## Installation
|
|
91
87
|
|
|
92
88
|
```bash
|
|
93
|
-
#
|
|
89
|
+
# Recommended — isolated install
|
|
94
90
|
pipx install qualys-cli
|
|
95
91
|
|
|
96
|
-
# Or
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
# Development
|
|
100
|
-
git clone https://github.com/qualys/qualys-cli && cd qualys-cli
|
|
101
|
-
uv sync
|
|
102
|
-
uv run qualys-cli --help
|
|
92
|
+
# Or into the current environment
|
|
93
|
+
pip install qualys-cli
|
|
103
94
|
```
|
|
104
95
|
|
|
105
|
-
Python 3.11
|
|
96
|
+
Python 3.11 or newer. Works on macOS, Linux, and Windows.
|
|
106
97
|
|
|
107
98
|
## Quick start
|
|
108
99
|
|
|
@@ -116,7 +107,7 @@ qualys-cli was webapp list
|
|
|
116
107
|
qualys-cli pm job list --format json
|
|
117
108
|
```
|
|
118
109
|
|
|
119
|
-
### Non-interactive setup
|
|
110
|
+
### Non-interactive setup
|
|
120
111
|
|
|
121
112
|
```bash
|
|
122
113
|
qualys-cli configure \
|
|
@@ -137,9 +128,9 @@ Multiple profiles via `--profile <name>` or `QUALYS_PROFILE`. List with `qualys-
|
|
|
137
128
|
|
|
138
129
|
The CLI has two top-level modes that govern the *default* output style:
|
|
139
130
|
|
|
140
|
-
| Mode | Default output | Spinners / colours | Use case
|
|
141
|
-
|
|
142
|
-
| `interactive` | Rich table (first 25 rows) | Yes | Humans in a terminal
|
|
131
|
+
| Mode | Default output | Spinners / colours | Use case |
|
|
132
|
+
|---------------|---------------------------------|--------------------|-------------------------------|
|
|
133
|
+
| `interactive` | Rich table (first 25 rows) | Yes | Humans in a terminal |
|
|
143
134
|
| `agentic` | JSON, no decoration | No | Scripts, pipelines, AI agents |
|
|
144
135
|
|
|
145
136
|
Switch the persistent default for a profile:
|
|
@@ -156,15 +147,15 @@ Or set per-shell with `export QUALYS_OUTPUT_MODE=agentic`.
|
|
|
156
147
|
|
|
157
148
|
These work on every command and override the mode default:
|
|
158
149
|
|
|
159
|
-
| Flag | Behaviour
|
|
160
|
-
|
|
161
|
-
| `--format json` | Full JSON to stdout
|
|
162
|
-
| `--format jsonl` | One flattened JSON object per line (JSON Lines / NDJSON)
|
|
163
|
-
| `--format yaml` | YAML to stdout
|
|
164
|
-
| `--format table` | Rich table (forced)
|
|
165
|
-
| `--limit 0` | Remove the default 25-row cap
|
|
166
|
-
| `--output-file results.json` | Dump full data to file (extension picks JSON or YAML)
|
|
167
|
-
| `-v`, `-vv` | Log requests (and response sizes); secrets never logged
|
|
150
|
+
| Flag | Behaviour |
|
|
151
|
+
|-------------------------------|--------------------------------------------------------------|
|
|
152
|
+
| `--format json` | Full JSON to stdout |
|
|
153
|
+
| `--format jsonl` | One flattened JSON object per line (JSON Lines / NDJSON) |
|
|
154
|
+
| `--format yaml` | YAML to stdout |
|
|
155
|
+
| `--format table` | Rich table (forced) |
|
|
156
|
+
| `--limit 0` | Remove the default 25-row cap |
|
|
157
|
+
| `--output-file results.json` | Dump full data to file (extension picks JSON or YAML) |
|
|
158
|
+
| `-v`, `-vv` | Log requests (and response sizes); secrets never logged |
|
|
168
159
|
|
|
169
160
|
## Examples by module
|
|
170
161
|
|
|
@@ -226,15 +217,16 @@ qualys-cli user create --username jdoe --first-name Jane --last-name Doe \
|
|
|
226
217
|
Tip: append `--help` to any command (e.g. `qualys-cli was scan launch --help`)
|
|
227
218
|
for the full flag set.
|
|
228
219
|
|
|
229
|
-
##
|
|
220
|
+
## Bundled documentation
|
|
230
221
|
|
|
231
|
-
A comprehensive usage reference
|
|
232
|
-
|
|
233
|
-
|
|
222
|
+
A comprehensive HTML usage reference covering every command ships inside the
|
|
223
|
+
package. The `docs` command finds and opens it — no path guessing required, and
|
|
224
|
+
it works identically for `pip` and `pipx` installs:
|
|
234
225
|
|
|
235
|
-
To find it after installation:
|
|
236
226
|
```bash
|
|
237
|
-
|
|
227
|
+
qualys-cli docs # open the reference in your default browser
|
|
228
|
+
qualys-cli docs --no-open # just print the file path (and size)
|
|
229
|
+
qualys-cli docs --stdout # write the raw HTML to stdout (pipe it anywhere)
|
|
238
230
|
```
|
|
239
231
|
|
|
240
232
|
## LLM / agent usage
|
|
@@ -274,46 +266,6 @@ qualys-cli --profile nonexistent vm host list 2>/tmp/err.json
|
|
|
274
266
|
JWT tokens are fetched via `POST /auth`, cached in `config.toml`, and
|
|
275
267
|
auto-refreshed on 401.
|
|
276
268
|
|
|
277
|
-
## Development
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
uv sync
|
|
281
|
-
uv run pytest # tests
|
|
282
|
-
uv run ruff check src/ # lint
|
|
283
|
-
uv run mypy src/ # type check
|
|
284
|
-
uv run qualys-cli --help # smoke
|
|
285
|
-
uv build # build sdist + wheel into dist/
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
### Regenerating commands from Qualys docs
|
|
289
|
-
|
|
290
|
-
The codegen pipeline is opt-in via the `codegen` extra (it pulls in
|
|
291
|
-
`anthropic`, `trafilatura`, `selectolax`, `pypdf`):
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
uv sync --extra codegen
|
|
295
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
296
|
-
uv run scripts/ingest_docs.py # cache HTML pages
|
|
297
|
-
uv run scripts/extract_endpoints.py # LLM extraction → api-model.json
|
|
298
|
-
uv run scripts/generate_commands.py # regenerate commands/*.py
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
Generated files are marked with `# Auto-generated from api-model.json` and are
|
|
302
|
-
safe to overwrite. Files without that header are treated as hand-edited and
|
|
303
|
-
left alone.
|
|
304
|
-
|
|
305
|
-
## Releasing
|
|
306
|
-
|
|
307
|
-
Releases are published to PyPI by GitHub Actions on a tag push:
|
|
308
|
-
|
|
309
|
-
```bash
|
|
310
|
-
# Bump version in pyproject.toml, update CHANGELOG.md, commit
|
|
311
|
-
git tag v0.1.1 && git push --tags
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
PyPI publishing uses Trusted Publishing (OIDC) — no API token is stored.
|
|
315
|
-
Configure once at https://pypi.org/manage/project/qualys-cli/settings/publishing/.
|
|
316
|
-
|
|
317
269
|
## License
|
|
318
270
|
|
|
319
|
-
|
|
271
|
+
MIT
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
# qualys-cli
|
|
2
2
|
|
|
3
|
-
[](https://github.com/qualys/qualys-cli/actions/workflows/ci.yml)
|
|
4
3
|
[](https://pypi.org/project/qualys-cli/)
|
|
5
4
|
[](https://pypi.org/project/qualys-cli/)
|
|
6
|
-
[](
|
|
5
|
+
[](https://pypi.org/project/qualys-cli/)
|
|
7
6
|
|
|
8
|
-
A unified command-line interface for the Qualys REST APIs —
|
|
9
|
-
Patch Management, ETM, WAS, TotalCloud (TC), Cloud Agent (CA),
|
|
10
|
-
Security (CS), CSAM, Subscription, Asset, and User management. Rich
|
|
11
|
-
output, JSON / YAML / JSONL export, automatic retry with backoff, JWT
|
|
12
|
-
refresh, OS-keyring credential storage, and a clean machine-readable mode
|
|
13
|
-
scripting and AI agents.
|
|
7
|
+
A unified command-line interface for the Qualys Cloud Platform REST APIs —
|
|
8
|
+
covering VM, PC, Patch Management, ETM, WAS, TotalCloud (TC), Cloud Agent (CA),
|
|
9
|
+
Container Security (CS), CSAM, Subscription, Asset, and User management. Rich
|
|
10
|
+
table output, JSON / YAML / JSONL export, automatic retry with backoff, JWT
|
|
11
|
+
auto-refresh, OS-keyring credential storage, and a clean machine-readable mode
|
|
12
|
+
for scripting and AI agents.
|
|
14
13
|
|
|
15
14
|
```text
|
|
16
15
|
╭─────────────────────────────────────────────────╮
|
|
@@ -20,22 +19,17 @@ scripting and AI agents.
|
|
|
20
19
|
╰─────────────────────────────────────────────────╯
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## Installation
|
|
24
23
|
|
|
25
24
|
```bash
|
|
26
|
-
#
|
|
25
|
+
# Recommended — isolated install
|
|
27
26
|
pipx install qualys-cli
|
|
28
27
|
|
|
29
|
-
# Or
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
# Development
|
|
33
|
-
git clone https://github.com/qualys/qualys-cli && cd qualys-cli
|
|
34
|
-
uv sync
|
|
35
|
-
uv run qualys-cli --help
|
|
28
|
+
# Or into the current environment
|
|
29
|
+
pip install qualys-cli
|
|
36
30
|
```
|
|
37
31
|
|
|
38
|
-
Python 3.11
|
|
32
|
+
Python 3.11 or newer. Works on macOS, Linux, and Windows.
|
|
39
33
|
|
|
40
34
|
## Quick start
|
|
41
35
|
|
|
@@ -49,7 +43,7 @@ qualys-cli was webapp list
|
|
|
49
43
|
qualys-cli pm job list --format json
|
|
50
44
|
```
|
|
51
45
|
|
|
52
|
-
### Non-interactive setup
|
|
46
|
+
### Non-interactive setup
|
|
53
47
|
|
|
54
48
|
```bash
|
|
55
49
|
qualys-cli configure \
|
|
@@ -70,9 +64,9 @@ Multiple profiles via `--profile <name>` or `QUALYS_PROFILE`. List with `qualys-
|
|
|
70
64
|
|
|
71
65
|
The CLI has two top-level modes that govern the *default* output style:
|
|
72
66
|
|
|
73
|
-
| Mode | Default output | Spinners / colours | Use case
|
|
74
|
-
|
|
75
|
-
| `interactive` | Rich table (first 25 rows) | Yes | Humans in a terminal
|
|
67
|
+
| Mode | Default output | Spinners / colours | Use case |
|
|
68
|
+
|---------------|---------------------------------|--------------------|-------------------------------|
|
|
69
|
+
| `interactive` | Rich table (first 25 rows) | Yes | Humans in a terminal |
|
|
76
70
|
| `agentic` | JSON, no decoration | No | Scripts, pipelines, AI agents |
|
|
77
71
|
|
|
78
72
|
Switch the persistent default for a profile:
|
|
@@ -89,15 +83,15 @@ Or set per-shell with `export QUALYS_OUTPUT_MODE=agentic`.
|
|
|
89
83
|
|
|
90
84
|
These work on every command and override the mode default:
|
|
91
85
|
|
|
92
|
-
| Flag | Behaviour
|
|
93
|
-
|
|
94
|
-
| `--format json` | Full JSON to stdout
|
|
95
|
-
| `--format jsonl` | One flattened JSON object per line (JSON Lines / NDJSON)
|
|
96
|
-
| `--format yaml` | YAML to stdout
|
|
97
|
-
| `--format table` | Rich table (forced)
|
|
98
|
-
| `--limit 0` | Remove the default 25-row cap
|
|
99
|
-
| `--output-file results.json` | Dump full data to file (extension picks JSON or YAML)
|
|
100
|
-
| `-v`, `-vv` | Log requests (and response sizes); secrets never logged
|
|
86
|
+
| Flag | Behaviour |
|
|
87
|
+
|-------------------------------|--------------------------------------------------------------|
|
|
88
|
+
| `--format json` | Full JSON to stdout |
|
|
89
|
+
| `--format jsonl` | One flattened JSON object per line (JSON Lines / NDJSON) |
|
|
90
|
+
| `--format yaml` | YAML to stdout |
|
|
91
|
+
| `--format table` | Rich table (forced) |
|
|
92
|
+
| `--limit 0` | Remove the default 25-row cap |
|
|
93
|
+
| `--output-file results.json` | Dump full data to file (extension picks JSON or YAML) |
|
|
94
|
+
| `-v`, `-vv` | Log requests (and response sizes); secrets never logged |
|
|
101
95
|
|
|
102
96
|
## Examples by module
|
|
103
97
|
|
|
@@ -159,15 +153,16 @@ qualys-cli user create --username jdoe --first-name Jane --last-name Doe \
|
|
|
159
153
|
Tip: append `--help` to any command (e.g. `qualys-cli was scan launch --help`)
|
|
160
154
|
for the full flag set.
|
|
161
155
|
|
|
162
|
-
##
|
|
156
|
+
## Bundled documentation
|
|
163
157
|
|
|
164
|
-
A comprehensive usage reference
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
A comprehensive HTML usage reference covering every command ships inside the
|
|
159
|
+
package. The `docs` command finds and opens it — no path guessing required, and
|
|
160
|
+
it works identically for `pip` and `pipx` installs:
|
|
167
161
|
|
|
168
|
-
To find it after installation:
|
|
169
162
|
```bash
|
|
170
|
-
|
|
163
|
+
qualys-cli docs # open the reference in your default browser
|
|
164
|
+
qualys-cli docs --no-open # just print the file path (and size)
|
|
165
|
+
qualys-cli docs --stdout # write the raw HTML to stdout (pipe it anywhere)
|
|
171
166
|
```
|
|
172
167
|
|
|
173
168
|
## LLM / agent usage
|
|
@@ -207,46 +202,6 @@ qualys-cli --profile nonexistent vm host list 2>/tmp/err.json
|
|
|
207
202
|
JWT tokens are fetched via `POST /auth`, cached in `config.toml`, and
|
|
208
203
|
auto-refreshed on 401.
|
|
209
204
|
|
|
210
|
-
## Development
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
uv sync
|
|
214
|
-
uv run pytest # tests
|
|
215
|
-
uv run ruff check src/ # lint
|
|
216
|
-
uv run mypy src/ # type check
|
|
217
|
-
uv run qualys-cli --help # smoke
|
|
218
|
-
uv build # build sdist + wheel into dist/
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Regenerating commands from Qualys docs
|
|
222
|
-
|
|
223
|
-
The codegen pipeline is opt-in via the `codegen` extra (it pulls in
|
|
224
|
-
`anthropic`, `trafilatura`, `selectolax`, `pypdf`):
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
uv sync --extra codegen
|
|
228
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
229
|
-
uv run scripts/ingest_docs.py # cache HTML pages
|
|
230
|
-
uv run scripts/extract_endpoints.py # LLM extraction → api-model.json
|
|
231
|
-
uv run scripts/generate_commands.py # regenerate commands/*.py
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Generated files are marked with `# Auto-generated from api-model.json` and are
|
|
235
|
-
safe to overwrite. Files without that header are treated as hand-edited and
|
|
236
|
-
left alone.
|
|
237
|
-
|
|
238
|
-
## Releasing
|
|
239
|
-
|
|
240
|
-
Releases are published to PyPI by GitHub Actions on a tag push:
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
# Bump version in pyproject.toml, update CHANGELOG.md, commit
|
|
244
|
-
git tag v0.1.1 && git push --tags
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
PyPI publishing uses Trusted Publishing (OIDC) — no API token is stored.
|
|
248
|
-
Configure once at https://pypi.org/manage/project/qualys-cli/settings/publishing/.
|
|
249
|
-
|
|
250
205
|
## License
|
|
251
206
|
|
|
252
|
-
|
|
207
|
+
MIT
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qualys-cli"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.1.3"
|
|
8
|
+
description = "Unified command-line interface for the Qualys Cloud Platform REST APIs (VM, PC, PM, ETM, WAS, TotalCloud, Cloud Agent, Container Security, CSAM, Subscription, Asset, and User management)."
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
license = { file = "LICENSE" }
|
|
11
11
|
requires-python = ">=3.11"
|
|
@@ -65,10 +65,7 @@ codegen = [
|
|
|
65
65
|
qualys-cli = "qualys_cli.cli:main"
|
|
66
66
|
|
|
67
67
|
[project.urls]
|
|
68
|
-
Homepage
|
|
69
|
-
Documentation = "https://github.com/qualys/qualys-cli#readme"
|
|
70
|
-
Issues = "https://github.com/qualys/qualys-cli/issues"
|
|
71
|
-
Changelog = "https://github.com/qualys/qualys-cli/blob/main/CHANGELOG.md"
|
|
68
|
+
Homepage = "https://www.qualys.com"
|
|
72
69
|
|
|
73
70
|
[dependency-groups]
|
|
74
71
|
dev = [
|
|
@@ -84,9 +81,6 @@ dev = [
|
|
|
84
81
|
[tool.hatch.build.targets.wheel]
|
|
85
82
|
packages = ["src/qualys_cli"]
|
|
86
83
|
|
|
87
|
-
[tool.hatch.build.targets.wheel.shared-data]
|
|
88
|
-
"docs/usage.html" = "share/qualys-cli/docs/usage.html"
|
|
89
|
-
|
|
90
84
|
[tool.hatch.build.targets.sdist]
|
|
91
85
|
include = [
|
|
92
86
|
"src/qualys_cli",
|
|
@@ -95,7 +89,6 @@ include = [
|
|
|
95
89
|
"CHANGELOG.md",
|
|
96
90
|
"LICENSE",
|
|
97
91
|
"pyproject.toml",
|
|
98
|
-
"docs/usage.html",
|
|
99
92
|
]
|
|
100
93
|
exclude = [
|
|
101
94
|
".cache",
|