cloudsmith-cli 1.20.0__py3-none-any.whl

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.
Files changed (130) hide show
  1. cloudsmith_cli/__init__.py +10 -0
  2. cloudsmith_cli/__main__.py +8 -0
  3. cloudsmith_cli/cli/__init__.py +1 -0
  4. cloudsmith_cli/cli/command.py +160 -0
  5. cloudsmith_cli/cli/commands/__init__.py +33 -0
  6. cloudsmith_cli/cli/commands/auth.py +173 -0
  7. cloudsmith_cli/cli/commands/check.py +129 -0
  8. cloudsmith_cli/cli/commands/copy.py +98 -0
  9. cloudsmith_cli/cli/commands/credential_helper/__init__.py +39 -0
  10. cloudsmith_cli/cli/commands/credential_helper/docker.py +66 -0
  11. cloudsmith_cli/cli/commands/credential_helper/manage.py +299 -0
  12. cloudsmith_cli/cli/commands/delete.py +67 -0
  13. cloudsmith_cli/cli/commands/dependencies.py +108 -0
  14. cloudsmith_cli/cli/commands/docs.py +16 -0
  15. cloudsmith_cli/cli/commands/download.py +620 -0
  16. cloudsmith_cli/cli/commands/entitlements.py +819 -0
  17. cloudsmith_cli/cli/commands/help_.py +12 -0
  18. cloudsmith_cli/cli/commands/list_.py +317 -0
  19. cloudsmith_cli/cli/commands/login.py +99 -0
  20. cloudsmith_cli/cli/commands/logout.py +151 -0
  21. cloudsmith_cli/cli/commands/main.py +73 -0
  22. cloudsmith_cli/cli/commands/mcp.py +523 -0
  23. cloudsmith_cli/cli/commands/metadata.py +503 -0
  24. cloudsmith_cli/cli/commands/metrics/__init__.py +2 -0
  25. cloudsmith_cli/cli/commands/metrics/command.py +20 -0
  26. cloudsmith_cli/cli/commands/metrics/entitlements.py +148 -0
  27. cloudsmith_cli/cli/commands/metrics/packages.py +134 -0
  28. cloudsmith_cli/cli/commands/move.py +111 -0
  29. cloudsmith_cli/cli/commands/policy/__init__.py +3 -0
  30. cloudsmith_cli/cli/commands/policy/command.py +20 -0
  31. cloudsmith_cli/cli/commands/policy/deny.py +248 -0
  32. cloudsmith_cli/cli/commands/policy/license.py +335 -0
  33. cloudsmith_cli/cli/commands/policy/vulnerability.py +322 -0
  34. cloudsmith_cli/cli/commands/push.py +1323 -0
  35. cloudsmith_cli/cli/commands/quarantine.py +148 -0
  36. cloudsmith_cli/cli/commands/quota/__init__.py +2 -0
  37. cloudsmith_cli/cli/commands/quota/command.py +20 -0
  38. cloudsmith_cli/cli/commands/quota/history.py +122 -0
  39. cloudsmith_cli/cli/commands/quota/quota.py +107 -0
  40. cloudsmith_cli/cli/commands/repos.py +330 -0
  41. cloudsmith_cli/cli/commands/resync.py +90 -0
  42. cloudsmith_cli/cli/commands/status.py +92 -0
  43. cloudsmith_cli/cli/commands/tags.py +375 -0
  44. cloudsmith_cli/cli/commands/tokens.py +318 -0
  45. cloudsmith_cli/cli/commands/upstream.py +479 -0
  46. cloudsmith_cli/cli/commands/vulnerabilities.py +141 -0
  47. cloudsmith_cli/cli/commands/whoami.py +188 -0
  48. cloudsmith_cli/cli/config.py +635 -0
  49. cloudsmith_cli/cli/decorators.py +624 -0
  50. cloudsmith_cli/cli/exceptions.py +215 -0
  51. cloudsmith_cli/cli/metadata_common.py +146 -0
  52. cloudsmith_cli/cli/saml.py +109 -0
  53. cloudsmith_cli/cli/table.py +59 -0
  54. cloudsmith_cli/cli/types.py +14 -0
  55. cloudsmith_cli/cli/utils.py +267 -0
  56. cloudsmith_cli/cli/validators.py +378 -0
  57. cloudsmith_cli/cli/webserver.py +263 -0
  58. cloudsmith_cli/core/__init__.py +1 -0
  59. cloudsmith_cli/core/api/__init__.py +1 -0
  60. cloudsmith_cli/core/api/distros.py +31 -0
  61. cloudsmith_cli/core/api/entitlements.py +130 -0
  62. cloudsmith_cli/core/api/exceptions.py +57 -0
  63. cloudsmith_cli/core/api/files.py +131 -0
  64. cloudsmith_cli/core/api/init.py +109 -0
  65. cloudsmith_cli/core/api/metadata.py +217 -0
  66. cloudsmith_cli/core/api/metrics.py +78 -0
  67. cloudsmith_cli/core/api/orgs.py +201 -0
  68. cloudsmith_cli/core/api/packages.py +309 -0
  69. cloudsmith_cli/core/api/quota.py +64 -0
  70. cloudsmith_cli/core/api/rates.py +28 -0
  71. cloudsmith_cli/core/api/repos.py +81 -0
  72. cloudsmith_cli/core/api/status.py +27 -0
  73. cloudsmith_cli/core/api/upstreams.py +72 -0
  74. cloudsmith_cli/core/api/user.py +109 -0
  75. cloudsmith_cli/core/api/version.py +15 -0
  76. cloudsmith_cli/core/api/vulnerabilities.py +230 -0
  77. cloudsmith_cli/core/cache_utils.py +160 -0
  78. cloudsmith_cli/core/config.py +140 -0
  79. cloudsmith_cli/core/credentials/__init__.py +0 -0
  80. cloudsmith_cli/core/credentials/chain.py +69 -0
  81. cloudsmith_cli/core/credentials/models.py +44 -0
  82. cloudsmith_cli/core/credentials/oidc/__init__.py +6 -0
  83. cloudsmith_cli/core/credentials/oidc/cache.py +220 -0
  84. cloudsmith_cli/core/credentials/oidc/detectors/__init__.py +122 -0
  85. cloudsmith_cli/core/credentials/oidc/detectors/aws.py +85 -0
  86. cloudsmith_cli/core/credentials/oidc/detectors/azure_devops.py +70 -0
  87. cloudsmith_cli/core/credentials/oidc/detectors/base.py +26 -0
  88. cloudsmith_cli/core/credentials/oidc/detectors/bitbucket_pipelines.py +35 -0
  89. cloudsmith_cli/core/credentials/oidc/detectors/circleci.py +40 -0
  90. cloudsmith_cli/core/credentials/oidc/detectors/generic.py +42 -0
  91. cloudsmith_cli/core/credentials/oidc/detectors/github_actions.py +64 -0
  92. cloudsmith_cli/core/credentials/oidc/detectors/gitlab_ci.py +49 -0
  93. cloudsmith_cli/core/credentials/oidc/exchange.py +87 -0
  94. cloudsmith_cli/core/credentials/provider.py +17 -0
  95. cloudsmith_cli/core/credentials/providers/__init__.py +15 -0
  96. cloudsmith_cli/core/credentials/providers/cli_flag.py +24 -0
  97. cloudsmith_cli/core/credentials/providers/credentials_file.py +24 -0
  98. cloudsmith_cli/core/credentials/providers/env_var.py +24 -0
  99. cloudsmith_cli/core/credentials/providers/keyring_provider.py +59 -0
  100. cloudsmith_cli/core/credentials/providers/oidc_provider.py +115 -0
  101. cloudsmith_cli/core/download.py +594 -0
  102. cloudsmith_cli/core/keyring.py +171 -0
  103. cloudsmith_cli/core/mcp/__init__.py +0 -0
  104. cloudsmith_cli/core/mcp/data.py +17 -0
  105. cloudsmith_cli/core/mcp/server.py +786 -0
  106. cloudsmith_cli/core/pagination.py +131 -0
  107. cloudsmith_cli/core/ratelimits.py +88 -0
  108. cloudsmith_cli/core/rest.py +255 -0
  109. cloudsmith_cli/core/utils.py +95 -0
  110. cloudsmith_cli/core/version.py +20 -0
  111. cloudsmith_cli/credential_helpers/__init__.py +7 -0
  112. cloudsmith_cli/credential_helpers/backends.py +41 -0
  113. cloudsmith_cli/credential_helpers/common.py +111 -0
  114. cloudsmith_cli/credential_helpers/custom_domains.py +281 -0
  115. cloudsmith_cli/credential_helpers/docker/__init__.py +4 -0
  116. cloudsmith_cli/credential_helpers/docker/installer.py +349 -0
  117. cloudsmith_cli/credential_helpers/docker/runtime.py +117 -0
  118. cloudsmith_cli/credential_helpers/launchers.py +175 -0
  119. cloudsmith_cli/data/VERSION +1 -0
  120. cloudsmith_cli/data/config.ini +23 -0
  121. cloudsmith_cli/data/credentials.ini +14 -0
  122. cloudsmith_cli/templates/__init__.py +3 -0
  123. cloudsmith_cli/templates/auth_error.html +45 -0
  124. cloudsmith_cli/templates/auth_success.html +37 -0
  125. cloudsmith_cli-1.20.0.dist-info/METADATA +610 -0
  126. cloudsmith_cli-1.20.0.dist-info/RECORD +130 -0
  127. cloudsmith_cli-1.20.0.dist-info/WHEEL +5 -0
  128. cloudsmith_cli-1.20.0.dist-info/entry_points.txt +2 -0
  129. cloudsmith_cli-1.20.0.dist-info/licenses/LICENSE +201 -0
  130. cloudsmith_cli-1.20.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,610 @@
1
+ Metadata-Version: 2.4
2
+ Name: cloudsmith-cli
3
+ Version: 1.20.0
4
+ Summary: Cloudsmith Command-Line Interface (CLI)
5
+ Author-email: Cloudsmith Ltd <support@cloudsmith.io>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/cloudsmith-io/cloudsmith-cli
8
+ Keywords: cloudsmith,cli,devops
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Internet
21
+ Classifier: Topic :: System :: Systems Administration
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.10.0
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: click!=8.3.0,>=8.1.8
27
+ Requires-Dist: click-configfile>=0.2.3
28
+ Requires-Dist: click-didyoumean>=0.0.3
29
+ Requires-Dist: click-spinner>=0.1.7
30
+ Requires-Dist: json5>=0.9.0
31
+ Requires-Dist: cloudsmith-api<3.0,>=2.0.29
32
+ Requires-Dist: keyring>=25.4.1
33
+ Requires-Dist: mcp==1.27.2
34
+ Requires-Dist: PyJWT[crypto]>=2.0.0
35
+ Requires-Dist: python-toon==0.1.2
36
+ Requires-Dist: requests>=2.18.4
37
+ Requires-Dist: requests_toolbelt>=1.0.0
38
+ Requires-Dist: rich>=13.0.0
39
+ Requires-Dist: semver>=2.7.9
40
+ Requires-Dist: urllib3>=2.5
41
+ Provides-Extra: aws
42
+ Requires-Dist: boto3[crt]>=1.26.0; extra == "aws"
43
+ Provides-Extra: all
44
+ Requires-Dist: boto3[crt]>=1.26.0; extra == "all"
45
+ Dynamic: license-file
46
+
47
+ # Cloudsmith Command Line Interface (CLI)
48
+
49
+ [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/badges/version/cloudsmith/cli/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/?render=true)](https://cloudsmith.io/~cloudsmith/repos/cli/packages/detail/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/)
50
+ [![Python Versions](https://img.shields.io/pypi/pyversions/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
51
+ [![PyPI Version](https://img.shields.io/pypi/v/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
52
+ [![GitHub Actions](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml/badge.svg)](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml)
53
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
54
+
55
+
56
+ The [Cloudsmith](https://cloudsmith.io) Command Line Interface (CLI) is a Python 3 text-based interface to the [API](https://api.cloudsmith.io). This allows users, machines and other services to access and integrate smoothly with Cloudsmith without requiring explicit plugins or tools. [Be awesome. Automate Everything](https://cloudsmith.com/company/the-tao-of-cloudsmith/).
57
+
58
+ The following asciinema video demonstrates some of the CLI commands:
59
+ [![asciicast](https://asciinema.org/a/DkNXQWQGBjWkfGPAkDAPNz7xe.svg)](https://asciinema.org/a/DkNXQWQGBjWkfGPAkDAPNz7xe)
60
+
61
+ We also have a [demo video on YouTube](https://youtu.be/R-g8ZhDwTKk):
62
+
63
+ You can also read our [blog article](https://blog.cloudsmith.io/2017/11/25/automation-as-simple-as-a-b-cli/) that introduced the first version of the CLI and the Cloudsmith RESTful API.
64
+
65
+
66
+ ## Changelog
67
+
68
+ Please see the [changelog](https://github.com/cloudsmith-io/cloudsmith-cli/blob/master/CHANGELOG.md) for the list of changes by version. The current version is displayed in the PyPi badge at the top.
69
+
70
+
71
+ ## Features
72
+
73
+ The CLI currently supports the following commands (and sub-commands):
74
+
75
+ - `authenticate`|`auth`: Authenticate the CLI against an organization's SAML configuration.
76
+ - `check`: Check rate limits and service status.
77
+ - `copy`|`cp`: Copy a package to another repository.
78
+ - `delete`|`rm`: Delete a package from a repository.
79
+ - `dependencies`|`deps`: List direct (non-transitive) dependencies for a package.
80
+ - `docs`: Launch the help website in your browser.
81
+ - `download`: Download a package from a repository.
82
+ - `entitlements`|`ents`: Manage the entitlements for a repository.
83
+ - `create`|`new`: Create a new entitlement in a repository.
84
+ - `delete`|`rm`: Delete an entitlement from a repository.
85
+ - `list`|`ls`: List entitlements for a repository.
86
+ - `refresh`: Refresh an entitlement in a repository.
87
+ - `sync`: Sync entitlements from another repository.
88
+ - `update`|`set`: Update (patch) a entitlement in a repository.
89
+ - `help`: Display the delightful help message and exit.
90
+ - `list`|`ls`: List distros, packages, repos and entitlements.
91
+ - `dependencies`|`deps` List direct (non-transitive) dependencies for a package.
92
+ - `distros`: List available distributions.
93
+ - `entitlements`|`ents`: List entitlements for a repository.
94
+ - `packages`: List packages for a repository. (Aliases `repos list`)
95
+ - `repos`: List repositories for a namespace (owner).
96
+ - `login`|`token`: Retrieve your API authentication token/key via login.
97
+ - `logout`: Clear stored authentication credentials and SSO tokens (Keyring, API key from credential file and emit warning when `$CLOUDSMITH_API_KEY` is still set).
98
+ - `metadata`: Manage arbitrary JSON metadata (SBOM, BuildInfo, custom) attached to a package.
99
+ - `add`: Attach a new metadata entry to a package.
100
+ - `list`|`ls`: List metadata entries for a package, or fetch a single entry by slug.
101
+ - `update`: Replace content or source identity on an existing metadata entry.
102
+ - `remove`|`rm`: Remove a metadata entry from a package.
103
+ - `metrics`: Metrics and statistics for a repository.
104
+ - `tokens`: Retrieve bandwidth usage for entitlement tokens.
105
+ - `packages`: Retrieve package usage for repository.
106
+ - `move`|`mv`|`promote`: Move (promote) a package to another repo.
107
+ - `policy`: Manage policies for an organization.
108
+ - `deny`: Manage deny policies for an organization.
109
+ - `license`: Manage license policies for an organization.
110
+ - `vulnerability`: Manage vulnerability policies for an organization.
111
+ - `push`|`upload`: Push (upload) a new package to a repository.
112
+ - `alpine`: Push (upload) a new Alpine package upstream.
113
+ - `cargo`: Push (upload) a new Cargo package upstream.
114
+ - `composer`: Push (upload) a new Composer package upstream.
115
+ - `cocoapods`: Push (upload) a new CocoaPods package upstream.
116
+ - `conan`: Push (upload) a new Conan (C++) package upstream.
117
+ - `cran`: Push (upload) a new R/CRAN package upstream.
118
+ - `deb`: Push (upload) a new Debian package upstream.
119
+ - `docker`: Push (upload) a new Docker image upstream.
120
+ - `go`: Push (upload) a new Go module upstream.
121
+ - `helm`: Push (upload) a new Helm package upstream.
122
+ - `luarocks`: Push (upload) a new Lua module upstream.
123
+ - `maven`: Push (upload) a new Maven package upstream.
124
+ - `npm`: Push (upload) a new Npm package upstream.
125
+ - `nuget`: Push (upload) a new NuGet package upstream.
126
+ - `python`: Push (upload) a new Python package upstream.
127
+ - `raw`: Push (upload) a new Raw package upstream.
128
+ - `rpm`: Push (upload) a new RedHat package upstream.
129
+ - `ruby`: Push (upload) a new Ruby package upstream.
130
+ - `terraform`: Push (upload) a new Terraform package upstream.
131
+ - `vagrant`: Push (upload) a new Vagrant package upstream.
132
+ - `quarantine`|`block`: Manage quarantined packages in a repository.
133
+ - `add`: Add a package to quarantine.
134
+ - `remove`|`rm`|`restore`: Add a package to quarantine.
135
+ - `quota`: Quota limits and history for a organisation.
136
+ - `limits`: Display the Quota (bandwidth & storage usage/limits) for a specific organisation.
137
+ - `history`: Display the Quota History (upload, download, and storage usage/limits) for a specific organisation.
138
+ - `repositories`|`repos`: Manage repositories.
139
+ - `create`|`new`: Create a new repository in a namespace.
140
+ - `get`|`list`|`ls`: List repositories for a user, in a namespace or get details for a specific repository.
141
+ - `update`: Update a repository in a namespace.
142
+ - `delete`|`rm`: Delete a repository from a namespace.
143
+ - `resync`: Resynchronise a package in a repository.
144
+ - `status`: Get the synchronisation status for a package.
145
+ - `tags`|`tag`: Manage the tags for a package in a repository.
146
+ - `add`: Add tags to a package in a repository.
147
+ - `clear`: Clear all existing (non-immutable) tags from a package in a repository.
148
+ - `list`|`ls`: List tags for a package in a repository.
149
+ - `remove`|`rm`: Remove tags from a package in a repository.
150
+ - `replace`: Replace all existing (non-immutable) tags on a package in a repository.
151
+ - `tokens`: Manage API tokens.
152
+ - `list`|`ls`: List API tokens.
153
+ - `refresh`: Refresh an API token.
154
+ - `upstream`: Manage upstreams for a repository.
155
+ - `cran`: Manage cran upstreams for a repository.
156
+ - `dart`: Manage dart upstreams for a repository.
157
+ - `deb`: Manage deb upstreams for a repository.
158
+ - `docker`: Manage docker upstreams for a repository.
159
+ - `helm`: Manage helm upstreams for a repository.
160
+ - `hex`: Manage hex upstreams for a repository.
161
+ - `maven`: Manage maven upstreams for a repository.
162
+ - `npm`: Manage npm upstreams for a repository.
163
+ - `nuget`: Manage nuget upstreams for a repository.
164
+ - `python`: Manage python upstreams for a repository.
165
+ - `rpm`: Manage rpm upstreams for a repository.
166
+ - `ruby`: Manage ruby upstreams for a repository.
167
+ - `swift`: Manage swift upstreams for a repository.
168
+ - `vulnerabilities`: Retrieve vulnerability results for a package.
169
+ - `whoami`: Retrieve your current authentication status.
170
+
171
+ ## Installation
172
+
173
+ You can install the latest CLI application from:
174
+
175
+ - [Official CLI Repository @ PyPi](https://pypi.python.org/pypi/cloudsmith-cli)
176
+ - [Official CLI Repository @ Cloudsmith](https://cloudsmith.io/~cloudsmith/repos/cli/packages/)
177
+
178
+ The simplest way is to use `pip`, such as:
179
+
180
+ ```
181
+ pip install --upgrade cloudsmith-cli
182
+ ```
183
+
184
+ Or you can get the latest pre-release version from Cloudsmith:
185
+
186
+ ```
187
+ pip install --upgrade cloudsmith-cli --extra-index-url=https://dl.cloudsmith.io/public/cloudsmith/cli/python/index/
188
+ ```
189
+
190
+ ### Standalone Binaries
191
+
192
+ Each release also ships self-contained binaries that bundle Python and all dependencies — no Python installation required. Download the archive for your platform from the [GitHub releases page](https://github.com/cloudsmith-io/cloudsmith-cli/releases) (or the [Cloudsmith CLI repository](https://cloudsmith.io/~cloudsmith/repos/cli/packages/)), verify it against the accompanying `.sha256` file, extract it, and add the extracted `cloudsmith` directory to your `PATH`:
193
+
194
+ ```bash
195
+ tar -xzf cloudsmith-<version>-<target>.tar.gz
196
+ ./cloudsmith/cloudsmith --version
197
+ ```
198
+
199
+ Available targets: `linux-x86_64-gnu`, `linux-x86_64-musl`, `linux-aarch64-gnu`, `linux-aarch64-musl`, `macos-arm64`, `macos-x86_64`, and `windows-x86_64` (as a `.zip`).
200
+
201
+ Standalone binaries include all optional features, including AWS OIDC support.
202
+
203
+ #### Verifying Linux binaries
204
+
205
+ The four Linux archives (`linux-x86_64-gnu`, `linux-x86_64-musl`, `linux-aarch64-gnu`, `linux-aarch64-musl`) are GPG-signed with a detached binary signature published alongside each archive as `<archive>.sig`. To verify, import the Cloudsmith CLI release public key (`cloudsmith-cli-release-key.asc`, attached to each GitHub release) and check the signature:
206
+
207
+ ```
208
+ gpg --import cloudsmith-cli-release-key.asc
209
+ gpg --verify cloudsmith-<version>-linux-x86_64-gnu.tar.gz.sig cloudsmith-<version>-linux-x86_64-gnu.tar.gz
210
+ ```
211
+
212
+ A successful verification reports a good signature from the Cloudsmith CLI release key. (The macOS and Windows binaries are not GPG-signed; native signing for those platforms is tracked separately.)
213
+
214
+ ### Optional Dependencies
215
+
216
+ The CLI supports optional extras for additional functionality:
217
+
218
+ #### AWS OIDC Support
219
+
220
+ For AWS environments (ECS, EKS, EC2), install with `aws` extra to enable automatic credential discovery:
221
+
222
+ ```
223
+ pip install cloudsmith-cli[aws]
224
+ ```
225
+
226
+ This installs `boto3[crt]` for AWS credential chain support, STS token generation, and AWS SSO compatibility.
227
+
228
+ #### All Optional Features
229
+
230
+ To install all optional dependencies:
231
+
232
+ ```
233
+ pip install cloudsmith-cli[all]
234
+ ```
235
+
236
+ **Note:** If you don't install the AWS extra, the AWS OIDC detector will gracefully skip itself with no errors.
237
+
238
+ #### Bitbucket Pipelines OIDC Support
239
+
240
+ In Bitbucket Pipelines, OIDC credential discovery works out of the box with no extra dependencies. Set `oidc: true` on the pipeline step and the CLI reads the token from the `BITBUCKET_STEP_OIDC_TOKEN` variable that Bitbucket populates. The Cloudsmith OIDC provider must expect the workspace audience that Bitbucket mints (`ari:cloud:bitbucket::workspace/<workspace-uuid>`):
241
+
242
+ ```yaml
243
+ pipelines:
244
+ default:
245
+ - step:
246
+ oidc: true
247
+ script:
248
+ - cloudsmith push ...
249
+ ```
250
+
251
+ See the [Bitbucket Pipelines OIDC documentation](https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/).
252
+
253
+ #### CircleCI OIDC Support
254
+
255
+ In CircleCI, OIDC credential discovery works out of the box with no extra dependencies — the CLI reads the token from the `CIRCLE_OIDC_TOKEN_V2` (preferred) or `CIRCLE_OIDC_TOKEN` environment variable that CircleCI injects into every job. The Cloudsmith OIDC provider must expect the audience CircleCI mints, which is your CircleCI organization UUID. See the [Cloudsmith CircleCI integration guide](https://docs.cloudsmith.com/integrations/integrating-with-circleci).
256
+
257
+ #### Azure DevOps OIDC Support
258
+
259
+ In Azure DevOps Pipelines, OIDC credential discovery works out of the box with no extra dependencies — the CLI fetches an OIDC token from the `SYSTEM_OIDCREQUESTURI` endpoint using the pipeline's `SYSTEM_ACCESSTOKEN`. Make sure `SYSTEM_ACCESSTOKEN` is mapped into the step's environment. The Cloudsmith OIDC provider must expect the audience `api://AzureADTokenExchange`, which Azure DevOps always mints (any requested audience is ignored). See the [Cloudsmith Azure DevOps integration guide](https://docs.cloudsmith.com/integrations/integrating-with-azure-devops).
260
+
261
+ #### GitHub Actions OIDC Support
262
+
263
+ In GitHub Actions, OIDC credential discovery works out of the box with no extra dependencies — the CLI fetches an OIDC token from the Actions runtime when the workflow requests `id-token: write` permission. See the [Cloudsmith GitHub Actions OIDC guide](https://docs.cloudsmith.com/authentication/setup-cloudsmith-to-authenticate-with-oidc-in-github-actions).
264
+
265
+ #### GitLab CI OIDC Support
266
+
267
+ In GitLab CI/CD, OIDC credential discovery works out of the box with no extra dependencies. Configure an [`id_tokens`](https://docs.gitlab.com/ci/cloud_services/) entry in your `.gitlab-ci.yml` with an `aud` of `https://api.cloudsmith.io/openid/<your-org>` and expose it as `CLOUDSMITH_OIDC_TOKEN`, and the CLI will pick it up automatically:
268
+
269
+ ```yaml
270
+ job:
271
+ id_tokens:
272
+ CLOUDSMITH_OIDC_TOKEN:
273
+ aud: https://api.cloudsmith.io/openid/<your-org>
274
+ script:
275
+ - cloudsmith push ...
276
+ ```
277
+
278
+ See the [Cloudsmith GitLab CI/CD integration guide](https://docs.cloudsmith.com/integrations/integrating-with-gitlab-cicd).
279
+
280
+ #### Generic OIDC Support (Jenkins, custom CI/CD)
281
+
282
+ As a fallback for environments without a dedicated detector (for example Jenkins with the [credentials binding plugin](https://plugins.jenkins.io/credentials-binding/), or any custom CI/CD system), set the `CLOUDSMITH_OIDC_TOKEN` environment variable to an OIDC JWT and the CLI will exchange it for a Cloudsmith access token. This detector runs last, so a dedicated environment is always preferred when present. See the [Cloudsmith Jenkins OIDC guide](https://docs.cloudsmith.com/authentication/setup-jenkins-to-authenticate-to-cloudsmith-using-oidc).
283
+
284
+ #### Controlling OIDC Detector Selection
285
+
286
+ By default the CLI tries each detector in a fixed priority order and uses the first that matches. Two controls let you override this when a detector matches an environment you don't want it to (for example, the AWS detector matching ambient instance credentials):
287
+
288
+ - **Disable a detector** — set `CLOUDSMITH_OIDC_<DETECTOR>_DISABLED=true` to skip it entirely. Only the literal value `true` (case-insensitive) disables; anything else leaves the detector enabled. For example, `CLOUDSMITH_OIDC_AWS_DISABLED=true` skips the AWS detector so an explicitly-set `CLOUDSMITH_OIDC_TOKEN` is picked up by the generic detector instead.
289
+ - **Reorder evaluation** — use `--oidc-detector-order` (or the `CLOUDSMITH_OIDC_DETECTOR_ORDER` environment variable) with a comma-separated list of detector ids to control both which detectors are considered and the order they are tried in (first match wins). Ids not listed are skipped; unrecognised ids are ignored with a warning. For example, `--oidc-detector-order=generic,aws` tries the generic detector first and considers only those two.
290
+
291
+ When both are set, the order list defines the candidate set and sequence, then the `*_DISABLED` flags are applied on top — so a disabled detector is always skipped even if it appears in the order list. Detector ids are: `aws`, `azure_devops`, `bitbucket`, `circleci`, `generic`, `github`, `gitlab`.
292
+
293
+ Both controls can also be set in `config.ini`, under `[default]` or a profile section:
294
+
295
+ ```ini
296
+ [default]
297
+ oidc_detector_order = github, aws
298
+ oidc_disabled_detectors = aws, gitlab
299
+ ```
300
+
301
+ The `--oidc-detector-order` flag (or the `CLOUDSMITH_OIDC_DETECTOR_ORDER` environment variable) overrides the `oidc_detector_order` config value. The `oidc_disabled_detectors` config key is additive with the per-detector `CLOUDSMITH_OIDC_<DETECTOR>_DISABLED` environment variables — a detector disabled by either is skipped.
302
+
303
+ ## Configuration
304
+
305
+ There are two configuration files used by the CLI:
306
+
307
+ - `config.ini`: For non-credentials configuration.
308
+ - `credentials.ini`: For credentials (authentication) configuration.
309
+
310
+ By default, the CLI will look for these in the following locations:
311
+
312
+ - The current working directory.
313
+ - A directory called `cloudsmith` in the OS-defined application directory. For example:
314
+ - Linux:
315
+ - `$HOME/.config/cloudsmith`
316
+ - `$HOME/.cloudsmith`
317
+ - Mac OS:
318
+ - `$HOME/Library/Application Support/cloudsmith`
319
+ - `$HOME/.cloudsmith`
320
+ - Windows:
321
+ - `C:\Users\<user>\AppData\Local\cloudsmith` (Win7+, not roaming)
322
+ - `C:\Users\<user>\AppData\Roaming\cloudsmith` (Win7+, roaming)
323
+ - `C:\Documents and Settings\<user>\Application Data\cloudsmith` (WinXP, not roaming)
324
+ - `C:\Documents and Settings\<user>\Local Settings\Application Data\cloudsmith` (WinXP, roaming)
325
+ - `C:\Documents and Settings\<user>\.cloudsmith`
326
+
327
+ Both configuration files use the simple INI format, such as:
328
+
329
+ ```
330
+ [default]
331
+ api_key=1234567890abcdef1234567890abcdef
332
+ ```
333
+
334
+ Additionally, the CLI will store SSO access and refresh tokens in the system keyring
335
+ using the [`keyring`](https://github.com/jaraco/keyring) library.
336
+
337
+
338
+ ### Non-Credentials (config.ini)
339
+
340
+ See the [default config](https://raw.githubusercontent.com/cloudsmith-io/cloudsmith-cli/master/cloudsmith_cli/data/config.ini) in GitHub:
341
+
342
+ You can specify the following configuration options:
343
+
344
+ - `api_host`: The API host to connect to.
345
+ - `api_proxy`: The API proxy to connect through.
346
+ - `api_ssl_verify`: Whether or not to use SSL verification for requests.
347
+ - `api_user_agent`: The user agent to use for requests.
348
+
349
+ ### Credentials (credentials.ini)
350
+
351
+ See the [default config](https://raw.githubusercontent.com/cloudsmith-io/cloudsmith-cli/master/cloudsmith_cli/data/credentials.ini) in GitHub:
352
+
353
+ You can specify the following configuration options:
354
+
355
+ - `api_key`: The API key for authenticating with the API.
356
+
357
+
358
+ ### Authenticating
359
+
360
+ You'll need to provide authentication to Cloudsmith for any CLI actions that result in accessing private data or making changes to resources (such as pushing a new package to a repository)..
361
+
362
+ #### SAML authentication
363
+
364
+ You can authenticate using your organization's SAML provider, if configured, with the `cloudsmith auth` command:
365
+ ```
366
+ cloudsmith auth --owner example
367
+ Beginning authentication for the example org ...
368
+ Opening your organization's SAML IDP URL in your browser: https://example.com/some-saml-idp
369
+
370
+ Starting webserver to begin authentication ...
371
+
372
+ Authentication complete
373
+ ```
374
+
375
+ #### Getting Your API Key
376
+
377
+ You can retrieve your API key using the `cloudsmith login` command:
378
+
379
+ ```
380
+ cloudsmith login
381
+ Login: you@example.com
382
+ Password:
383
+ Repeat for confirmation:
384
+ ```
385
+
386
+ *Note:* Please ensure you use your email for the 'Login' prompt and not your user slug/identifier.
387
+
388
+ The resulting output looks something like:
389
+
390
+ ```
391
+ Retrieving API token for 'you@example.com' ... OK
392
+ Your API token is: 1234567890abcdef1234567890abcdef
393
+ ```
394
+
395
+ Once you have your API key you can then put this into your `credentials.ini`, use it as an environment variable `export CLOUDSMITH_API_KEY=your_key_here` or pass it to the CLI using the `-k your_key_here` flag.
396
+
397
+ For convenience the CLI will ask you if you want to install the default configuration files, complete with your API key, if they don't already exist. Say 'y' or 'yes' to create the configuration files.
398
+
399
+ If the configuration files already exist, you'll have to manually put the API key into the configuration files, but the CLI will print out their locations.
400
+
401
+
402
+ ## Uploading Packages
403
+
404
+ Although native uploads, i.e. those supported by the native ecosystem of a package format, are often preferred; it's easy to publish with the Cloudsmith CLI too!
405
+
406
+ 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**):
407
+
408
+ ```
409
+ cloudsmith push deb your-org/your-repo/ubuntu/xenial libxml2-2.9.4-2.x86_64.deb
410
+ ```
411
+
412
+ Want to know how to do it with another packaging format? Easy, just ask for help:
413
+
414
+ ```
415
+ cloudsmith push rpm --help
416
+ ```
417
+
418
+
419
+ ## Downloading Packages
420
+
421
+ You can download packages from repositories using the `cloudsmith download` command. The CLI supports various filtering options to help you find and download the exact package you need.
422
+
423
+ For example, to download a specific package:
424
+
425
+ ```
426
+ cloudsmith download your-org/your-repo package-name
427
+ ```
428
+
429
+ You can filter by various attributes like version, format, architecture, operating system, and tags:
430
+
431
+ ```
432
+ # Download a specific version
433
+ cloudsmith download your-org/your-repo package-name --version 1.2.3
434
+
435
+ # Filter by format and architecture
436
+ cloudsmith download your-org/your-repo package-name --format deb --arch amd64
437
+
438
+ # Filter by package tag (e.g., latest, stable, beta)
439
+ cloudsmith download your-org/your-repo package-name --tag latest
440
+
441
+ # Combine tag with metadata filters
442
+ cloudsmith download your-org/your-repo package-name --tag stable --format deb --arch arm64
443
+
444
+ # Filter by filename (exact or glob pattern)
445
+ cloudsmith download your-org/your-repo package-name --filename '*.nupkg'
446
+ cloudsmith download your-org/your-repo package-name --filename 'mypackage-1.0.0.snupkg'
447
+
448
+ # Download all matching packages (when multiple packages share the same name/version)
449
+ cloudsmith download your-org/your-repo package-name --download-all
450
+
451
+ # Combine --download-all with --filename to download a subset
452
+ cloudsmith download your-org/your-repo package-name --download-all --filename '*.snupkg'
453
+
454
+ # Download all associated files (POM, sources, javadoc, etc.)
455
+ cloudsmith download your-org/your-repo package-name --all-files
456
+
457
+ # Preview what would be downloaded without actually downloading
458
+ cloudsmith download your-org/your-repo package-name --dry-run
459
+ ```
460
+
461
+ For more advanced usage and all available options:
462
+
463
+ ```
464
+ cloudsmith download --help
465
+ ```
466
+
467
+
468
+ ## Package Metadata
469
+
470
+ 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.
471
+
472
+ 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.
473
+
474
+ To attach metadata to an existing package:
475
+
476
+ ```
477
+ cloudsmith metadata add your-org/your-repo/your-pkg \
478
+ --content-type application/json \
479
+ --content '{"build_id": "demo-123", "git_sha": "abc123"}'
480
+ ```
481
+
482
+ To attach metadata from a file (use `-` to read from stdin):
483
+
484
+ ```
485
+ cloudsmith metadata add your-org/your-repo/your-pkg \
486
+ --content-type application/vnd.jfrog.buildinfo+json \
487
+ --file buildinfo.json
488
+ ```
489
+
490
+ To list all metadata entries on a package, or fetch a single entry by slug:
491
+
492
+ ```
493
+ cloudsmith metadata list your-org/your-repo/your-pkg
494
+ cloudsmith metadata list your-org/your-repo/your-pkg meta-slug-perm
495
+ ```
496
+
497
+ Filter entries by source kind or classification when listing:
498
+
499
+ ```
500
+ cloudsmith metadata list your-org/your-repo/your-pkg --classification sbom
501
+ cloudsmith metadata list your-org/your-repo/your-pkg --source-kind third_party
502
+ ```
503
+
504
+ To replace the content or source identity of an existing entry (content type is fixed after creation):
505
+
506
+ ```
507
+ cloudsmith metadata update your-org/your-repo/your-pkg meta-slug-perm \
508
+ --content '{"build_id": "demo-124"}'
509
+ ```
510
+
511
+ To remove a metadata entry:
512
+
513
+ ```
514
+ cloudsmith metadata remove your-org/your-repo/your-pkg meta-slug-perm
515
+ ```
516
+
517
+ For all available options:
518
+
519
+ ```
520
+ cloudsmith metadata --help
521
+ ```
522
+
523
+
524
+ ## Attaching Metadata During Push
525
+
526
+ 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.
527
+
528
+ Available flags on every push subcommand:
529
+
530
+ - `--metadata-content-file PATH`: Path to a JSON file containing the metadata content. Use `-` for stdin.
531
+ - `--metadata-content JSON`: Inline JSON content. Mutually exclusive with `--metadata-content-file`.
532
+ - `--metadata-content-type MIME`: MIME type of the metadata payload (e.g. `application/json`, `application/vnd.jfrog.buildinfo+json`). Required when content is provided.
533
+ - `--metadata-source-identity TEXT`: Identifier indicating where the metadata originated. Defaults to `cloudsmith-cli@<version>`.
534
+ - `--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.
535
+
536
+ Push a package with inline metadata:
537
+
538
+ ```
539
+ cloudsmith push raw your-org/your-repo payload.txt \
540
+ --name demo --version 1.0.0 \
541
+ --metadata-content '{"build_id": "demo-inline", "git_sha": "abc123"}' \
542
+ --metadata-content-type application/json
543
+ ```
544
+
545
+ Push a package with metadata loaded from a file:
546
+
547
+ ```
548
+ cloudsmith push raw your-org/your-repo payload.txt \
549
+ --name demo --version 1.0.0 \
550
+ --metadata-content-file buildinfo.json \
551
+ --metadata-content-type application/vnd.jfrog.buildinfo+json
552
+ ```
553
+
554
+ ### Failure Behavior
555
+
556
+ 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.
557
+
558
+ 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):
559
+
560
+ 1. The `--on-metadata-failure warn` CLI flag on `cloudsmith push` (per-push override):
561
+
562
+ ```
563
+ cloudsmith push raw your-org/your-repo payload.txt \
564
+ --name demo --version 1.0.0 \
565
+ --metadata-content-file buildinfo.json \
566
+ --metadata-content-type application/vnd.jfrog.buildinfo+json \
567
+ --on-metadata-failure warn
568
+ ```
569
+
570
+ 2. The `CLOUDSMITH_METADATA_FAILURE_MODE` environment variable set to `warn` or `0` (per-shell):
571
+
572
+ ```
573
+ CLOUDSMITH_METADATA_FAILURE_MODE=warn cloudsmith push raw your-org/your-repo payload.txt \
574
+ --name demo --version 1.0.0 \
575
+ --metadata-content-file buildinfo.json \
576
+ --metadata-content-type application/vnd.jfrog.buildinfo+json
577
+ ```
578
+
579
+ 3. The `metadata_failure_mode` key in `config.ini` set to `error`, `warn`, or `0` (persistent default):
580
+
581
+ ```ini
582
+ [default]
583
+ metadata_failure_mode = warn
584
+ ```
585
+
586
+
587
+ ## Contributing
588
+
589
+ 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).
590
+
591
+
592
+ ## License
593
+
594
+ Copyright 2018 Cloudsmith Ltd
595
+
596
+ Licensed under the Apache License, Version 2.0 (the "License");
597
+ you may not use this file except in compliance with the License.
598
+
599
+ http://www.apache.org/licenses/LICENSE-2.0
600
+
601
+ Unless required by applicable law or agreed to in writing, software
602
+ distributed under the License is distributed on an "AS IS" BASIS,
603
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
604
+ See the License for the specific language governing permissions and
605
+ limitations under the License.
606
+
607
+
608
+ ## EOF
609
+
610
+ This quality product was brought to you by [Cloudsmith](https://cloudsmith.io) and the [fine folks who have contributed](https://github.com/cloudsmith-io/cloudsmith-cli/blob/master/CONTRIBUTORS.md).