Configuration Files
Manage your qBraid account credentials and settings
qBraid uses configuration files to store your account credentials and settings. The main configuration file is called qbraidrc.
The qbraidrc File
The qbraidrc file is an INI-format configuration file that stores your qBraid account credentials and settings. It is located in your home directory at:
- Linux/macOS:
~/.qbraid/qbraidrc - Windows:
C:\Users\<username>\.qbraid\qbraidrc
This configuration file is used by various qBraid tools including:
- qBraid-SDK
- qBraid-CLI
- qBraid Jupyter Lab extensions
- qBraid VS Code extensions
File Structure
A typical qbraidrc file contains the following:
[default]
url = https://api-v2.qbraid.com/api/v1
api-key = <your-api-key>Creating New Configuration File
To create a new qbraidrc file:
qbraid configureThis interactive command will:
- Prompt you to enter your API key
- Automatically set the qBraid API URL
- Create the configuration file in the correct location
Updating Configuration Values
To update a specific configuration value:
qbraid configure set <field> <value>For example, to update your API key:
qbraid configure set api-key your-new-api-keyViewing Configuration Values
To view a specific configuration value:
qbraid configure get <field>For example:
qbraid configure get api-keyTo view all configuration values in your default profile:
qbraid configure listFinding Your Configuration File
To locate your qbraidrc file programmatically:
from pathlib import Path
config_path = Path.home() / ".qbraid" / "qbraidrc"
print(config_path)Security Note
Your API key provides access to your qBraid account. Keep it secure and never share it with others. If you believe your API key has been compromised, you can generate a new one from your qBraid account settings and update it using the CLI commands above.
See API key security for more information.
Thanks for your feedback.

