// Module included in the following assemblies:
// * hosted-control-planes/hcp-prepare/hcp-cli.adoc

:_mod-docs-content-type: PROCEDURE
[id="hcp-cli-terminal_{context}"]
= Installing the {hcp} command-line interface from the terminal

[role="_abstract"]
You can install the {hcp} command-line interface (CLI), `hcp`, from the terminal.

.Prerequisites

* On an {product-title} cluster, you have installed {mce} 2.5 or later. The {mce-short} is automatically installed when you install Red{nbsp}Hat Advanced Cluster Management. You can also install {mce-short} without Red{nbsp}Hat Advanced Management as an Operator from the {product-title} software catalog.

.Procedure

. Get the URL to download the `hcp` binary by running the following command:
+
[source,terminal]
----
$ oc get ConsoleCLIDownload hcp-cli-download -o json | jq -r ".spec"
----

. Download the `hcp` binary by running the following command:
+
[source,terminal]
----
$ wget <hcp_cli_download_url>
----
+
Replace `hcp_cli_download_url` with the URL that you obtained from the previous step.

. Unpack the downloaded archive by running the following command:
+
[source,terminal]
----
$ tar xvzf hcp.tar.gz
----

. Make the `hcp` binary file executable by running the following command:
+
[source,terminal]
----
$ chmod +x hcp
----

. Move the `hcp` binary file to a directory in your path by running the following command:
+
[source,terminal]
----
$ sudo mv hcp /usr/local/bin/.
----
+
[NOTE]
====
If you download the CLI on a Mac computer, you might see a warning about the `hcp` binary file. You need to adjust your security settings to allow the binary file to be run.
==== 

.Verification

* Verify that you see the list of available parameters by running the following command:
+
[source,terminal]
----
$ hcp create cluster <platform> --help
----
+
You can use the `hcp create cluster` command to create and manage hosted clusters. The supported platforms are `agent`, `aws`, and `kubevirt`. The `azure` and `openstack` platforms are also available as Technology Preview features.
