# QRM

CLI + Python client for interacting with the Qestit QRM.

## Install

```bash
pip install lr-qrm
```

## Quick start

### Login

Interactive login (prompts for username/password):

```bash
qrm login
```

Non-interactive (for CI/CD):

```bash
export QRM_USERNAME="<insert username>"
export QRM_PASSWORD="<insert password>"
qrm login --ci
```

By default, this stores session details at:

```
~/.config/qrm/login.json
```

### Commands


Get test results for a serial number.

```bash
qrm get-test-results P00Y00000001
```


#### JSON output

Most commands support a JSON output mode.


```bash
$ qrm get-test-results P00Y00000001 --format json
```

## Programmatic use

```python
from qrm import QrmClient, load_config

client = QrmClient(load_config())
results = client.get_test_results("P00Y00000001")
```


## FAQ

- **Where is the config kept?**
  `~/.config/qrm/login.json` (override with `QRM_CONFIG`)

- **How do I run non-interactively?**
  Make sure to give all required arguments. Also pass `--ci` to stop output of sensitive information such as username or passwords.