qBraid-CLI

Universal command line interface for interacting with all parts of the qBraid platform.

The qBraid CLI manages cloud compute, quantum jobs, environments, and AI agents from your terminal. It can also route AI coding tools through qBraid as their provider, and send you Slack or email updates from long-running work.

Getting started

The qBraid-CLI comes pre-installed and pre-configured in qBraid Lab:

For help, see qBraid Lab User Guide: Getting Started.

Local setup

If you prefer to use qBraid-CLI on your local machine, you can install it from PyPI with:

pip install qbraid-cli

qbraid-cli versions <0.12 are not compatible with qBraid API V2. See migration guide.

Use qbraid-cli ≥ 0.12.0 with API V2.

To manage qBraid environments using the CLI, you must also install the envs extra:

pip install 'qbraid-cli[envs]'

To SSH into qBraid compute instances from your local machine, install the compute extra:

pip install 'qbraid-cli[compute]'

After installation, you must configure your account credentials to use the CLI locally:

  1. Create a qBraid account or log in to your existing account by visiting account.qbraid.com
  2. Open API Keys and create a key. See API key management for scope and rotation details.
  3. Save your API key from step 2 in local configuration file ~/.qbraid/qbraidrc using:
$ qbraid configure

Add the CLI to PATH on Windows

If you encounter a warning like:

WARNING: The script qbraid.exe is installed in 'C:\Users\<YourUsername>\AppData\Local\Packages\PythonSoftwareFoundation.Python.<version>\LocalCache\local-packages\Python<version>\Scripts' which is not on PATH.

You need to add the directory containing qbraid.exe to your system’s PATH.

  1. Copy the directory path provided in the warning.
  2. Follow these steps:
  • Open the Start Menu, search for “Environment Variables,” and select “Edit the system environment variables.”
  • In the System Properties window, click the Environment Variables button.
  • Under “User variables,” locate the Path variable, click Edit, and add the copied directory.
  1. Save the changes and restart your terminal.

Basic commands

$ qbraid
----------------------------------
  * Welcome to the qBraid CLI! *
----------------------------------

        ____            _     _
   __ _| __ ) _ __ __ _(_) __| |
  / _` |  _ \| '__/ _` | |/ _` |
 | (_| | |_) | | | (_| | | (_| |
  \__,_|____/|_|  \__,_|_|\__,_|
     |_|


- Use 'qbraid --help' to see available commands.

- Use 'qbraid --version' to see the current version.

Reference Docs: https://docs.qbraid.com/v2/cli/api-reference/qbraid

A qBraid CLI command has the following structure:

$ qbraid <command> <subcommand> [options and parameters]

To list installed environments:

$ qbraid envs list

To view help documentation, use one of the following:

$ qbraid --help
$ qbraid <command> --help
$ qbraid <command> <subcommand> --help

For example:

$ qbraid --help

Usage: qbraid [OPTIONS] COMMAND [ARGS]...

The qBraid CLI — A unified interface for AI agents, quantum computing,
Python environments, and cloud compute.

Commands
  lab           Launch qBraid Lab (JupyterLab).
  agents        Manage AI coding agent sessions.
  ai            Use qBraid as your AI provider.
  compute       Manage cloud compute and SSH.
  comms         Send updates and read replies.
  jobs          Submit and track quantum computing jobs.
  envs          Manage Python environments.
  ...

This is an excerpt. The API reference lists every command and option for the current release.

To get the version of the qBraid CLI:

$ qbraid --version

Manage compute instances

Current CLI releases use qbraid compute instances for both subscription and on-demand compute:

qbraid compute instances list
qbraid compute instances availability
qbraid compute instances show subscription

Run qbraid compute instances --help for commands and <command> --help for their options, or see the qbraid compute reference. The older qbraid compute server group is deprecated.