Skip to main content

Overview

The Xloud command-line interface gives you full control over every platform service directly from your terminal. With a single authenticated session you can provision instances, manage volumes, configure networks, and automate infrastructure workflows — without opening a browser. The CLI is compatible with all major operating systems and integrates cleanly into CI/CD pipelines and shell scripts.
Prerequisites
  • An active Xloud account with project access
  • Python 3.8 or later installed on your workstation
  • Network access to your Xloud API endpoint

Installation

Install the Xloud CLI using the package manager for your operating system.
Install on Ubuntu / Debian
sudo apt update
sudo apt install -y python3-pip python3-venv
pip3 install python-openstackclient
Install into a virtual environment to avoid conflicts with system Python packages: python3 -m venv ~/.xloud-cli && source ~/.xloud-cli/bin/activate && pip install python-openstackclient
Confirm the installation completed successfully:
Verify installation
openstack --version
The command prints the installed version, e.g., openstack 6.x.x.

Authentication

The CLI authenticates using an RC file downloaded from the Xloud Dashboard. Sourcing this file sets the required environment variables for your session.

Download your RC file

Log in to the Xloud Dashboard (https://connect.<your-domain>) and navigate to Project → API Access. Click Download OpenRC File and select OpenRC File v3.
Each project has its own RC file. Download the file for the project you want to manage from the CLI.

Source the credentials file

Open a terminal and source the downloaded file to load your credentials into the current shell session:
Load credentials
source project-openrc.sh
Enter your Xloud account password when prompted.

Verify authentication

Confirm the CLI can authenticate successfully:
Verify token
openstack token issue
A valid response displays a token ID, expiry, and your project details.
Authentication is working. Your session is valid for 1 hour by default.
The RC file exports the following environment variables to configure the CLI client. You can also set these manually or store them in a clouds.yaml file for multi-cloud management.
VariablePurpose
OS_AUTH_URLXloud Identity service endpoint
OS_PROJECT_NAMETarget project for all operations
OS_PROJECT_DOMAIN_NAMEProject domain (typically Default)
OS_USERNAMEYour Xloud account username
OS_USER_DOMAIN_NAMEUser domain (typically Default)
OS_REGION_NAMETarget region for API calls
OS_IDENTITY_API_VERSIONIdentity API version (3)

Command Structure

Every CLI command follows the same pattern: resource type, action, and optional flags.
openstack <resource> <action> [options] [arguments]
# Pattern: openstack <resource> list [--filter value]
openstack server list --status ACTIVE
openstack volume list --status available
openstack network list --internal
Most commands accept either the resource name or UUID as the final argument. Use UUIDs in scripts to avoid ambiguity when multiple resources share the same name.

Output Formats

The CLI supports multiple output formats controlled by the --format flag.
FlagOutput TypeBest Used For
--format tableHuman-readable table (default)Interactive use, quick inspection
--format jsonJSON object or arrayScripts, parsing, API-like output
--format yamlYAML documentConfiguration files, readable serialization
--format csvComma-separated valuesSpreadsheet import, bulk reporting
--format valuePlain values, one per lineShell variable assignment, grep pipelines
openstack server show my-vm --format json

Tips and Tricks

Add aliases to your shell profile (~/.bashrc or ~/.zshrc) to speed up repetitive tasks:
Recommended aliases (~/.bashrc)
alias osl='openstack server list'
alias ovl='openstack volume list'
alias onl='openstack network list'
alias oil='openstack image list'
alias oss='openstack server show'
alias osrc='source ~/openrc.sh'
Reload your shell after adding aliases:
Reload shell config
source ~/.bashrc
The CLI ships with a completion script that enables tab-completion for commands, resource names, and flags.
Enable bash completion
# Add to ~/.bashrc
eval "$(openstack complete)"
Enable zsh completion
# Add to ~/.zshrc
eval "$(openstack complete)"
After reloading your shell, press Tab after any partial command to see available completions.
Pass --debug to any command to print the full HTTP request and response, including headers and token details. This is useful for diagnosing authentication errors or unexpected API responses.
Debug a failing command
openstack server list --debug 2>&1 | less
Debug output includes your authentication token. Avoid sharing or storing this output in logs or tickets.
Instead of sourcing separate RC files, define all your environments in a single clouds.yaml file stored at ~/.config/openstack/clouds.yaml:
~/.config/openstack/clouds.yaml
clouds:
  xloud-prod:
    auth:
      auth_url: https://api.<your-domain>:5000/v3
      project_name: production
      username: your-username
      password: your-password
      user_domain_name: Default
      project_domain_name: Default
    region_name: RegionOne
    identity_api_version: 3
  xloud-dev:
    auth:
      auth_url: https://api-dev.<your-domain>:5000/v3
      project_name: development
      username: your-username
      password: your-password
      user_domain_name: Default
      project_domain_name: Default
    region_name: RegionOne
    identity_api_version: 3
Switch between environments using --os-cloud:
Use a named cloud profile
openstack --os-cloud xloud-prod server list
openstack --os-cloud xloud-dev server list
Set OS_CLOUD=xloud-prod in your shell to make a profile the default for all commands in that session.

Service CLI References

Each service has a dedicated CLI reference with complete command syntax, options, and examples.

Compute CLI

Instances, flavors, keypairs, server groups, console, and live migration commands.

Block Storage CLI

Volumes, snapshots, backups, volume types, and cross-project transfers.

Networking CLI

Networks, subnets, routers, floating IPs, security groups, and ports.

Images CLI

Upload, download, share, and manage virtual machine images.

Orchestration CLI

Heat stacks, resources, events, outputs, and template validation.

Identity CLI

Projects, users, roles, groups, and application credentials.

Load Balancer CLI

Load balancers, listeners, pools, members, and health monitors.

DNS CLI

Zones, record sets, PTR records, and zone transfers.

Key Manager CLI

Secrets, containers, orders, and access control lists.

Object Storage CLI

Containers, objects, large object uploads, and temporary URLs.

Kubernetes CLI

Cluster templates, clusters, and node group management.

SDS CLI

Ceph cluster health, pools, OSDs, RBD images, and RGW buckets.