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:
conan cache: Return the path of recipes and packages in the cache
conan config: Manage Conan configuration (remotes, settings, plugins, etc)
conan graph: Obtain information about the dependency graph without fetching binaries
conan inspect: Inspect a conanfile.py to return the public fields
conan install: Install dependencies
conan list: List recipes, revisions and packages in the local cache or in remotes
conan lock: Create and manage lockfiles
conan pkglist: Manipulate package lists, merge them or find packages in remotes.
conan profile: Display and manage profile files
conan remove: Remove packages from the local cache or from remotes
conan remote: Add, remove, login/logout and manage remote server
conan search: Search packages matching a name
conan version: Give information about the Conan client version
conan workspace (incubating): Manage Conan workspaces
Creator commands:
conan build: Install package and call its build method
conan create: Create a package from a recipe
conan download: Download (without install) a single conan package from a remote server.
conan editable: Allows working with a package in user folder
conan export: Export a recipe to the Conan package cache
conan export-pkg: Create a package directly from pre-compiled binaries
conan new: Create a new recipe from a predefined template
conan source: Calls the source() method
conan test: Test a package
conan upload: Upload packages from the local cache to a specified remote
Security Commands
conan audit: Checks for vulnerabilities in your Conan packages.
conan report: Get information about the packages
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.
graph-info formatter: Show the graph information in JSON format. It’s used by several commands.