---
title: "Download command added to the Cloudsmith CLI"
description: "We’ve introduced the cloudsmith download command to the Cloudsmith CLI, enabling users to programmatically retrieve packages from repositories. "
canonical_url: "https://cloudsmith.com/changelog/download-command-added-to-the-cloudsmith-cli"
last_updated: "2025-11-28T00:14:34.774Z"
---
# Download command added to the Cloudsmith CLI

We’ve introduced the `cloudsmith download` command to the Cloudsmith CLI, enabling users to programmatically retrieve packages from repositories. This command provides advanced filtering, bulk operations, and pre-execution validation features.

This update resolves the prior friction created by the lack of a native download utility, eliminating the need for manual web UI downloads or complex `curl/wget` workarounds for artifact retrieval.

## Key capabilities

The `cloudsmith download` command is designed for flexible and automated artifact fetching:

- **Smart package discovery:** Automatically finds the latest version of a package by name across all repository versions.
- **Targeted filtering:** Supports filtering based on metadata such as **version**, **format**, **OS**, and **architecture**.
- **Bulk file retrieval:** Use the `--all-files` flag to download all associated package assets (e.g., sources, javadoc, SBOMs).
- **Output control:** Define a custom output directory for downloads using the `--outfile` option, particularly useful for bulk operations.
- **Validation:** Utilize the `--dry-run` capability to see exactly which files would be downloaded without initiating the transfer.

**Usage examples**

Below are practical examples illustrating the command's flexibility:

- Download the latest version of a package

```json
{
  "_key": "6686b73e0904",
  "_type": "code",
  "code": "cloudsmith download myorg/myrepo mypackage",
  "filename": null,
  "language": null,
  "markDefs": null
}
```



- Download to a specific directory

```json
{
  "_key": "7f106aa61abf",
  "_type": "code",
  "code": "cloudsmith download myorg/myrepo mypackage --outfile /tmp/myfiles/",
  "filename": null,
  "language": null,
  "markDefs": null
}
```



- Download with filters

```json
{
  "_key": "94a1147f7e2d",
  "_type": "code",
  "code": "cloudsmith download myorg/myrepo mypackage --format deb --arch amd64 --os ubuntu",
  "filename": null,
  "language": null,
  "markDefs": null
}
```



- Download all arbitrary files

```json
{
  "_key": "1ebf119dceeb",
  "_type": "code",
  "code": "cloudsmith download myorg/myrepo mynugetpackage --all-files",
  "filename": null,
  "language": null,
  "markDefs": null
}
```

```json
{
  "_key": "a4676921bc49",
  "_type": "callout",
  "content": [
    {
      "_key": "6bd0c879df13",
      "_type": "block",
      "children": [
        {
          "_key": "9eab3a5ea6fb",
          "_type": "span",
          "marks": [],
          "text": "The "
        },
        {
          "_key": "392d746dbd69",
          "_type": "span",
          "marks": [
            "code"
          ],
          "text": "cloudsmith download"
        },
        {
          "_key": "41568582b29c",
          "_type": "span",
          "marks": [],
          "text": " command acts as a sophisticated "
        },
        {
          "_key": "3198f89d739e",
          "_type": "span",
          "marks": [
            "strong"
          ],
          "text": "file retrieval utility"
        },
        {
          "_key": "41da3d7e8bd0",
          "_type": "span",
          "marks": [],
          "text": " - think of it as a specialized "
        },
        {
          "_key": "b1da5bdae71a",
          "_type": "span",
          "marks": [
            "code"
          ],
          "text": "wget"
        },
        {
          "_key": "11238ecb4482",
          "_type": "span",
          "marks": [],
          "text": " for Cloudsmith. This is NOT a package manager pull command. Unlike tools such as docker pull, npm install, or pip install, this command "
        },
        {
          "_key": "b2b5a41bb637",
          "_type": "span",
          "marks": [
            "strong"
          ],
          "text": "does not"
        },
        {
          "_key": "0fdcabe5d1b1",
          "_type": "span",
          "marks": [],
          "text": ":"
        }
      ],
      "markDefs": [],
      "style": "normal"
    },
    {
      "_key": "913bdbd61831",
      "_type": "block",
      "children": [
        {
          "_key": "6d1f0d91527d",
          "_type": "span",
          "marks": [],
          "text": "Install packages into your local environment"
        }
      ],
      "level": 1,
      "listItem": "bullet",
      "markDefs": [],
      "style": "normal"
    },
    {
      "_key": "039de145e140",
      "_type": "block",
      "children": [
        {
          "_key": "abac12098026",
          "_type": "span",
          "marks": [],
          "text": "Manage dependencies or perform package resolution"
        }
      ],
      "level": 1,
      "listItem": "bullet",
      "markDefs": [],
      "style": "normal"
    },
    {
      "_key": "ae3a1bf3ebd5",
      "_type": "block",
      "children": [
        {
          "_key": "e777a9d1883f",
          "_type": "span",
          "marks": [],
          "text": "Set up package registries or configure local tooling"
        }
      ],
      "level": 1,
      "listItem": "bullet",
      "markDefs": [],
      "style": "normal"
    },
    {
      "_key": "a37469474299",
      "_type": "block",
      "children": [
        {
          "_key": "42d960095284",
          "_type": "span",
          "marks": [],
          "text": "Modify your system's package state"
        }
      ],
      "level": 1,
      "listItem": "bullet",
      "markDefs": [],
      "style": "normal"
    },
    {
      "_key": "aad7859cf0d6",
      "_type": "block",
      "children": [
        {
          "_key": "4c2bfa40fa42",
          "_type": "span",
          "marks": [],
          "text": "Its function is to transfer the package files (binaries, archives, etc.) to your local filesystem for manual use, inspection, or further processing."
        }
      ],
      "markDefs": [],
      "style": "normal"
    }
  ],
  "markDefs": null,
  "variant": "info"
}
```

If you have feedback or questions about the Cloudsmith CLI, please [contact us](https://cloudsmith.com/company/contact-us).
