CONAN CHEAT SHEET
Show Local Client Configuration Search Packages Create a package Search for packages in a remote Conan application configuration Create a recipe (conanfile.py) from templates $ conan config get $ conan search zlib -r conan-center $ conan new -m
Contents of a profile (eg. default) Consume Packages Just export the recipe to local cache $ conan profile show default Install package using just a reference $ conan export $ conan install Create package from recipe for one configuration Remote Repositories Also implicitly does install and export steps $ conan remote list Install list of packages from conanfile $ conan create . -pr $ cat conanfile.txt Add and modify configurations [requires] Upload a Package Install collection of configs zlib/1.2.11 One or more with wildcard support, with binaries $ conan install $ conan config install $ conan upload zlib* -r remote --all Change a single config value Consume packages in build system via generators Copy packaged files out of Conan cache $ conan config set general.revisions_enabled=1 $ cat conanfile.txt Using the deploy generator [requires] Add a remote zlib/1.2.11 $ conan install zlib/1.2.11@ -g deploy $ conan remote add my_remote [generators] cmake_find_package Provide credentials for remote msbuild Conan Recipe Methods in Package Creation $ conan user -p -r my_remote make
Display information from recipes or references Install requirements and generate files
Displays attributes of conanfile.py $ mkdir build && cd build package_info() $ conan install .. $ conan inspect -a From all dependency recipes Displays content of conanfile.py for a reference Run your build system (one of the following)
$ conan get $ cmake .. && cmake --build . $ msbuild myproject.sln Display dependency graph info for a recipe exports $ make exports_sources generate() build() package() $ conan info source()