> For the complete documentation index, see [llms.txt](https://docs.qyrus.com/device-farm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qyrus.com/device-farm/ai-session/qyrion-cli.md).

# Qyrion CLI

Qyrion CLI is a command-line interface designed to streamline test automation workflows across Windows, macOS, and Linux. Developers and QA engineers can configure remote staging and production targets, list available mobile devices and applications, and execute cloud-based automation test suites from a local terminal or CI/CD pipeline.

**Platforms:** Windows, macOS Apple Silicon, Linux, and npm/npx | **Version:** v1.0.0-beta | **Audience:** QA & DevOps

> **Note:** The same command surface can also be exposed through MCP (Model Context Protocol) for compatible agent clients.

## Table of Contents

1. [Installation & Setup](#installation--setup)
2. [Configuration](#configuration)
3. [CLI Commands Reference](#cli-commands-reference)
4. [Workflow Overview](#workflow-overview)

## Installation & Setup

### Download and Installation

Choose the installation method for your operating system.

#### Windows

1. Download the Windows 64-bit package, for example `qyrion-<version>-windows-x64.exe`.
2. Rename the downloaded file to `qyrion.exe`.
3. Place it in a directory on your `PATH`, or keep it in the folder from which you will run it.

Some antivirus tools may flag freshly built single-file executables. Verify the release checksum before allowing the file if prompted.

#### macOS Apple Silicon

1. Download `qyrion-<version>-macos-arm64.pkg` from the release page.
2. Open the `.pkg` installer. It installs `qyrion` to `/usr/local/bin`.
3. Verify the installation:

   ```bash
   qyrion --help
   ```

The installer is not notarized yet. If macOS blocks it, right-click the `.pkg`, select **Open**, and confirm the prompt. If necessary, remove the quarantine attribute first:

```bash
xattr -d com.apple.quarantine <file>.pkg
```

Intel Mac binaries are not currently built. Intel Mac users should use the source installation fallback described below.

#### Linux

Download the Linux archive, extract it, and place the `qyrion` binary on your `PATH`:

```bash
tar -xzf qyrion-<version>-linux-x64.tar.gz
sudo mv qyrion /usr/local/bin/
```

#### Cross-platform npm/npx installation

The `@qqyrus/qyrion` package wraps the platform-specific binaries. Configure the private GitHub npm registry once in `~/.npmrc`:

```ini
@qqyrus:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<github-token>
```

Run without a global installation:

```bash
npx @qqyrus/qyrion --help
npx @qqyrus/qyrion@beta --help
```

Or install globally:

```bash
npm install -g @qqyrus/qyrion
qyrion --help
```

The wrapper downloads the binary for the current platform and caches it under `~/.qyrion/bin/`. While the repository is private, set `QYRION_GITHUB_TOKEN` or `GH_TOKEN` to a GitHub token with package-read access.

#### Intel Mac source fallback

Intel Mac users can install from source with `uv` inside the Qyrion source directory:

```bash
uv tool install .
qyrion --help
```

### Open a Terminal

On Windows, use PowerShell or Command Prompt. On macOS and Linux, use Terminal with Bash or Zsh. Navigate to the directory containing the executable when it is not installed on your `PATH`.

## Configuration

### Gathering Configuration Details

Before initializing the CLI, collect the following configuration parameters:

* **Profile Name:** A local tag to save this set of configurations (e.g., `stg`)
* **App URL:** The backend application URL target (e.g., `https://stg.qyrus.com`)
* **API Key:** Your user API token
* **Authorization Header:** The platform authorization token

### Obtaining the API Token from Qyrus Web App

#### Step 1: Login to Qyrus App

Sign in to your Qyrus Web application account using your web browser. You will land on the main workspace dashboard.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-ce41b7e5aba72c795a0cfc4337ecddad461d3606%2Fqyrus-login.png?alt=media" alt="Qyrus Dashboard Login"></div>

#### Step 2: Go to Profile Settings

Click on the user profile dropdown icon (e.g., 'NM') in the top right corner of the dashboard and select **'Profile Settings'**.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-0c1e1a224e3edafebc29b3af052354d0f3cf7402%2Fprofile-settings.png?alt=media" alt="Profile Settings"></div>

#### Step 3: Generate Token

Select the **'Generate Token'** tab and click the **'+ Generate Token'** button. In the modal dialog:

1. Fill in the **'Token Name'**
2. Enter a **'Description'**
3. Select your **'Scope'**
4. Set an **'Expiry Date'**
5. Click the **'+ Generate Token'** button

Copy and save your API token securely.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-cca4c1c60b6dcd4a8303fed91425979e8ccf6a89%2Fgenerate-token.png?alt=media" alt="Generate Token Modal"></div>

## CLI Commands Reference

### CLI Configuration

Execute the `configure` command using the retrieved configuration parameters to initialize your environment profile. Upon initial configuration, the CLI will output the branded banner header and fetch teams linked to your profile. Select the appropriate team number to continue.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-740ed7633424ef3235308ff3dbd040f4e645d693%2FCLI-configuration.png?alt=media" alt="CLI Configuration and Team Selection"></div>

**PowerShell:**

```powershell
.\qyrion.exe configure `
 --profile stg `
 --app-url "https://stg.qyrus.com" `
 --api-key "<YOUR_API_KEY>" `
 --authorization "<YOUR_AUTH_TOKEN>"
```

**Command Prompt:**

```cmd
qyrion.exe configure ^
 --profile stg ^
 --app-url "https://stg.qyrus.com" ^
 --api-key "<YOUR_API_KEY>" ^
 --authorization "<YOUR_AUTH_TOKEN>"
```

**macOS/Linux (Bash or Zsh):**

```bash
qyrion configure \
  --profile stg \
  --app-url "https://stg.qyrus.com" \
  --api-key "<YOUR_API_KEY>" \
  --authorization "<YOUR_AUTH_TOKEN>"
```

### Device List Query

List available mobile test devices for a specific platform:

**PowerShell:**

```powershell
.\qyrion.exe devices list --profile stg --platform ios
```

**Command Prompt:**

```cmd
qyrion.exe devices list --profile stg --platform ios
```

**macOS/Linux (Bash or Zsh):**

```bash
qyrion devices list --profile stg --platform ios
```

### Device List Output

The command returns a table with the following columns:

| Column       | Description                                            |
| ------------ | ------------------------------------------------------ |
| `device_ref` | Unique device reference identifier (used in test runs) |
| `Name`       | Human-readable device name (e.g., "Apple iPhone 14")   |
| `Platform`   | Device platform (iOS or Android)                       |
| `OS`         | Operating system version                               |

Example output:

```
device_ref                           Name                          Platform  OS
dfdev_PQhIQ1bqmqI-ErSe1sKo7hy1SU72   Apple iPhone 14               iOS       17.6.1
dfdev_md8w-Qm3g1aChSEtQy8kI-Hksq01   Apple iPhone 16               iOS       18.0
dfdev_9aVfvJ_7Su3DSj0GS0JHSt78m9I3j7 Apple iPad Pro 12.9" (2021)    iOS       15.6.2
```

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-c0d32fcb8cc8d6397cc3d5e3b589debf10080a4e%2Fdevice-list.png?alt=media" alt="Device List Output"></div>

### App Catalog Query

List application binaries uploaded to the team environment:

**PowerShell:**

```powershell
.\qyrion.exe apps list --profile stg
```

**Command Prompt:**

```cmd
qyrion.exe apps list --profile stg
```

**macOS/Linux (Bash or Zsh):**

```bash
qyrion apps list --profile stg
```

### App Catalog Output

The command returns a table with:

| Column           | Description                                       |
| ---------------- | ------------------------------------------------- |
| `project_app_id` | Unique application identifier (used in test runs) |
| `Name`           | Application name                                  |
| `Platform`       | Platform (iOS or Android)                         |
| `Version`        | App version number                                |

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-b357d5fbeac2d1424bd304dbddd36e842932310a%2Fapp-list.png?alt=media" alt="App Catalog Output"></div>

### Running a Test Session

Execute automated test workflows using targeted devices and apps with natural language scenarios:

**PowerShell:**

```powershell
.\qyrion.exe run "login using customer demo account and check if dashboard loads" `
 --profile stg `
 --device-ref "device-ref_id" `
 --app "app_id" `
 --mode ci --timeout 900 --view --viewer-open
```

**Command Prompt:**

```cmd
qyrion.exe run "login using customer demo account and check if dashboard loads" ^
 --profile stg ^
 --device-ref "device-ref_id" ^
 --app "app_id" ^
 --mode ci --timeout 900 --view --viewer-open
```

**macOS/Linux (Bash or Zsh):**

```bash
qyrion run "login using customer demo account and check if dashboard loads" \
  --profile stg \
  --device-ref "device-ref_id" \
  --app "app_id" \
  --mode ci --timeout 900 --view --viewer-open
```

### Session Run Options & Flags

| Argument        | Required | Type                | Purpose                                                                    |
| --------------- | -------- | ------------------- | -------------------------------------------------------------------------- |
| `run`           | Yes      | String (Positional) | The NLP instruction specifying the test script scenario                    |
| `--profile`     | Yes      | String              | The specific backend server configuration profile identifier               |
| `--device-ref`  | Yes      | String              | The target unique device reference ID fetched from the CLI device registry |
| `--app`         | Yes      | String              | The target application binary ID fetched from the CLI app catalog          |
| `--mode`        | No       | String              | Execution mode (e.g. `ci` or `interactive`). Defaults to `ci`              |
| `--timeout`     | No       | Integer             | Maximum timeout limit in seconds before aborting execution                 |
| `--view`        | No       | Flag                | Allows visual tracking/stream during execution                             |
| `--viewer-open` | No       | Flag                | Launches the Qyrion Mobile Viewer automatically in your web browser        |

### Example Scenarios

**Login Test:**

```powershell
.\qyrion.exe run "login with credentials and verify dashboard" `
 --profile stg `
 --device-ref "dfdev_PQhIQ1bqmqI-ErSe1sKo7hy1SU72" `
 --app "project_app_2b18f85ca0d2Fce8785f" `
 --timeout 900 --viewer-open
```

**Purchase Flow:**

```powershell
.\qyrion.exe run "add item to cart and complete checkout" `
 --profile stg `
 --device-ref "dfdev_md8w-Qm3g1aChSEtQy8kI-Hksq01" `
 --app "project_app_2b18f85ca0d2Fce8785f" `
 --timeout 1200 --view
```

**Data Validation:**

```powershell
.\qyrion.exe run "check if user profile page displays correct information" `
 --profile prod `
 --device-ref "dfdev_9aVfvJ_7Su3DSj0GS0JHSt78m9I3j7" `
 --app "project_app_2b18f85ca0d2Fce8785f" `
 --mode interactive
```

## Tips

* Use `--profile` to switch between staging (`stg`) and production (`prod`) environments
* Use `--timeout` to set appropriate test duration based on scenario complexity
* Use `--view` and `--viewer-open` during development to observe test execution
* For CI/CD pipelines, use `--mode ci` without viewer flags for automated runs
* Keep device and app identifiers from earlier list queries for faster test runs

## Workflow Overview

### 1. Select a Device

List available mobile test devices and select one for your test run.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-c0d32fcb8cc8d6397cc3d5e3b589debf10080a4e%2Fdevice-list.png?alt=media" alt="Device List Output"></div>

### 2. Choose an App

List application binaries uploaded to your team environment and select one to test.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-b357d5fbeac2d1424bd304dbddd36e842932310a%2Fapp-list.png?alt=media" alt="App Catalog Output"></div>

### 3. Execute Test

Run automated test workflows using natural language scenarios on your selected device and app.

### 4. View Results

When run with the `--viewer-open` and `--view` parameters, a browser window opens automatically, displaying the real-time interaction stream on the device in the Qyrion Mobile Viewer interface.

<div align="center"><img src="https://2346916530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkSZu8cT8D2Zwayrr4I91%2Fuploads%2Fgit-blob-be0e45be4ef4a7a2baa2757adb3aaa3c53bb1cd2%2Fexecution-result.png?alt=media" alt="Execution Result and Mobile Viewer"></div>
