# qf command reference

Source: https://docs.qualflare.com/docs/cli/commands · Last updated: 2026-10-27

Every qf command in the Qualflare CLI, with flags, output and exit codes: validate result files without a token, list the formats and print the version.

This page lists every command of the Qualflare CLI (`qf`) with its flags, output and exit codes: `qf validate` checks result files without uploading them and needs no login, `qf list-formats` lists the 31 formats, and `qf version` prints the installed version. Commands that read or upload data run as `qf <identifier> <command>`, with the token saved by [qf login](https://docs.qualflare.com/docs/cli/authentication#qf-login).

## Command summary

| Command                                                                                                                                | Needs `qf login` | What it does                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------- |
| [`qf login <identifier> [token]`](https://docs.qualflare.com/docs/cli/authentication#qf-login)                                         | No               | Save an access token under a local identifier                             |
| [`qf logout <identifier>`](https://docs.qualflare.com/docs/cli/authentication#qf-logout)                                               | No               | Remove a saved identifier and its token                                   |
| [`qf projects`](https://docs.qualflare.com/docs/cli/authentication#qf-projects)                                                        | No               | List the saved identifiers                                                |
| [`qf <identifier> collect <files…>`](https://docs.qualflare.com/docs/cli/collect)                                                      | Yes              | Parse result files and upload them as a launch                            |
| [`qf validate <files…>`](https://docs.qualflare.com/docs/cli/commands#validate-command) (also `qf <identifier> validate`) | No               | Check result files without uploading them                                 |
| [`qf <identifier> suites list` / `suite get <seq>`](https://docs.qualflare.com/docs/cli/read-commands#suites)                          | Yes              | List test suites, or get one                                              |
| [`qf <identifier> cases list` / `case get <seq>` / `case steps <seq>`](https://docs.qualflare.com/docs/cli/read-commands#cases)        | Yes              | List a suite's cases, or get one case or its steps                        |
| [`qf <identifier> plans list` / `plan get <seq>` / `plan cases <seq>`](https://docs.qualflare.com/docs/cli/read-commands#plans)        | Yes              | List test plans, or get one plan or its cases                             |
| [`qf <identifier> launches list` / `launch get <seq>`](https://docs.qualflare.com/docs/cli/read-commands#launches)                     | Yes              | List launches, or get one                                                 |
| [`qf <identifier> defects list` / `defect get <seq>`](https://docs.qualflare.com/docs/cli/read-commands#defects)                       | Yes              | List defects, or get one                                                  |
| [`qf <identifier> clusters list` / `cluster get <id>`](https://docs.qualflare.com/docs/cli/read-commands#clusters)                     | Yes              | List failure clusters, or get one                                         |
| [`qf <identifier> milestones list` / `milestone get <seq>`](https://docs.qualflare.com/docs/cli/read-commands#milestones)              | Yes              | List milestones, or get one                                               |
| [`qf list-formats`](https://docs.qualflare.com/docs/cli/commands#list-formats-command)                                    | No               | List the formats `--format` accepts                                       |
| [`qf version`](https://docs.qualflare.com/docs/cli/commands#version-command)                                              | No               | Print the installed version                                               |
| `qf completion <shell>`                                                                                                                | No               | Print a shell completion script for `bash`, `zsh`, `fish` or `powershell` |

Every command takes the [global flags](https://docs.qualflare.com/docs/cli/configuration#global-flags), and `qf <command> --help` prints its own help.

## `qf validate`

`qf validate` checks that result files parse, without uploading them:

```bash
qf validate [files...] [flags]
qf <identifier> validate [files...] [flags]
```

The first form needs no saved identifier and never calls the API; the second works too.

| Flag       | Short | Description                                                                                                                                         |
| ---------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--format` | `-f`  | The format to validate against, a slug from `qf list-formats`. Auto-detected if not set. An unknown slug prints `Error: unsupported format: <slug>` |
| `--quiet`  | `-q`  | Global flag. Hides the progress and OK lines; ERR lines still print                                                                                 |

Each argument is one file or an Allure results directory. Your shell expands unquoted globs. Unlike `collect`, `validate` does not read a directory of `.json` reports, so pass the files, for example `qualflare-results/*.json`.

```bash
qf validate results.xml
qf validate results.json --format playwright
qf validate test-results/*.xml
qf validate allure-results/
qf validate pytest-report.xml --format python
```

Validating an Allure results directory (requires qf 0.4.0 or later) uses the same detection as `collect`; an older qf reports `failed to detect framework` for the directory. See [Allure results](https://docs.qualflare.com/docs/cli/formats#allure), and [upgrade qf](https://docs.qualflare.com/docs/cli/installation#upgrading) if `qf list-formats` doesn't list `allure`.

`qf validate` prints one line per file on stderr. A valid file:

```text
$ qf validate results.xml
Validating 1 test result file(s)...
OK results.xml: valid (junit, 42 tests)
```

An invalid file:

```text
$ qf validate invalid.xml
Validating 1 test result file(s)...
ERR invalid.xml: invalid - parse error: failed to parse file content: <parser message>
Error: one or more files failed validation
```

The OK line names the format `qf` detected (or the one you passed) and the number of tests. An ERR line gives one of these reasons:

* `file does not exist`
* `failed to detect framework: …`: no `--format` was given and `qf` couldn't tell the format
* `unsupported framework: …`: the format has no parser
* `parse error: …`: the file doesn't parse as that format

`qf validate` exits `0` when every file is valid, and `1` for an invalid file, an unknown `--format` or no file argument.

## Check reports before you upload

**Check a new reporter's output.** Run your tests once, then run `qf validate` on the report. The OK line shows the format `qf` detected and the test count. If the format is wrong, pass the same `--format` to `validate` and `collect`.

```bash
pytest --junitxml=pytest-report.xml
qf validate pytest-report.xml
```

**Check reports in a job without a token.** `qf validate` needs no saved identifier, so a CI job with no access token can still fail on a missing or unreadable report: this command exits `1` if the file is missing or doesn't parse.

```bash
qf validate test-results/junit.xml
```

## `qf list-formats`

`qf list-formats` lists the formats `--format` accepts, in six groups:

```bash
qf list-formats [flags]
```

Its aliases are `qf formats` and `qf lf`. `--category` (`-c`) shows one group: `generic`, `unit`, `bdd`, `e2e`, `api` or `security`. An unknown category lists no format and exits `0`.

```bash
qf list-formats
qf list-formats --category unit
qf lf -c security
```

```bash
$ qf list-formats

Generic (JUnit-compatible):
  - junit
  - ctrf
  - allure
  - qualflare-json

Unit Testing:
  - python
  - golang
  - jest
  - vitest
  - mocha
  - rspec
  - phpunit
  - testng

BDD / Behavior-Driven:
  - cucumber
  - karate

UI / E2E / Mobile Testing:
  - detox
  - playwright
  - cypress
  - selenium
  - testcafe
  - maestro
  - xctest
  - espresso
  - webdriverio
  - appium
  - flutter

API Testing:
  - newman
  - k6

Security Testing:
  - zap
  - trivy
  - snyk
  - sonarqube
```

The CLI supports 27 frameworks and 4 generic formats. Your installed version may list more; [Supported frameworks](https://docs.qualflare.com/docs/cli/formats) gives each format's `--format` example.

## `qf version`

`qf version` prints the installed version of the Qualflare CLI, and `--short` (`-s`) prints only the version number:

```bash
qf version [flags]
```

```bash
$ qf version

qf 0.4.0 (commit: <commit>, built: <build date>, <os>/<arch>, <go version>)
```

```bash
$ qf version -s

qf 0.4.0
```

| Field      | Description                              |
| ---------- | ---------------------------------------- |
| Version    | Semantic version of the CLI              |
| Commit     | Git commit hash (first 7 characters)     |
| Built      | Build timestamp                          |
| OS/Arch    | Operating system and architecture        |
| Go Version | Go runtime version used to build the CLI |

Print `qf version --short` at the start of a CI job so its log shows which `qf` ran. `qf` has no `--version` flag: `qf --version` fails with `Error: unknown flag: --version`.

## Exit codes

`qf validate` exits `0` or `1`; `qf list-formats` and `qf version` exit `0`. Commands that call the API use the codes in [collect's exit codes](https://docs.qualflare.com/docs/cli/collect#exit-codes); see also [read command errors](https://docs.qualflare.com/docs/cli/read-commands#errors).

## Limits

`qf validate` reads each file up to 100 MB, the same cap as [`collect`](https://docs.qualflare.com/docs/cli/collect#upload-limits); a larger file prints `ERR <file>: invalid - failed to detect framework: file <file> is too large (…)`.

## Related

* **Guides:** [Install the CLI](https://docs.qualflare.com/docs/cli/installation) · [CI/CD Integration](https://docs.qualflare.com/docs/cli/ci-cd)
* **Reference:** [Upload results with qf collect](https://docs.qualflare.com/docs/cli/collect) · [Query project data from the CLI](https://docs.qualflare.com/docs/cli/read-commands) · [Configuration](https://docs.qualflare.com/docs/cli/configuration)
* **CLI/API:** [Access Tokens](https://docs.qualflare.com/docs/api/access-tokens)
