Metadata-Version: 2.4
Name: qai-hub-apps
Version: 0.30.2.dev41+ge7b6ffb75
Summary: CLI for browsing and downloading Qualcomm® AI Hub Apps.
Author-email: "Qualcomm® Technologies, Inc" <ai_hub_support@qti.qualcomm.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://aihub.qualcomm.com/apps
Project-URL: GitHub, https://github.com/qualcomm/ai-hub-apps
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: qai-hub-models-cli @ https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/wheels/qai_hub_models_cli-0.56.1.dev77%2Bgf11aaf934-py3-none-any.whl
Requires-Dist: packaging>=24.2
Requires-Dist: platformdirs>=3.0
Requires-Dist: prettytable<=3.16.0,>=3.10
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml
Provides-Extra: dev
Requires-Dist: pytest==9.0.3; extra == "dev"
Requires-Dist: pytest-mock==3.15.1; extra == "dev"
Requires-Dist: pytest-cov==7.1.0; extra == "dev"

# qai-hub-apps

CLI for browsing and downloading [Qualcomm® AI Hub Apps](https://aihub.qualcomm.com/apps) —
sample apps for deploying ML models on Qualcomm® devices.

## Installation

```bash
pip install qai-hub-apps
```

## Quick Start

```bash
qai-hub-apps list                          # browse available apps
qai-hub-apps info whisper_windows_py       # inspect an app
qai-hub-apps fetch whisper_windows_py      # download source to current directory
```

## Commands

### list

List all available apps.

```bash
qai-hub-apps list
```

```
+----------------------------------------------------------------------+
|                        Qualcomm® AI Hub Apps                         |
+---------------------+------------------+---------------+-------------+
| ID                  | Name             | Domain        | Languages   |
+---------------------+------------------+---------------+-------------+
| whisper_windows_py  | Whisper Windows  | Audio         | Python      |
| stable_diffusion_py | Stable Diffusion | Generative AI | Python, C++ |
+---------------------+------------------+---------------+-------------+
Total: N apps
```

### info

Show details for an app.

```bash
qai-hub-apps info <app_id>
```

```
+=============================================================================+
|                               Whisper Windows                               |
|  https://github.com/qualcomm/ai-hub-apps/tree/main/apps/whisper_windows_py  |
+=============================================================================+

+---------------------------+
|          Headline         |
+---------------------------+
| Speech to text on Windows |
+---------------------------+

+-----------------------------------+
|            Description            |
+-----------------------------------+
| Run Whisper on-device using ONNX. |
+-----------------------------------+

+------------------------------------+
|              Metadata              |
+---------------+--------------------+
| ID            | whisper_windows_py |
| Type          | windows            |
| Languages     | Python             |
| Runtime       | onnx               |
| Domain        | Audio              |
| Use Case      | Speech Recognition |
| Precision     | float              |
| Models        | whisper_base       |
| AI Hub Models | 0.30.0             |
+---------------+--------------------+
```

### fetch

Download and extract an app's source to a local directory.

```bash
# Download app source only
qai-hub-apps fetch <app_id>

# Download app source + model for a specific chipset
qai-hub-apps fetch <app_id> --model <model_id> --chipset <chipset>
```

| Flag | Description |
|------|-------------|
| `--output-dir PATH` | Output directory (default: current directory) |
| `--model MODEL_ID` | Also download a model supported by the app |
| `--chipset CHIPSET` | Target chipset for the model download |

On success, the path to the fetched app directory is printed.

**Example — fetch app with model:**

```bash
qai-hub-apps fetch stable_diffusion_windows_py --model stable_diffusion_v2_1 --chipset qualcomm-snapdragon-x-elite
```

## Logging

Control verbosity with a global flag or the `QAI_HUB_APPS_LOG_LEVEL` environment
variable. The command-line flag takes precedence over the environment variable.
The default level is `info`.

| Flag | Description |
|------|-------------|
| `--log-level {debug,info,error}` | Set log verbosity |
| `-v`, `--verbose` | Shorthand for `--log-level debug` |
| `-q`, `--quiet` | Shorthand for `--log-level error` |

```bash
qai-hub-apps -v list
QAI_HUB_APPS_LOG_LEVEL=debug qai-hub-apps list
```
