Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions reference/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,34 @@ and these :ref:`custom command examples <examples_extensions_custom_commands>`
- :doc:`conan upload <commands/upload>`: Upload packages from the local cache to a specified remote


.. _commands_output:

**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
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/stderr.html>`_:

- ``stdout``: For final command results (e.g., JSON, HTML).
- ``stderr``: For diagnostic output, including logs, warnings, errors, and progress
messages.

**Redirecting Output to Files**

You can redirect Conan output to files using shell redirection:

.. code-block:: bash

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

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

.. code-block:: bash

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


Command formatters
------------------

Expand Down