Metadata-Version: 2.4
Name: qbraid-cli
Version: 0.13.0a0
Summary: Command Line Interface for interacting with all parts of the qBraid platform.
Author-email: qBraid Development Team <contact@qbraid.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://docs.qbraid.com/v2/cli/user-guide/overview
Project-URL: Documentation, https://docs.qbraid.com/v2/cli/api-reference/qbraid
Project-URL: Bug Tracker, https://github.com/qBraid/community/issues
Project-URL: Discord, https://discord.gg/KugF6Cnncm
Keywords: qbraid,cli,quantum,cloud
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12.1
Requires-Dist: rich>=10.11.0
Requires-Dist: click<=8.1.8
Requires-Dist: questionary>=2.0.0
Requires-Dist: qbraid-core>=0.3.0a1
Provides-Extra: compute
Requires-Dist: qbraid-core[compute]>=0.3.0a0; extra == "compute"
Provides-Extra: envs
Requires-Dist: qbraid-core[environments]>=0.3.0a0; extra == "envs"
Provides-Extra: mcp
Requires-Dist: qbraid-core[mcp]>=0.3.0a0; extra == "mcp"
Provides-Extra: dev
Requires-Dist: isort; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Dynamic: license-file

<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">

[![Documentation](https://img.shields.io/badge/Documentation-DF0982)](https://docs.qbraid.com/v2/cli/user-guide/overview)
[![PyPI version](https://img.shields.io/pypi/v/qbraid-cli.svg?color=blue)](https://pypi.org/project/qbraid-cli/)
[![Python verions](https://img.shields.io/pypi/pyversions/qbraid-cli.svg?color=blue)](https://pypi.org/project/qbraid-cli/)
[![GitHub](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/qBraid/community/issues)

Command Line Interface for interacting with all parts of the qBraid platform.

*Resources*:
- [User Guide](https://docs.qbraid.com/v2/cli/user-guide/overview)
- [API Reference](https://docs.qbraid.com/v2/cli/api-reference/qbraid)

## Getting Started

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

- [Launch qBraid Lab &rarr;](https://lab.qbraid.com/)
- [Make an account &rarr;](https://account.qbraid.com/)

For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/v2/lab/user-guide/getting-started).

You can also install the qBraid-CLI from PyPI with:

```bash
pip install qbraid-cli
```

To manage qBraid [environments](https://docs.qbraid.com/v2/lab/user-guide/environments) using the CLI, you must also install the `envs` extra:

```bash
pip install 'qbraid-cli[envs]'
```

## Local configuration

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](https://account.qbraid.com/)
2. Copy your API Key token from the left side of
    your [account page](https://account.qbraid.com/):
3. Save your API key from step 2 in local [configuration file](https://docs.qbraid.com/v2/cli/user-guide/config-files) `~/.qbraid/qbraidrc` using:

```bash
$ qbraid configure
```

For more on API keys, see [documentation](https://docs.qbraid.com/v2/home/account#api-keys).

## Basic Commands

```bash
$ 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:

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

For example, to list installed environments, the command would be:

```bash
$ qbraid envs list
```

To view help documentation, use one of the following:

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

To get the version of the qBraid CLI:

```bash
$ qbraid --version
```

## Magic Commands

You can also access the CLI directly from within [Notebooks](https://docs.qbraid.com/v2/lab/user-guide/notebooks) using IPython [magic commands](https://ipython.readthedocs.io/en/stable/interactive/magics.html). First, configure the qBraid magic commands extension using:

```bash
$ qbraid configure magic
```

The above command can also be executed from within a Jupyter notebook using the ``!`` operator. Then, from within a notebook cell, load the qBraid magic IPython extension using:

```python
In [1]: %load_ext qbraid_magic
```

Now you can continue to use the qBraid-CLI as normal from within your Jupyter notebook using the magic ``%`` operator, e.g.

```python
In [2]: %qbraid jobs list
```
