Qbs Manual | Command-Line Interface | list-products

Qbs 1.12.2

# list-products

## Synopsis

      qbs list-products [options] [config:configuration-name]

## Description

Lists all products that exist in a project.

## Options

### `[--file|-f <file>]`

Uses `<file>` as the project file. If `<file>` is a directory and it contains a single file with the extension `.qbs`, that file will be used.

If this option is not given at all, the behavior is the same as for `-f <working-dir>`.

### `--build-directory|-d <directory>`

Specifies a `<directory>` where build artifacts are stored.

The default value is the current directory unless `preferences.defaultBuildDirectory` is set.

Relative paths will be interpreted relative to the current directory.

You can use the following special values as placeholders:

- `@project` is expanded to the name of the project file excluding the extension `.qbs`.
- `@path` is expanded to the name of the directory containing the project file.

### `--settings-dir <directory>`

Reads all settings (such as profile information) from the specified `<directory>`. If the directory does not exist, it will be created.

The default value is system-specific. For example:

- Linux: `$HOME/.config/QtProject/qbs`
- Windows: `%APPDATA%\QtProject\qbs`
- macOS: `$HOME/Library/Preferences/qbs`

## Parameters

### `config:configuration-name`

Specifies the build configuration to use.

The `debug` and `release` configuration names imply the respective build variant. A debug build contains additional debug symbols that are needed for debugging the application but that can be left out from the release version. Generally, debug builds are used for testing and release builds for creating the final installation file.

The build variant can also be specified explicitly by using the qbs.buildVariant property.

When naming configurations created for special purposes, follow the rules for legal names generally used in programming languages:

- The first character must be a letter (a-z), an underscore (_), or a dollar sign ($).
- Subsequent characters may be letters, digits, underscores, or dollar signs.

## Examples

To list all products for the project in the current directory:

      qbs list-products