Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions cloudsmith_cli/cli/commands/credential_helper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,20 @@ def credential_helper():
manager automatically, or run the runtime command directly for debugging.
Examples:
\b
# Install Docker credential helper
$ cloudsmith credential-helper install docker
\b
Comment thread
nikshankarnoble marked this conversation as resolved.
# Install pnpm credential helper
$ cloudsmith credential-helper install pnpm
\b
# Install cargo credential helper
$ cloudsmith credential-helper install cargo
\b
# Test Docker credential helper directly
$ echo "docker.cloudsmith.io" | cloudsmith credential-helper docker
\b
# Test pnpm credential helper directly
$ cloudsmith credential-helper pnpm npm.cloudsmith.io
"""
Expand Down
9 changes: 8 additions & 1 deletion cloudsmith_cli/cli/commands/credential_helper/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,30 @@ def docker(opts, operation):
``workspace`` in ``config.ini``; legacy aliases are also accepted - and a
valid API key/token).

\b
Input (stdin):
Server URL as plain text (e.g. "docker.cloudsmith.io")

\b
Output (stdout):
JSON: {"Username": "token", "Secret": "<cloudsmith-token>"}

\b
Exit codes:
0: Success
1: Error (no credentials available, not a Cloudsmith registry, etc.)

\b
Examples:

\b
# Manual testing
$ echo "docker.cloudsmith.io" | cloudsmith credential-helper docker

\b
Comment thread
nikshankarnoble marked this conversation as resolved.
# Called by Docker via launcher
$ echo "docker.cloudsmith.io" | docker-credential-cloudsmith get

\b
Environment variables:
CLOUDSMITH_API_KEY: API key for authentication (optional)
CLOUDSMITH_WORKSPACE: Workspace slug (CLOUDSMITH_ORG is also accepted)
Expand Down
6 changes: 4 additions & 2 deletions cloudsmith_cli/cli/commands/credential_helper/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ def terraform(opts, repo, params):

\b
Examples:

\b
# Direct usage
$ cloudsmith credential-helper terraform --repo my-repo terraform.cloudsmith.io
{"token": "..."}

\b
Comment thread
cloudsmith-iduffy marked this conversation as resolved.
# Terraform's calling convention (verb + hostname)
$ cloudsmith credential-helper terraform --repo my-repo get terraform.cloudsmith.io

\b
# Select an org and profile explicitly (no env vars needed)
$ cloudsmith credential-helper terraform --org=acme -P ci get terraform.cloudsmith.io

Expand Down
1 change: 1 addition & 0 deletions cloudsmith_cli/cli/commands/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def list_domains( # pylint: disable=too-many-arguments
paginated endpoint, so there is no benefit to hiding entries by default.
Passing --page or --page-size switches to paged output.
\b
Output (stdout):
JSON: {"version": 1, "domains": [{"host": ..., "format": ...,
"type": ..., "domain_type": ..., "workspace": ..., "repository": ...,
Expand Down
17 changes: 9 additions & 8 deletions cloudsmith_cli/cli/commands/entitlements.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,16 @@

rows = []
for entitlement in sorted(data, key=itemgetter("name")):
name = entitlement.get("name", "")

Check failure on line 202 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:202:16: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
user = entitlement.get("user", "")

Check failure on line 203 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:203:16: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
updated_at = fmt_datetime(entitlement.get("updated_at", ""))

Check failure on line 204 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:204:35: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
created_at = fmt_datetime(entitlement.get("created_at", ""))

Check failure on line 205 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:205:35: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
is_active = entitlement.get("is_active", "")

Check failure on line 206 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:206:21: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
is_limited = entitlement.get("is_limited", "")

Check failure on line 207 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:207:22: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`

scheduled_reset_period = entitlement.get("scheduled_reset_period", "")

Check failure on line 209 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:209:34: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
limit_bandwidth = entitlement.get("limit_bandwidth", "")

Check failure on line 210 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:210:27: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
limit_bandwidth_unit = entitlement.get("limit_bandwidth_unit", "")

Check failure on line 211 in cloudsmith_cli/cli/commands/entitlements.py

View workflow job for this annotation

GitHub Actions / ty

ty (unresolved-attribute)

cloudsmith_cli/cli/commands/entitlements.py:211:32: unresolved-attribute: Object of type `SupportsGetItem[Any, Any]` has no attribute `get`
limit_num_clients = entitlement.get("limit_num_clients", "")
limit_num_downloads = entitlement.get("limit_num_downloads", "")
limit_date_range_from = fmt_datetime(
Expand Down Expand Up @@ -775,14 +775,15 @@

Full CLI example:

$ cloudsmith entitlements restrict cloudsmith/testing-private/9xGSdAxlIqIV \
--limit-bandwidth=1 \
--limit-bandwidth-unit=gigabyte \
--limit-num-clients=10 \
--limit-num-downloads=1000 \
--limit-package-query="package-darwin-amd64 OR package-windows-amd64 OR package-linux-amd64" \
--limit-path-query=tag:latest \
--limit-date-range-from=2020-01-01T00:00:00Z \
\b
$ cloudsmith entitlements restrict cloudsmith/testing-private/9xGSdAxlIqIV \\
--limit-bandwidth=1 \\
--limit-bandwidth-unit=gigabyte \\
--limit-num-clients=10 \\
--limit-num-downloads=1000 \\
--limit-package-query="package-darwin-amd64 OR package-windows-amd64 OR package-linux-amd64" \\
--limit-path-query=tag:latest \\
--limit-date-range-from=2020-01-01T00:00:00Z \\
--limit-date-range-to=2077-01-01T00:00:00Z
"""
owner, repo, identifier = owner_repo_identifier
Expand Down
1 change: 1 addition & 0 deletions cloudsmith_cli/cli/commands/list_.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def packages(ctx, opts, owner_repo, page, page_size, query, sort, page_all):

--query 'name:^foo$ filename:.zip$ architecture:~x86'

\b
You can sort the results using --sort with these fields:
- date/-date: Sort by creation date
- downloads/-downloads: Sort by download count
Expand Down
12 changes: 7 additions & 5 deletions cloudsmith_cli/cli/commands/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def configure(ctx, opts, client, is_global): # pylint: disable=unused-argument
"""
Configure the Cloudsmith MCP server for supported clients.

\b
This command automatically adds the Cloudsmith MCP server configuration
to the specified client's configuration file. Supported clients are:
- Claude Desktop
Expand All @@ -211,11 +212,12 @@ def configure(ctx, opts, client, is_global): # pylint: disable=unused-argument
For Claude Code, --global edits ~/.claude.json (user scope) and
--local writes ./.mcp.json (project scope, intended to be committed).

Examples:\n
cloudsmith mcp configure --client claude\n
cloudsmith mcp configure --client claude-code\n
cloudsmith mcp configure --client cursor --local\n
cloudsmith mcp configure --client gemini-cli\n
\b
Examples:
cloudsmith mcp configure --client claude
cloudsmith mcp configure --client claude-code
cloudsmith mcp configure --client cursor --local
cloudsmith mcp configure --client gemini-cli
cloudsmith mcp configure # Auto-detect and configure all
"""

Expand Down
1 change: 1 addition & 0 deletions cloudsmith_cli/cli/commands/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def remove_metadata(ctx, opts, owner_repo_package, metadata_slug_perm, yes):
"""
Remove package metadata.

\b
OWNER/REPO/PACKAGE: target package.
METADATA_SLUG_PERM: permanent slug for the metadata entry.

Expand Down
Loading