conan inspect


This feature is experimental and subject to breaking changes. See the Conan stability section for more information.

$ conan inspect -h
usage: conan inspect [-h] [-v [V]] [-f FORMAT] [-r REMOTE | -nr] [-l LOCKFILE]

Inspect a to return its public fields.

positional arguments:
  path                  Path to a folder containing a recipe (

  -h, --help            show this help message and exit
  -v [V]                Level of detail of the output. Valid options from less
                        verbose to more verbose: -vquiet, -verror, -vwarning,
                        -vnotice, -vstatus, -v or -vverbose, -vv or -vdebug,
                        -vvv or -vtrace
  -f FORMAT, --format FORMAT
                        Select the output format: json
  -r REMOTE, --remote REMOTE
                        Remote names. Accepts wildcards ('*' means all the
                        remotes available)
  -nr, --no-remote      Do not use remote, resolve exclusively in the cache
  -l LOCKFILE, --lockfile LOCKFILE
                        Path to a lockfile. Use --lockfile="" to avoid
                        automatic use of existing 'conan.lock' file
  --lockfile-partial    Do not raise an error if some dependency is not found
                        in lockfile

The conan inspect command shows the public attributes of any recipe ( as follows:

$ conan inspect .
    shared: False
    fPIC: True
    neon: True
    msa: True
    sse: True
    vsx: True
description: libpng is the official PNG file format reference library.
generators: []
license: libpng-2.0
name: libpng
    fPIC: True
    msa: True
    neon: True
    shared: False
    sse: True
    vsx: True
    shared: ['True', 'False']
    fPIC: ['True', 'False']
    neon: ['True', 'check', 'False']
    msa: ['True', 'False']
    sse: ['True', 'False']
    vsx: ['True', 'False']
    api_prefix: ['ANY']
package_type: None
requires: []
revision_mode: hash
settings: ['os', 'arch', 'compiler', 'build_type']
topics: ['png', 'graphics', 'image']

conan inspect evaluates recipe methods such as set_name() and set_version(), and is capable of resolving python_requires dependencies (which can be locked with the --lockfile argument), so its base methods will also be properly executed.


The --remote argument is used only for fetching remote python_requires in cases where they are needed, not to inspect recipes from a remote. Use conan graph info for such cases.

The conan inspect ... --format=json returns a JSON output format in stdout (which can be redirected to a file) with the following structure:

$ conan inspect . --format=json
    "name": "libpng",
    "url": "",
    "license": "libpng-2.0",
    "description": "libpng is the official PNG file format reference library.",
    "homepage": "",
    "revision_mode": "hash",
    "default_options": {
        "shared": false,
        "fPIC": true,
        "neon": true,
        "msa": true,
        "sse": true,
        "vsx": true,
        "api_prefix": ""
    "topics": [
    "package_type": "None",
    "settings": [
    "options": {
        "api_prefix": "",
        "fPIC": "True",
        "msa": "True",
        "neon": "True",
        "shared": "False",
        "sse": "True",
        "vsx": "True"
    "options_definitions": {
        "shared": [
        "fPIC": [
        "neon": [
        "msa": [
        "sse": [
        "vsx": [
        "api_prefix": [
    "generators": [],
    "requires": [],
    "source_folder": null,
    "build_folder": null,
    "generators_folder": null,
    "package_folder": null,
    "label": ""


conan inspect does not list any requirements listed in the requirements() method, only those present in the requires attribute will be shown.