> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-platform/automation/cli/examples.md).

# Harness CLI (hc) Examples

{% hint style="danger" %}
**DEPRECATION NOTICE**

**Harness CLI (`hc`) v1.x.x will be deprecated and will reach end of life in a future release**.

We recommend migrating to the new version of [**Harness CLI**](/harness-platform/use-harness-cli/harness-cli/harness-cli-overview.md) to continue receiving the latest features, improvements, and official support.
{% endhint %}

### Registry Management Examples <a href="#registry-management-examples" id="registry-management-examples"></a>

#### List Registries <a href="#list-registries" id="list-registries"></a>

View all registries in your project:

```bash
hc registry list --org devrel --project sd1
```

You can also use the short alias:

```bash
hc reg list --org devrel --project sd1
```

![Registry List](/files/gdbQJOOaUB8HJsaZg59N)

This displays a table with your registries, including their identifiers, package types, and other details.

### Artifact Management Examples <a href="#artifact-management-examples" id="artifact-management-examples"></a>

#### Pull Artifacts <a href="#pull-artifacts" id="pull-artifacts"></a>

Download artifacts from your registry to your local machine.

**General syntax:**

```bash
hc artifact pull <package_type> <registry_name> <package_path> <destination_path> [flags]
```

**Flag:**

* `--pkg-url`: Full URL to the artifact package (useful for direct access)

**Example with package URL:**

```bash
hc artifact pull generic image cli-arti/latest/package.json ./dummy --pkg-url https://pkg.harness.io 
```

![Pull Generic Artifact](/files/AxDK7ZRMTOcpWnHt0zhl)

This downloads the specified artifact to the destination path on your local machine.

***

{% hint style="info" %}
**LEARN MORE**

For comprehensive documentation on managing artifacts and registries with the Harness CLI, including additional commands, flags, and advanced usage examples, visit the [Artifact Registry CLI documentation](/artifact-registry/use-artifact-registry/artifact-registry-cli/manage-artifacts-registries.md).
{% endhint %}
