Swift Command-Line

Get your OpenRC file

In Horizon, click your username in the top right, and then click “OpenStack RC file”. Save this somewhere.

Mac/Linux

In a terminal, type:

source <path to your openrc file>

Your shell environment will now have all of the variables required for you to interact with the Swift CLI.

Windows

Defining environment variables using an environment file is not a common practice on Microsoft Windows. Environment variables are usually defined under Advanced > System Properties. One method for using these scripts as-is on Windows is to install Git for Windows and using Git Bash to source the environment variables and to run all CLI commands.

Install the OpenStack and Swift CLI

Requires python3

python3 -m pip install python-openstackclient
python3 -m pip install python-swiftclient

openstack token issue
swift auth

Both commands should return some basic info about your account with no errors.

Now type:

openstack --help
swift --help

…to learn all of the different ways you can interact with the OLRC.

For additional information, please refer to the official OpenStack documentation.