# OpenStack CLI

## Overview

<code class="expression">space.vars.product\_acronym</code> Compute, Block Storage, Network, and Identity services expose OpenStack APIs. You can use the [OpenStack CLI](https://docs.openstack.org/python-openstackclient/latest/cli/command-list.html) to perform a wider set of operations than the <code class="expression">space.vars.product\_name</code> UI supports.

This article covers how to install and configure the OpenStack CLI.

Alternatively, you can use `pcdctl`, which provides a convenient wrapper for all OpenStack CLI commands exposed by <code class="expression">space.vars.product\_name</code>services. For more information, see [PCD CLI (pcdctl)](https://docs.platform9.com/private-cloud-director/reference/pcdctl-command-line).

### **Install the OpenStack CLI**

Run the following command to install the OpenStack CLI on your local machine.

```bash
apt install python3-openstackclient -y
```

### **Authenticate the OpenStack CLI**

The <code class="expression">space.vars.product\_name</code> UI provides a `pcdctl RC` file configured for your <code class="expression">space.vars.product\_name</code> environment.&#x20;

You can use the same RC file with the OpenStack CLI.

1. In the <code class="expression">space.vars.product\_name</code> UI, navigate to **Settings** and select **API Access**.
2. Locate the `pcdctl RC` file listed on the page.
3. Copy the contents to a new file named `openstackrc` and update `OS_PASSWORD` with your <code class="expression">space.vars.product\_name</code> account password.
4. Run the following command to set the environment variables.

```bash
source openstackrc
```

### **Run the OpenStack CLI**

To verify your setup, run the following command to list all virtual machines in your current tenant.

```bash
openstack server list
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/reference/openstack-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
