Automating Cloudsmith
Cloudsmith provides programmatic tools for common workflows, including package operations and managing repositories, policies, and privileges as code. Many teams start by scripting uploads from a pipeline and expand their automation over time.
This guide steps through the tools available, from authenticating through to event-driven automation. Each step links to the detailed documentation for that topic.
Step 1: authenticate your tooling
Use a personal API key for local automation, or use a service account with OpenID Connect for CI/CD as described below.
API keyCredentials for pipelines
For CI/CD, create a service account rather than using a personal key, and authenticate it with OpenID Connect so your pipeline uses short-lived tokens instead of a stored long-lived key. Where long-lived keys are unavoidable, API key rules enforce a maximum key age across the workspace.
Step 2: use the command-line interface
The Cloudsmith CLI wraps the API in a text-based interface, and is the quickest way to script uploads, downloads, and day-to-day package management.
Command-line interfaceStep 3: call the API directly
The REST API covers repositories, packages, policies, and workspace management, with client libraries available if you would rather not write HTTP calls by hand.
API referenceStep 4: manage your resources as code
The verified Terraform provider lets you declare repositories, policies, and other resources alongside the rest of your infrastructure.
Terraform providerStep 5: react to events
Webhooks push repository events, such as package uploads, synchronizations, and failures, into your own pipelines and chat tools.
WebhooksStep 6: connect an AI assistant
The CLI ships a Model Context Protocol server, letting AI assistants manage your repositories and packages through natural language.
MCP server support for Cloudsmith CLI