Commands

This section describes the Conan built-in commands, like conan install or conan search.

It is also possible to create user custom commands, visit custom commands reference and these custom command examples

Consumer commands:

Creator commands:

Security Commands

Commands Output to stdout and stderr

Conan commands output information following a deliberate design choice that aligns with common practices in many CLI tools and the POSIX standard:

  • stdout: For final command results (e.g., JSON, HTML).

  • stderr: For diagnostic output, including logs, warnings, errors, and progress messages.

More info can be found more in the FAQ section.

Redirecting Output to Files

You can redirect Conan output to files using shell redirection:

$ conan install . --format=json > output.json

Alternatively, use the --out-file argument (available since Conan 2.12.0) to specify an output file directly:

$ conan install . --format=json --out-file=output.json

Command formatters

Almost all the commands have the parameter --format xxxx which is used to apply an output conversion. The command formatters help users see the command output in a different way that could fit better with their needs. Here, there are only some of the most important ones whose details are worthy of having a separate section.