---
title: "Add Cloudsmith to your DevOps Toolkit | Cloudsmith"
description: "An introduction to automating with the Cloudsmith CLI."
canonical_url: "https://cloudsmith.com/blog/add-cloudsmith-to-your-devops-toolkit"
last_updated: "2020-04-23T15:33:24.000Z"
---
# Add Cloudsmith to your DevOps Toolkit | Cloudsmith

At Cloudsmith, we are all about automation and we believe that first-class command line tooling makes up a significant part of that. With that in mind, we are continually improving the Cloudsmith Command Line Interface (CLI). This short post will guide you through installing / setting up the CLI and show you some examples of the things you can achieve with it!

## Setup

The Cloudsmith CLI is built in Python atop the Cloudsmith API and as well as the API powering the CLI, we have designed the API so that it is fully compatible with [Swagger](https://swagger.io/) and [OpenAPI 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md), allowing us to generate bindings in more or less _any programming language_.

If you have Python set up already, then it is super simple to install the CLI from pip using:

`pip install cloudsmith-cli`

This will install the Cloudsmith CLI itself and any required dependencies.  
Once installed you can then configure the CLI it with:

`cloudsmith login`

This command will prompt you for your Cloudsmith username and password, and it will then retrieve your Cloudsmith API key and set up the required configuration and credential files automatically:

```json
{
  "_key": "8000a63681ed",
  "_type": "image",
  "alt": "cloudsmith login command",
  "asset": {
    "_createdAt": "2025-06-05T07:58:53Z",
    "_id": "image-88b88894774bd4854021752dbd82e1f387129fad-1244x346-png",
    "_rev": "2MVa2LY6RC9Yy6hPJdhS0D",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:53Z",
    "assetId": "88b88894774bd4854021752dbd82e1f387129fad",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "D35qhj~XC6Fwr;=~-rT2J8aJ",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 3.5953757225433525,
        "height": 346,
        "width": 1244
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAAAsSAAALEgHS3X78AAABMElEQVR4nH3OS0/bQBSG4ezxHGcu+BJrPGM78SUOIJGQgGgqVgip6qo/ocv+//VbpWUBUtXFo3NWr77F6fTI8/mV128/efv+i6evPxinO5oYKYuCNBWSq6t3CUnyf4tL8HA48XA8c9if2e/2HPueY1dz50uGXLO2QmsUuShEJSQqQSn1T4t5NzNuR4ZpYOh7btcbnvuGl97zpa14Cjknn3FfOqLRaBFECSKCEvXXx+B0O9HPPd3U0W5aNm3Htu3YtQ1z0zDHhm3dMJQ1wVWsdEm+zHHGoZ1GrKDSD8HxZmQ9rQmbgI+eugqEVSRWkVhGYt4QskhwgdrUBFPjjaewBTazpFmKmPe1l+C1z3DeYSuLLgzptUZnGltarLPY1GDEYOVy9Z//QotmmS6R5eeFvwE0bJzFIjjXGQAAAABJRU5ErkJggg==",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5f2d5c",
          "foreground": "#fff",
          "population": 1.61,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#9c1605",
          "foreground": "#fff",
          "population": 0.48,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5f2d5c",
          "foreground": "#fff",
          "population": 1.61,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#c9ccc5",
          "foreground": "#000",
          "population": 0.04,
          "title": "#000"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#849ce4",
          "foreground": "#000",
          "population": 0.01,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#4c5c9a",
          "foreground": "#fff",
          "population": 0.02,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#ed441c",
          "foreground": "#fff",
          "population": 1.35,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "Screenshot-2020-04-20-at-14.38.12.png",
    "path": "images/rafvlnhi/production/88b88894774bd4854021752dbd82e1f387129fad-1244x346.png",
    "sha1hash": "88b88894774bd4854021752dbd82e1f387129fad",
    "size": 245025,
    "uploadId": "FxzNQqpq79N7TunKSgZou8DzMMPqKc20",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/88b88894774bd4854021752dbd82e1f387129fad-1244x346.png"
  },
  "caption": "cloudsmith login command",
  "link": null,
  "markDefs": null
}
```

To check that it was all installed and configured correctly, use the command:

`cloudsmith whoami`

This will return the current user that the CLI is authenticating as:

```json
{
  "_key": "eed306a9f8e7",
  "_type": "image",
  "alt": "cloudsmith whoami command",
  "asset": {
    "_createdAt": "2025-06-05T07:58:53Z",
    "_id": "image-7d0d16824eae16460f46c095e5022109e488d567-770x93-png",
    "_rev": "2MVa2LY6RC9Yy6hPJdhSDR",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:53Z",
    "assetId": "7d0d16824eae16460f46c095e5022109e488d567",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "4A68U3-@R%NVRM",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 8.279569892473118,
        "height": 93,
        "width": 770
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsSAAALEgHS3X78AAAAjElEQVR4nD3DQQqCQBiAUU/gP0pYWZQ5iTbmwhpNDcGgpDpAi1Z1/0N87XrwnGNVY21F0w1cbi/G54fx8WW4vqmbO0VxIDc5xhgys0MnmmAxRWaCO3ERJSil/p2sqkltxf7UYLuetu1pyjNlajHrHL1MiKOYKI4I9ZxgG+BrH9kIshJUqPACD+UpRIQfL3M6EGbgMVgAAAAASUVORK5CYII=",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#623a62",
          "foreground": "#fff",
          "population": 0.48,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#1f546b",
          "foreground": "#fff",
          "population": 1.28,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8e9cee",
          "foreground": "#000",
          "population": 1.63,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#c4bfc1",
          "foreground": "#000",
          "population": 0.16,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8e9cee",
          "foreground": "#000",
          "population": 1.63,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5263a9",
          "foreground": "#fff",
          "population": 1.09,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#384f90",
          "foreground": "#fff",
          "population": 0.38,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-whoami-2.png",
    "path": "images/rafvlnhi/production/7d0d16824eae16460f46c095e5022109e488d567-770x93.png",
    "sha1hash": "7d0d16824eae16460f46c095e5022109e488d567",
    "size": 33859,
    "uploadId": "uREpEXRgJbRypqsvMIRVBcFlmEawV8nj",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/7d0d16824eae16460f46c095e5022109e488d567-770x93.png"
  },
  "caption": "cloudsmith whoami command",
  "link": null,
  "markDefs": null
}
```

```json
{
  "_key": "2c06faa51c34",
  "_type": "video",
  "id": "R-g8ZhDwTKk",
  "markDefs": null,
  "thumbnail": {
    "_type": "image",
    "asset": {
      "_ref": "image-810df887f6c8768ed7d04490c911e531d2201b96-480x360-jpg",
      "_type": "reference"
    }
  },
  "title": "Cloudsmith CLI Overview",
  "url": "https://www.youtube.com/embed/R-g8ZhDwTKk?feature=oembed"
}
```

## Let's try some commands!

Once you have the CLI installed and configured you can start to try out some of the operations. To get a list of the supported commands, just do:

`cloudsmith`

```json
{
  "_key": "c6258247c69d",
  "_type": "image",
  "alt": "cloudsmith commands",
  "asset": {
    "_createdAt": "2025-06-05T07:58:55Z",
    "_id": "image-b2a55115fa4af78230867b34ed84319ffa110e52-887x853-png",
    "_rev": "gnJeqIUmT5gWK5E6lfoGny",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:55Z",
    "assetId": "b2a55115fa4af78230867b34ed84319ffa110e52",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "e255IK?cD%oboaIskExuV?RhWHoit8W9M_x^xvWDRif3WHo$ogRif3",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 1.0398593200468933,
        "height": 853,
        "width": 887
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAACXBIWXMAAAsSAAALEgHS3X78AAAC1ElEQVR4nGVU2Y6bQBD0D8TGxsYGhmO4zGXAHN6VEiXSJm/5gUiR8v9/UVE1NutNHlozw8xUV3XXsKqqElV1wXB7w5e3X/j24w++fv+Nl88/0V0nlGUJP/CxM01sNhuJtYzGfW3MozHvrRzHged5CMMYoc4Q6DOCMIMfxlCeB+4fj0ccLAv7/QGmaQr4fr+XMLne7WAYM/DKsiwopeD7HlzXhePYsG1bgBzXWeZMqpQna8Z81sHpdBLgrbGdAbnpBwG01ghDRoggCOVbEATwfR8Bg/PAh3LVQoBJbNsWlmTIWDETAQgkobWAeZ4vF1ylBIRzYem6MhLQ93wBfEgWwBlICwNmZoL3UHAcSnM/APKcUi5cx5Xabrfbd8AoipBlGfI8R5Ik8P1ZZhTFyNIMSZLKflEUyM850iSV8hDcsW2p36MhUkMyozX66xWXywVpmiKOYvl27a5om1bGYRhkrMpKzuhQw1NKHECGDwsJIBmcz2foMFzkJnGCIs9R5IWAlEUp51gi1lRc4DigS1jDhSGlEIwg3KAENoKy4igCS0LGHAVMqVnm1hBm24XdHfByaUQqa0JAZmUSSu3aDm3bomnmMxzLohCvyov5tJ7H9XqJVV1VcpgMaAGyINA0TrhNN7y+vGKaJvR9j3EcZWQNLesIY3l+TwxZp6qqBJDs6MmmaTEMI8ZhxG16wTTe0F97WROcrOM4xul4fPfg5m4b2oWM2FU2iAzr+iJMCNL3gwA9r9lt3mOZLPHhDhtah4AE4oWhH4QpG9TeJdMqXdeh62ipRpKWZYWiKCUxLWM+PTthSDtQAhtBGTQzAVg/1oxs2AyCZNlZEvIM2QnYZq7jIvnhQdrmcDjIH4WXm3v367pGXdULM0rli4m0lvP/NYV1o+foL3aZgFpHwvYRfJJpmknEcSIxS7bkt/VBMplxkxf/NTETcc5I7sCRjiQh9x6qnn8OfwE3AweO5oOLnwAAAABJRU5ErkJggg==",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#38477a",
          "foreground": "#fff",
          "population": 0.02,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#202a67",
          "foreground": "#fff",
          "population": 0.02,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8695ea",
          "foreground": "#000",
          "population": 0.28,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#838aba",
          "foreground": "#fff",
          "population": 0.05,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8695ea",
          "foreground": "#000",
          "population": 0.28,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5866a7",
          "foreground": "#fff",
          "population": 0.08,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#4c4ca4",
          "foreground": "#fff",
          "population": 0,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-commands-2.png",
    "path": "images/rafvlnhi/production/b2a55115fa4af78230867b34ed84319ffa110e52-887x853.png",
    "sha1hash": "b2a55115fa4af78230867b34ed84319ffa110e52",
    "size": 252371,
    "uploadId": "qrp3yMsQ3CnQfIkWbKnmBlO5WstCcmGV",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/b2a55115fa4af78230867b34ed84319ffa110e52-887x853.png"
  },
  "caption": "cloudsmith commands",
  "link": null,
  "markDefs": null
}
```

There is a LOT you (or the systems you are automating!) can do with the Cloudsmith CLI, but rather than explore every single command here how about we start with what is sure to be a very common use-case - uploading (pushing) a package.

We can see above that the command will be `cloudsmith push`, and you can get additional help and information on any command by using the `-h` flag:

```json
{
  "_key": "bdb6dbf02a49",
  "_type": "image",
  "alt": "cloudsmith push npm -h",
  "asset": {
    "_createdAt": "2025-06-05T07:58:54Z",
    "_id": "image-d0b3aab569097740e633ce59e5641497ef29146a-859x267-png",
    "_rev": "gnJeqIUmT5gWK5E6lfoGei",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:54Z",
    "assetId": "d0b3aab569097740e633ce59e5641497ef29146a",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "D45E$}?dRjV=Rgx{xwWCV=ny",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 3.2172284644194757,
        "height": 267,
        "width": 859
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAAAsSAAALEgHS3X78AAABDElEQVR4nGWQ20rFMBBF+wWm99Jr0rS5tAeqrYqgUJSDH+CbIP7/Z2yZUSsHHxYZwmRlzwTLsmBZrnH/8IL9/I7n10/s5w887m+4vXvCum7Y1g3UdzqdYI1F27ZIkgRCiH8EWmsYY+H8DD8tmOYbTPPKtbUexhjoXrOkrmtUVYU8zxFFEQvCMLwgkJ3EOI4YhgFKKfQ90V9APU3TMCTMsgxxHB9EUfQnpN8nP8F7z2IzGk5Fqcefmu61HkDT9Eqh6zqWt03LZ1EUhzSgRpI552CthXe/tWMhQem/k3ac9kivekgpUZblsYJASnU8oAQkJYZhRMfNtLOC95amKUM1QaNnaYYkTiBCgSsh8AWIEqPq+TJmpQAAAABJRU5ErkJggg==",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#343472",
          "foreground": "#fff",
          "population": 0.02,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#253271",
          "foreground": "#fff",
          "population": 0.35,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#253271",
          "foreground": "#fff",
          "population": 0.35,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8490bf",
          "foreground": "#fff",
          "population": 0.03,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#acb1f4",
          "foreground": "#000",
          "population": 0.02,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5665a3",
          "foreground": "#fff",
          "population": 0.26,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#445c97",
          "foreground": "#fff",
          "population": 0.03,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-push-npm-h-1.png",
    "path": "images/rafvlnhi/production/d0b3aab569097740e633ce59e5641497ef29146a-859x267.png",
    "sha1hash": "d0b3aab569097740e633ce59e5641497ef29146a",
    "size": 69047,
    "uploadId": "KPD4HRexrhYiGORguKyT27MnQIsTUKcA",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/d0b3aab569097740e633ce59e5641497ef29146a-859x267.png"
  },
  "caption": "cloudsmith push npm -h",
  "link": null,
  "markDefs": null
}
```

OK, that makes more sense now! So to push an `npm` package we need the push command, the repository owner (namespace), repository identifier, and the package file name! Easy:

`cloudsmith push npm OWNER/REPO PACKAGE_FILE`

```json
{
  "_key": "6340ba54bc0d",
  "_type": "image",
  "alt": "cloudsmith push npm",
  "asset": {
    "_createdAt": "2025-06-05T07:58:54Z",
    "_id": "image-4772f1be9ffff7068be09136773e320c3186d59b-1508x298-png",
    "_rev": "gnJeqIUmT5gWK5E6lfoG8J",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:54Z",
    "assetId": "4772f1be9ffff7068be09136773e320c3186d59b",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "423[@:?ws@xck8",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 5.060402684563758,
        "height": 298,
        "width": 1508
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAAsSAAALEgHS3X78AAAA10lEQVR4nEXM30rDMBhA8T6BTfIl6beutMn6x1ExcwMHKgheeuX7P80RO8WLH5yrU5XyxPP1g9f3L17ePjmfr6zryv1xYZln5mlmHEf61LPv9uzaFtUdqroJIWCtxRizqcpj4VQunE9XSrlwfFiZ1onD8UBaEmlO9FNPm1u0V2LbIMHjRDbWOYz9YTfVvEyM00geM13u0NTgk0cG+eWRJEgWYm5ohgZRjwseEwLGe4wPtxah0qzEIeIGwfSGuq25i//qaKi13tidxanDNQ4XAzbG2+iP93wD3hJpZrM/akEAAAAASUVORK5CYII=",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#29582b",
          "foreground": "#fff",
          "population": 2.89,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#045418",
          "foreground": "#fff",
          "population": 0.02,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#29582b",
          "foreground": "#fff",
          "population": 2.89,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#b0c0b8",
          "foreground": "#000",
          "population": 0.02,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8694df",
          "foreground": "#000",
          "population": 0.28,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5561a5",
          "foreground": "#fff",
          "population": 0.37,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#48549d",
          "foreground": "#fff",
          "population": 0.04,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-push-npm-2.png",
    "path": "images/rafvlnhi/production/4772f1be9ffff7068be09136773e320c3186d59b-1508x298.png",
    "sha1hash": "4772f1be9ffff7068be09136773e320c3186d59b",
    "size": 109218,
    "uploadId": "90nsdb1nYKooxpLxJrsEdWvJQn76ckRx",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/4772f1be9ffff7068be09136773e320c3186d59b-1508x298.png"
  },
  "caption": "cloudsmith push npm",
  "link": null,
  "markDefs": null
}
```

Right, that works! The CLI has now uploaded the files, created the package and waited for synchronisation to complete (synchronisation is where we extract the metadata and files associated with the package, and make the package available for download).

Remembering that all Cloudsmith repositories are fully multi-format, i.e you can upload any of the package types that we support into the _same_ repository, we can then push a Python package using the command:

`cloudsmith push python OWNER/REPO PACKAGE_FILE`

```json
{
  "_key": "ac47056806db",
  "_type": "image",
  "alt": "cloudsmith push python",
  "asset": {
    "_createdAt": "2025-06-05T07:58:54Z",
    "_id": "image-2dd29f29e1099aabfa32bf43e3bf02714c46190a-1514x254-png",
    "_rev": "yO7itY9PAzaQqagh0UPAHM",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:54Z",
    "assetId": "2dd29f29e1099aabfa32bf43e3bf02714c46190a",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "424V8m_4sHxct6",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 5.960629921259843,
        "height": 254,
        "width": 1514
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAAAsSAAALEgHS3X78AAAAsklEQVR4nB3GQW6DMBQAUW5QbPx/XSpiTOxgFJQCQUqkLCp11ftfaKqyGL2ptm3n8fjm9frl+fxhu+/MXzPlWhjLhbGM5EsmpUTOiT72+NYj74qqoiKIKM4J1lqqdV3ZljvrunNbFsqtMMyRMAVCOR2ejg8M00DIAf1UGnEYEYxzR/W/TUOVrolhinSlox1b9CyYaDC9wQSDDRYTLTZZNAt6VlznaLxSe8+b94f1h6dW5Q8PBVHzp+v8ygAAAABJRU5ErkJggg==",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#30505c",
          "foreground": "#fff",
          "population": 0.1,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#0e560e",
          "foreground": "#fff",
          "population": 4.28,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#0e560e",
          "foreground": "#fff",
          "population": 4.28,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#bab5b9",
          "foreground": "#000",
          "population": 0.23,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8591df",
          "foreground": "#000",
          "population": 0.24,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5462aa",
          "foreground": "#fff",
          "population": 0.42,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#646cb6",
          "foreground": "#fff",
          "population": 0.04,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-push-python-2.png",
    "path": "images/rafvlnhi/production/2dd29f29e1099aabfa32bf43e3bf02714c46190a-1514x254.png",
    "sha1hash": "2dd29f29e1099aabfa32bf43e3bf02714c46190a",
    "size": 107042,
    "uploadId": "5zWB2eAIhm7FCILD4CNHf2t0ihqYuhbh",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/2dd29f29e1099aabfa32bf43e3bf02714c46190a-1514x254.png"
  },
  "caption": "cloudsmith push python",
  "link": null,
  "markDefs": null
}
```

And to push a Cargo crate it would be:

`cloudsmith push cargo OWNER/REPO PACKAGE_FILE`

```json
{
  "_key": "deff07e78ae3",
  "_type": "image",
  "alt": "cloudsmith push cargo",
  "asset": {
    "_createdAt": "2025-06-05T07:58:54Z",
    "_id": "image-91ef5b011836127875941efdaa8afdafc5bbfd4a-1527x295-png",
    "_rev": "gnJeqIUmT5gWK5E6lfoGQp",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:54Z",
    "assetId": "91ef5b011836127875941efdaa8afdafc5bbfd4a",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "424C3N_4wkt8bq",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 5.176271186440678,
        "height": 295,
        "width": 1527
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAAsSAAALEgHS3X78AAAA4klEQVR4nE3MS07DMAAA0ZygdvxP0gZi4jSmQfQHLQWEkNix5P5nGUQQEoun2U2x3e44P33w+v7F5eWT/eHENG1Y55FhGEhDT+wjbdfStA31sqaqqlkIAWstqiyRUs6K4+HI+eHC5fzG6fGZ3WHH3X5Dvs+kTU83dbTTinqs8L3HXTlssGitKZVC/sz+KfJtJueRdV5zM0ZWaUWVKkIfcJ3DRINOGpMMPnlcZ9FBo4xGGDOTf5SiqGONjx4dNfJaIhrBwi9+uQXCC0QlkEtJuSxRTYnyCuUs0nuE93Olc0it+QYlM2sQOMrknAAAAABJRU5ErkJggg==",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#305d58",
          "foreground": "#fff",
          "population": 0.25,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#185817",
          "foreground": "#fff",
          "population": 2.43,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#185817",
          "foreground": "#fff",
          "population": 2.43,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#b4bcb8",
          "foreground": "#000",
          "population": 0.02,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8596e3",
          "foreground": "#000",
          "population": 0.3,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#5764a9",
          "foreground": "#fff",
          "population": 0.37,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#364a94",
          "foreground": "#fff",
          "population": 0.03,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-push-cargo-2.png",
    "path": "images/rafvlnhi/production/91ef5b011836127875941efdaa8afdafc5bbfd4a-1527x295.png",
    "sha1hash": "91ef5b011836127875941efdaa8afdafc5bbfd4a",
    "size": 124204,
    "uploadId": "ImMwBwpdQm7du3EFyKVSzAVQs3WKGeVP",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/91ef5b011836127875941efdaa8afdafc5bbfd4a-1527x295.png"
  },
  "caption": "cloudsmith push cargo",
  "link": null,
  "markDefs": null
}
```

I'm sure you're sensing a theme here... :-) . Some other formats (such as Debian or Maven) have additional requirements that change the command used, but help is always available using the `-h` flag.

The point is, it's simple, quick and easy! The whole idea of the Cloudsmith CLI is to _enable_ your automation, not get in your way. It supposed to make your life using Cloudsmith easier!

## Some other commands!

So what else can we do with the Cloudsmith CLI. Well, lots of things! Let's start by seeing how we can list the contents of a repository. To do this we use the command:

`cloudsmith list pkgs OWNER/REPO`

Like so:

```json
{
  "_key": "787000cd8238",
  "_type": "image",
  "alt": "other cli commands",
  "asset": {
    "_createdAt": "2025-06-05T07:58:54Z",
    "_id": "image-a594064024866917dbb43fc4dda3656100470bbc-1465x209-png",
    "_rev": "2MVa2LY6RC9Yy6hPJdhSno",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2025-06-05T07:58:54Z",
    "assetId": "a594064024866917dbb43fc4dda3656100470bbc",
    "extension": "png",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "422~id.APAkrsG",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 7.009569377990431,
        "height": 209,
        "width": 1465
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAAAsSAAALEgHS3X78AAAAq0lEQVR4nE3HwU6EMBRA0T5iYNJGKPS96QzTQUFh0MS4cuf//9Y1RhNdnMVx87bzsL6zvH7yuH1wKldUO1KKpGQMvaGDkrpEG1pCCDS+oTpUSCN/akHuBGf7C3FZifMNnWbOl8Q4enKOHHPBdOIcC1M3UeL3DZ89lVVU+k8vSBBc/7zSPW0MtzfysjMWZbwE8qnHjgXVKylkrDHsoLT3LXWqEZUf6Vd0OO/4ArU5SHwgVFwcAAAAAElFTkSuQmCC",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#58582b",
          "foreground": "#fff",
          "population": 0.4,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#1d5e1e",
          "foreground": "#fff",
          "population": 0.17,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#58582b",
          "foreground": "#fff",
          "population": 0.4,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#adadac",
          "foreground": "#000",
          "population": 0.22,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#7c8be5",
          "foreground": "#fff",
          "population": 0.33,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#606da6",
          "foreground": "#fff",
          "population": 0.17,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#4e5ea9",
          "foreground": "#fff",
          "population": 0.21,
          "title": "#fff"
        }
      }
    },
    "mimeType": "image/png",
    "originalFilename": "cloudsmith-list-pkgs-1.png",
    "path": "images/rafvlnhi/production/a594064024866917dbb43fc4dda3656100470bbc-1465x209.png",
    "sha1hash": "a594064024866917dbb43fc4dda3656100470bbc",
    "size": 86267,
    "uploadId": "y5kTiOzswtP8fSH05qlS8fQcMyqMKfRN",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/a594064024866917dbb43fc4dda3656100470bbc-1465x209.png"
  },
  "caption": null,
  "link": null,
  "markDefs": null
}
```

Again, it's Easy! It will probably come as no surprise at all at this point that the command to get a list of all repositories for an account is just:  
`cloudsmith list repos OWNER`

And similarily, the command to retreive a list of all the Entitlement Tokens created in a repository is simply:  
`cloudsmith list ents OWNER/REPO`

We've also got the following resources to help you:

- [CLI Documentation](https://help.cloudsmith.io/docs/cli), for additional help.
- [CLI GitHub Repository](https://github.com/cloudsmith-io/cloudsmith-cli), to see how it is built.
- [CLI Cloudsmith Repository](https://cloudsmith.io/package/ns/cloudsmith/repos/cli/packages/), for pre-releases of the CLI.

Finally, we wish you well on your path to better software and better DevOps.
