cloudsmith-cli 1.16.0__tar.gz → 1.17.0__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.
- {cloudsmith_cli-1.16.0/cloudsmith_cli.egg-info → cloudsmith_cli-1.17.0}/PKG-INFO +137 -13
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/README.md +136 -12
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/__init__.py +1 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/mcp.py +2 -3
- cloudsmith_cli-1.17.0/cloudsmith_cli/cli/commands/metadata.py +515 -0
- cloudsmith_cli-1.17.0/cloudsmith_cli/cli/commands/push.py +1323 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/config.py +20 -1
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/exceptions.py +7 -0
- cloudsmith_cli-1.17.0/cloudsmith_cli/cli/metadata_common.py +146 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/saml.py +3 -5
- cloudsmith_cli-1.17.0/cloudsmith_cli/cli/tests/commands/test_metadata.py +694 -0
- cloudsmith_cli-1.17.0/cloudsmith_cli/cli/tests/test_metadata_common.py +123 -0
- cloudsmith_cli-1.17.0/cloudsmith_cli/cli/tests/test_push.py +1466 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/utils.py +10 -1
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/init.py +2 -2
- cloudsmith_cli-1.17.0/cloudsmith_cli/core/api/metadata.py +272 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/packages.py +18 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/download.py +32 -44
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/mcp/data.py +3 -3
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/mcp/server.py +22 -22
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/pagination.py +6 -5
- cloudsmith_cli-1.17.0/cloudsmith_cli/core/tests/test_metadata.py +616 -0
- cloudsmith_cli-1.17.0/cloudsmith_cli/data/VERSION +1 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0/cloudsmith_cli.egg-info}/PKG-INFO +137 -13
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli.egg-info/SOURCES.txt +6 -0
- cloudsmith_cli-1.16.0/cloudsmith_cli/cli/commands/push.py +0 -692
- cloudsmith_cli-1.16.0/cloudsmith_cli/cli/tests/test_push.py +0 -245
- cloudsmith_cli-1.16.0/cloudsmith_cli/data/VERSION +0 -1
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/LICENSE +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/MANIFEST.in +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/__main__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/command.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/auth.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/check.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/copy.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/delete.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/dependencies.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/docs.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/download.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/entitlements.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/help_.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/list_.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/login.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/logout.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/main.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/metrics/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/metrics/command.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/metrics/entitlements.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/metrics/packages.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/move.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/policy/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/policy/command.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/policy/deny.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/policy/license.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/policy/vulnerability.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/quarantine.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/quota/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/quota/command.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/quota/history.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/quota/quota.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/repos.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/resync.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/status.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/tags.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/tokens.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/upstream.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/vulnerabilities.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/commands/whoami.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/decorators.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/table.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/conftest.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/policy/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/policy/test_deny.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/policy/test_licence.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/policy/test_vulnerability.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_auth.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_check.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_download.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_entitlements.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_login.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_logout.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_main.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_mcp.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_package_commands.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_repos.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_tokens.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_upstream.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/commands/test_vulnerabilities.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/conftest.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/test_saml.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/test_utils.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/test_webserver.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/tests/utils.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/types.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/validators.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/cli/webserver.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/distros.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/entitlements.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/exceptions.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/files.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/metrics.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/orgs.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/quota.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/rates.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/repos.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/status.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/upstreams.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/user.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/version.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/api/vulnerabilities.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/config.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/keyring.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/mcp/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/ratelimits.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/rest.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/tests/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/tests/test_download.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/tests/test_init.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/tests/test_keyring.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/tests/test_rest.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/tests/test_version.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/utils.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/core/version.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/data/config.ini +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/data/credentials.ini +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/templates/__init__.py +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/templates/auth_error.html +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli/templates/auth_success.html +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli.egg-info/dependency_links.txt +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli.egg-info/entry_points.txt +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli.egg-info/not-zip-safe +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli.egg-info/requires.txt +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/cloudsmith_cli.egg-info/top_level.txt +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/setup.cfg +0 -0
- {cloudsmith_cli-1.16.0 → cloudsmith_cli-1.17.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudsmith-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.17.0
|
|
4
4
|
Summary: Cloudsmith Command-Line Interface (CLI)
|
|
5
5
|
Home-page: https://github.com/cloudsmith-io/cloudsmith-cli
|
|
6
6
|
Author: Cloudsmith Ltd
|
|
@@ -105,6 +105,11 @@ The CLI currently supports the following commands (and sub-commands):
|
|
|
105
105
|
- `repos`: List repositories for a namespace (owner).
|
|
106
106
|
- `login`|`token`: Retrieve your API authentication token/key via login.
|
|
107
107
|
- `logout`: Clear stored authentication credentials and SSO tokens (Keyring, API key from credential file and emit warning when `$CLOUDSMITH_API_KEY` is still set).
|
|
108
|
+
- `metadata`: Manage arbitrary JSON metadata (SBOM, BuildInfo, custom) attached to a package.
|
|
109
|
+
- `add`: Attach a new metadata entry to a package.
|
|
110
|
+
- `list`|`ls`: List metadata entries for a package, or fetch a single entry by slug.
|
|
111
|
+
- `update`: Replace content or source identity on an existing metadata entry.
|
|
112
|
+
- `remove`|`rm`: Remove a metadata entry from a package.
|
|
108
113
|
- `metrics`: Metrics and statistics for a repository.
|
|
109
114
|
- `tokens`: Retrieve bandwidth usage for entitlement tokens.
|
|
110
115
|
- `packages`: Retrieve package usage for repository.
|
|
@@ -298,7 +303,7 @@ Although native uploads, i.e. those supported by the native ecosystem of a packa
|
|
|
298
303
|
For example, if you wanted to upload a Debian package, you can do it in one-step. Assuming you have a package filename **libxml2-2.9.4-2.x86_64.deb**, representing **libxml 2.9.4**, for the **Ubuntu 16.04** distribution (which has a cloudsmith identifier of **ubuntu/xenial**):
|
|
299
304
|
|
|
300
305
|
```
|
|
301
|
-
cloudsmith push deb your-
|
|
306
|
+
cloudsmith push deb your-org/your-repo/ubuntu/xenial libxml2-2.9.4-2.x86_64.deb
|
|
302
307
|
```
|
|
303
308
|
|
|
304
309
|
Want to know how to do it with another packaging format? Easy, just ask for help:
|
|
@@ -315,39 +320,39 @@ You can download packages from repositories using the `cloudsmith download` comm
|
|
|
315
320
|
For example, to download a specific package:
|
|
316
321
|
|
|
317
322
|
```
|
|
318
|
-
cloudsmith download your-
|
|
323
|
+
cloudsmith download your-org/your-repo package-name
|
|
319
324
|
```
|
|
320
325
|
|
|
321
326
|
You can filter by various attributes like version, format, architecture, operating system, and tags:
|
|
322
327
|
|
|
323
328
|
```
|
|
324
329
|
# Download a specific version
|
|
325
|
-
cloudsmith download your-
|
|
330
|
+
cloudsmith download your-org/your-repo package-name --version 1.2.3
|
|
326
331
|
|
|
327
332
|
# Filter by format and architecture
|
|
328
|
-
cloudsmith download your-
|
|
333
|
+
cloudsmith download your-org/your-repo package-name --format deb --arch amd64
|
|
329
334
|
|
|
330
335
|
# Filter by package tag (e.g., latest, stable, beta)
|
|
331
|
-
cloudsmith download your-
|
|
336
|
+
cloudsmith download your-org/your-repo package-name --tag latest
|
|
332
337
|
|
|
333
338
|
# Combine tag with metadata filters
|
|
334
|
-
cloudsmith download your-
|
|
339
|
+
cloudsmith download your-org/your-repo package-name --tag stable --format deb --arch arm64
|
|
335
340
|
|
|
336
341
|
# Filter by filename (exact or glob pattern)
|
|
337
|
-
cloudsmith download your-
|
|
338
|
-
cloudsmith download your-
|
|
342
|
+
cloudsmith download your-org/your-repo package-name --filename '*.nupkg'
|
|
343
|
+
cloudsmith download your-org/your-repo package-name --filename 'mypackage-1.0.0.snupkg'
|
|
339
344
|
|
|
340
345
|
# Download all matching packages (when multiple packages share the same name/version)
|
|
341
|
-
cloudsmith download your-
|
|
346
|
+
cloudsmith download your-org/your-repo package-name --download-all
|
|
342
347
|
|
|
343
348
|
# Combine --download-all with --filename to download a subset
|
|
344
|
-
cloudsmith download your-
|
|
349
|
+
cloudsmith download your-org/your-repo package-name --download-all --filename '*.snupkg'
|
|
345
350
|
|
|
346
351
|
# Download all associated files (POM, sources, javadoc, etc.)
|
|
347
|
-
cloudsmith download your-
|
|
352
|
+
cloudsmith download your-org/your-repo package-name --all-files
|
|
348
353
|
|
|
349
354
|
# Preview what would be downloaded without actually downloading
|
|
350
|
-
cloudsmith download your-
|
|
355
|
+
cloudsmith download your-org/your-repo package-name --dry-run
|
|
351
356
|
```
|
|
352
357
|
|
|
353
358
|
For more advanced usage and all available options:
|
|
@@ -357,6 +362,125 @@ cloudsmith download --help
|
|
|
357
362
|
```
|
|
358
363
|
|
|
359
364
|
|
|
365
|
+
## Package Metadata
|
|
366
|
+
|
|
367
|
+
Arbitrary JSON metadata can be attached to any package — SBOMs, JFrog BuildInfo documents, or custom payloads. Metadata is validated against the declared content type and stays with the package for its lifetime.
|
|
368
|
+
|
|
369
|
+
Metadata can be attached at push time with `cloudsmith push` (see [Attaching Metadata During Push](#attaching-metadata-during-push)) or managed afterwards with the `cloudsmith metadata` command group.
|
|
370
|
+
|
|
371
|
+
To attach metadata to an existing package:
|
|
372
|
+
|
|
373
|
+
```
|
|
374
|
+
cloudsmith metadata add your-org/your-repo/your-pkg \
|
|
375
|
+
--content-type application/json \
|
|
376
|
+
--content '{"build_id": "demo-123", "git_sha": "abc123"}'
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
To attach metadata from a file (use `-` to read from stdin):
|
|
380
|
+
|
|
381
|
+
```
|
|
382
|
+
cloudsmith metadata add your-org/your-repo/your-pkg \
|
|
383
|
+
--content-type application/vnd.jfrog.buildinfo+json \
|
|
384
|
+
--file buildinfo.json
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
To list all metadata entries on a package, or fetch a single entry by slug:
|
|
388
|
+
|
|
389
|
+
```
|
|
390
|
+
cloudsmith metadata list your-org/your-repo/your-pkg
|
|
391
|
+
cloudsmith metadata list your-org/your-repo/your-pkg meta-slug-perm
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Filter entries by source kind or classification when listing:
|
|
395
|
+
|
|
396
|
+
```
|
|
397
|
+
cloudsmith metadata list your-org/your-repo/your-pkg --classification sbom
|
|
398
|
+
cloudsmith metadata list your-org/your-repo/your-pkg --source-kind third_party
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
To replace the content or source identity of an existing entry (content type is fixed after creation):
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
cloudsmith metadata update your-org/your-repo/your-pkg meta-slug-perm \
|
|
405
|
+
--content '{"build_id": "demo-124"}'
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
To remove a metadata entry:
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
cloudsmith metadata remove your-org/your-repo/your-pkg meta-slug-perm
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
For all available options:
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
cloudsmith metadata --help
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
## Attaching Metadata During Push
|
|
422
|
+
|
|
423
|
+
Every `cloudsmith push <format>` subcommand accepts a set of `--metadata-*` flags. When provided, metadata is validated locally and against the API before any file upload, then attached to the package immediately after creation. This avoids a separate `cloudsmith metadata add` step and prevents malformed metadata from leaving orphan packages behind.
|
|
424
|
+
|
|
425
|
+
Available flags on every push subcommand:
|
|
426
|
+
|
|
427
|
+
- `--metadata-content-file PATH`: Path to a JSON file containing the metadata content. Use `-` for stdin.
|
|
428
|
+
- `--metadata-content JSON`: Inline JSON content. Mutually exclusive with `--metadata-content-file`.
|
|
429
|
+
- `--metadata-content-type MIME`: MIME type of the metadata payload (e.g. `application/json`, `application/vnd.jfrog.buildinfo+json`). Required when content is provided.
|
|
430
|
+
- `--metadata-source-identity TEXT`: Identifier indicating where the metadata originated. Defaults to `cloudsmith-cli@<version>`.
|
|
431
|
+
- `--on-metadata-failure [error|warn]`: How to handle push-time metadata failures for this push only. `error` (default) aborts the push so CI/CD surfaces broken SBOM/BuildInfo payloads; `warn` downgrades to a warning and lets the package upload regardless. Overrides `$CLOUDSMITH_METADATA_FAILURE_MODE` and the `metadata_failure_mode` config key.
|
|
432
|
+
|
|
433
|
+
Push a package with inline metadata:
|
|
434
|
+
|
|
435
|
+
```
|
|
436
|
+
cloudsmith push raw your-org/your-repo payload.txt \
|
|
437
|
+
--name demo --version 1.0.0 \
|
|
438
|
+
--metadata-content '{"build_id": "demo-inline", "git_sha": "abc123"}' \
|
|
439
|
+
--metadata-content-type application/json
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Push a package with metadata loaded from a file:
|
|
443
|
+
|
|
444
|
+
```
|
|
445
|
+
cloudsmith push raw your-org/your-repo payload.txt \
|
|
446
|
+
--name demo --version 1.0.0 \
|
|
447
|
+
--metadata-content-file buildinfo.json \
|
|
448
|
+
--metadata-content-type application/vnd.jfrog.buildinfo+json
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Failure Behavior
|
|
452
|
+
|
|
453
|
+
By default, push aborts when metadata validation or attachment fails. The HTTP status from the failed request is used as the exit code, so CI pipelines surface broken SBOMs or BuildInfo payloads instead of silently uploading a package without metadata.
|
|
454
|
+
|
|
455
|
+
To downgrade failures to a warning (the package is still uploaded, and a copy-paste `cloudsmith metadata add` retry hint is printed), use any of the following — listed in order of precedence (highest first):
|
|
456
|
+
|
|
457
|
+
1. The `--on-metadata-failure warn` CLI flag on `cloudsmith push` (per-push override):
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
cloudsmith push raw your-org/your-repo payload.txt \
|
|
461
|
+
--name demo --version 1.0.0 \
|
|
462
|
+
--metadata-content-file buildinfo.json \
|
|
463
|
+
--metadata-content-type application/vnd.jfrog.buildinfo+json \
|
|
464
|
+
--on-metadata-failure warn
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
2. The `CLOUDSMITH_METADATA_FAILURE_MODE` environment variable set to `warn` or `0` (per-shell):
|
|
468
|
+
|
|
469
|
+
```
|
|
470
|
+
CLOUDSMITH_METADATA_FAILURE_MODE=warn cloudsmith push raw your-org/your-repo payload.txt \
|
|
471
|
+
--name demo --version 1.0.0 \
|
|
472
|
+
--metadata-content-file buildinfo.json \
|
|
473
|
+
--metadata-content-type application/vnd.jfrog.buildinfo+json
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
3. The `metadata_failure_mode` key in `config.ini` set to `error`, `warn`, or `0` (persistent default):
|
|
477
|
+
|
|
478
|
+
```ini
|
|
479
|
+
[default]
|
|
480
|
+
metadata_failure_mode = warn
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
|
|
360
484
|
## Contributing
|
|
361
485
|
|
|
362
486
|
Yes! Please do contribute, this is why we love open source. Please see [CONTRIBUTING](https://github.com/cloudsmith-io/cloudsmith-cli/blob/master/CONTRIBUTING.md) for contribution guidelines when making code changes or raising issues for bug reports, ideas, discussions and/or questions (i.e. help required).
|
|
@@ -49,6 +49,11 @@ The CLI currently supports the following commands (and sub-commands):
|
|
|
49
49
|
- `repos`: List repositories for a namespace (owner).
|
|
50
50
|
- `login`|`token`: Retrieve your API authentication token/key via login.
|
|
51
51
|
- `logout`: Clear stored authentication credentials and SSO tokens (Keyring, API key from credential file and emit warning when `$CLOUDSMITH_API_KEY` is still set).
|
|
52
|
+
- `metadata`: Manage arbitrary JSON metadata (SBOM, BuildInfo, custom) attached to a package.
|
|
53
|
+
- `add`: Attach a new metadata entry to a package.
|
|
54
|
+
- `list`|`ls`: List metadata entries for a package, or fetch a single entry by slug.
|
|
55
|
+
- `update`: Replace content or source identity on an existing metadata entry.
|
|
56
|
+
- `remove`|`rm`: Remove a metadata entry from a package.
|
|
52
57
|
- `metrics`: Metrics and statistics for a repository.
|
|
53
58
|
- `tokens`: Retrieve bandwidth usage for entitlement tokens.
|
|
54
59
|
- `packages`: Retrieve package usage for repository.
|
|
@@ -242,7 +247,7 @@ Although native uploads, i.e. those supported by the native ecosystem of a packa
|
|
|
242
247
|
For example, if you wanted to upload a Debian package, you can do it in one-step. Assuming you have a package filename **libxml2-2.9.4-2.x86_64.deb**, representing **libxml 2.9.4**, for the **Ubuntu 16.04** distribution (which has a cloudsmith identifier of **ubuntu/xenial**):
|
|
243
248
|
|
|
244
249
|
```
|
|
245
|
-
cloudsmith push deb your-
|
|
250
|
+
cloudsmith push deb your-org/your-repo/ubuntu/xenial libxml2-2.9.4-2.x86_64.deb
|
|
246
251
|
```
|
|
247
252
|
|
|
248
253
|
Want to know how to do it with another packaging format? Easy, just ask for help:
|
|
@@ -259,39 +264,39 @@ You can download packages from repositories using the `cloudsmith download` comm
|
|
|
259
264
|
For example, to download a specific package:
|
|
260
265
|
|
|
261
266
|
```
|
|
262
|
-
cloudsmith download your-
|
|
267
|
+
cloudsmith download your-org/your-repo package-name
|
|
263
268
|
```
|
|
264
269
|
|
|
265
270
|
You can filter by various attributes like version, format, architecture, operating system, and tags:
|
|
266
271
|
|
|
267
272
|
```
|
|
268
273
|
# Download a specific version
|
|
269
|
-
cloudsmith download your-
|
|
274
|
+
cloudsmith download your-org/your-repo package-name --version 1.2.3
|
|
270
275
|
|
|
271
276
|
# Filter by format and architecture
|
|
272
|
-
cloudsmith download your-
|
|
277
|
+
cloudsmith download your-org/your-repo package-name --format deb --arch amd64
|
|
273
278
|
|
|
274
279
|
# Filter by package tag (e.g., latest, stable, beta)
|
|
275
|
-
cloudsmith download your-
|
|
280
|
+
cloudsmith download your-org/your-repo package-name --tag latest
|
|
276
281
|
|
|
277
282
|
# Combine tag with metadata filters
|
|
278
|
-
cloudsmith download your-
|
|
283
|
+
cloudsmith download your-org/your-repo package-name --tag stable --format deb --arch arm64
|
|
279
284
|
|
|
280
285
|
# Filter by filename (exact or glob pattern)
|
|
281
|
-
cloudsmith download your-
|
|
282
|
-
cloudsmith download your-
|
|
286
|
+
cloudsmith download your-org/your-repo package-name --filename '*.nupkg'
|
|
287
|
+
cloudsmith download your-org/your-repo package-name --filename 'mypackage-1.0.0.snupkg'
|
|
283
288
|
|
|
284
289
|
# Download all matching packages (when multiple packages share the same name/version)
|
|
285
|
-
cloudsmith download your-
|
|
290
|
+
cloudsmith download your-org/your-repo package-name --download-all
|
|
286
291
|
|
|
287
292
|
# Combine --download-all with --filename to download a subset
|
|
288
|
-
cloudsmith download your-
|
|
293
|
+
cloudsmith download your-org/your-repo package-name --download-all --filename '*.snupkg'
|
|
289
294
|
|
|
290
295
|
# Download all associated files (POM, sources, javadoc, etc.)
|
|
291
|
-
cloudsmith download your-
|
|
296
|
+
cloudsmith download your-org/your-repo package-name --all-files
|
|
292
297
|
|
|
293
298
|
# Preview what would be downloaded without actually downloading
|
|
294
|
-
cloudsmith download your-
|
|
299
|
+
cloudsmith download your-org/your-repo package-name --dry-run
|
|
295
300
|
```
|
|
296
301
|
|
|
297
302
|
For more advanced usage and all available options:
|
|
@@ -301,6 +306,125 @@ cloudsmith download --help
|
|
|
301
306
|
```
|
|
302
307
|
|
|
303
308
|
|
|
309
|
+
## Package Metadata
|
|
310
|
+
|
|
311
|
+
Arbitrary JSON metadata can be attached to any package — SBOMs, JFrog BuildInfo documents, or custom payloads. Metadata is validated against the declared content type and stays with the package for its lifetime.
|
|
312
|
+
|
|
313
|
+
Metadata can be attached at push time with `cloudsmith push` (see [Attaching Metadata During Push](#attaching-metadata-during-push)) or managed afterwards with the `cloudsmith metadata` command group.
|
|
314
|
+
|
|
315
|
+
To attach metadata to an existing package:
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
cloudsmith metadata add your-org/your-repo/your-pkg \
|
|
319
|
+
--content-type application/json \
|
|
320
|
+
--content '{"build_id": "demo-123", "git_sha": "abc123"}'
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
To attach metadata from a file (use `-` to read from stdin):
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
cloudsmith metadata add your-org/your-repo/your-pkg \
|
|
327
|
+
--content-type application/vnd.jfrog.buildinfo+json \
|
|
328
|
+
--file buildinfo.json
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
To list all metadata entries on a package, or fetch a single entry by slug:
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
cloudsmith metadata list your-org/your-repo/your-pkg
|
|
335
|
+
cloudsmith metadata list your-org/your-repo/your-pkg meta-slug-perm
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Filter entries by source kind or classification when listing:
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
cloudsmith metadata list your-org/your-repo/your-pkg --classification sbom
|
|
342
|
+
cloudsmith metadata list your-org/your-repo/your-pkg --source-kind third_party
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
To replace the content or source identity of an existing entry (content type is fixed after creation):
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
cloudsmith metadata update your-org/your-repo/your-pkg meta-slug-perm \
|
|
349
|
+
--content '{"build_id": "demo-124"}'
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
To remove a metadata entry:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
cloudsmith metadata remove your-org/your-repo/your-pkg meta-slug-perm
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
For all available options:
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
cloudsmith metadata --help
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
## Attaching Metadata During Push
|
|
366
|
+
|
|
367
|
+
Every `cloudsmith push <format>` subcommand accepts a set of `--metadata-*` flags. When provided, metadata is validated locally and against the API before any file upload, then attached to the package immediately after creation. This avoids a separate `cloudsmith metadata add` step and prevents malformed metadata from leaving orphan packages behind.
|
|
368
|
+
|
|
369
|
+
Available flags on every push subcommand:
|
|
370
|
+
|
|
371
|
+
- `--metadata-content-file PATH`: Path to a JSON file containing the metadata content. Use `-` for stdin.
|
|
372
|
+
- `--metadata-content JSON`: Inline JSON content. Mutually exclusive with `--metadata-content-file`.
|
|
373
|
+
- `--metadata-content-type MIME`: MIME type of the metadata payload (e.g. `application/json`, `application/vnd.jfrog.buildinfo+json`). Required when content is provided.
|
|
374
|
+
- `--metadata-source-identity TEXT`: Identifier indicating where the metadata originated. Defaults to `cloudsmith-cli@<version>`.
|
|
375
|
+
- `--on-metadata-failure [error|warn]`: How to handle push-time metadata failures for this push only. `error` (default) aborts the push so CI/CD surfaces broken SBOM/BuildInfo payloads; `warn` downgrades to a warning and lets the package upload regardless. Overrides `$CLOUDSMITH_METADATA_FAILURE_MODE` and the `metadata_failure_mode` config key.
|
|
376
|
+
|
|
377
|
+
Push a package with inline metadata:
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
cloudsmith push raw your-org/your-repo payload.txt \
|
|
381
|
+
--name demo --version 1.0.0 \
|
|
382
|
+
--metadata-content '{"build_id": "demo-inline", "git_sha": "abc123"}' \
|
|
383
|
+
--metadata-content-type application/json
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Push a package with metadata loaded from a file:
|
|
387
|
+
|
|
388
|
+
```
|
|
389
|
+
cloudsmith push raw your-org/your-repo payload.txt \
|
|
390
|
+
--name demo --version 1.0.0 \
|
|
391
|
+
--metadata-content-file buildinfo.json \
|
|
392
|
+
--metadata-content-type application/vnd.jfrog.buildinfo+json
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Failure Behavior
|
|
396
|
+
|
|
397
|
+
By default, push aborts when metadata validation or attachment fails. The HTTP status from the failed request is used as the exit code, so CI pipelines surface broken SBOMs or BuildInfo payloads instead of silently uploading a package without metadata.
|
|
398
|
+
|
|
399
|
+
To downgrade failures to a warning (the package is still uploaded, and a copy-paste `cloudsmith metadata add` retry hint is printed), use any of the following — listed in order of precedence (highest first):
|
|
400
|
+
|
|
401
|
+
1. The `--on-metadata-failure warn` CLI flag on `cloudsmith push` (per-push override):
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
cloudsmith push raw your-org/your-repo payload.txt \
|
|
405
|
+
--name demo --version 1.0.0 \
|
|
406
|
+
--metadata-content-file buildinfo.json \
|
|
407
|
+
--metadata-content-type application/vnd.jfrog.buildinfo+json \
|
|
408
|
+
--on-metadata-failure warn
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
2. The `CLOUDSMITH_METADATA_FAILURE_MODE` environment variable set to `warn` or `0` (per-shell):
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
CLOUDSMITH_METADATA_FAILURE_MODE=warn cloudsmith push raw your-org/your-repo payload.txt \
|
|
415
|
+
--name demo --version 1.0.0 \
|
|
416
|
+
--metadata-content-file buildinfo.json \
|
|
417
|
+
--metadata-content-type application/vnd.jfrog.buildinfo+json
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
3. The `metadata_failure_mode` key in `config.ini` set to `error`, `warn`, or `0` (persistent default):
|
|
421
|
+
|
|
422
|
+
```ini
|
|
423
|
+
[default]
|
|
424
|
+
metadata_failure_mode = warn
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
|
|
304
428
|
## Contributing
|
|
305
429
|
|
|
306
430
|
Yes! Please do contribute, this is why we love open source. Please see [CONTRIBUTING](https://github.com/cloudsmith-io/cloudsmith-cli/blob/master/CONTRIBUTING.md) for contribution guidelines when making code changes or raising issues for bug reports, ideas, discussions and/or questions (i.e. help required).
|
|
@@ -5,7 +5,6 @@ import os
|
|
|
5
5
|
import shutil
|
|
6
6
|
import sys
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Dict, List
|
|
9
8
|
|
|
10
9
|
import click
|
|
11
10
|
import json5
|
|
@@ -110,7 +109,7 @@ def list_groups(ctx, opts, mcp_server: server.DynamicMCPServer):
|
|
|
110
109
|
print_groups(groups)
|
|
111
110
|
|
|
112
111
|
|
|
113
|
-
def print_tools(tool_list:
|
|
112
|
+
def print_tools(tool_list: dict[str, OpenAPITool]):
|
|
114
113
|
"""Print tools as a table or output in another format."""
|
|
115
114
|
|
|
116
115
|
headers = [
|
|
@@ -138,7 +137,7 @@ def print_tools(tool_list: Dict[str, OpenAPITool]):
|
|
|
138
137
|
utils.pretty_print_list_info(num_results=num_results, suffix=list_suffix)
|
|
139
138
|
|
|
140
139
|
|
|
141
|
-
def print_groups(group_list:
|
|
140
|
+
def print_groups(group_list: dict[str, list[str]]):
|
|
142
141
|
"""Print tool groups as a table or output in another format."""
|
|
143
142
|
|
|
144
143
|
headers = [
|