Logo
1.9
  • Introduction
  • Install
  • Getting Started
  • Using packages
  • Creating Packages
  • Uploading Packages
  • Developing Packages
  • Package apps and devtools
  • Mastering Conan
  • Systems and cross building
  • Extending Conan
  • Integrations
  • Howtos
  • Reference
    • Commands
      • Consumer commands
        • conan install
        • conan config
        • conan get
        • conan info
        • conan search
      • Creator commands
      • Package development commands
      • Misc commands
      • Output
      • Return codes
    • conanfile.txt
    • conanfile.py
    • Generators
    • Profiles
    • Build helpers
    • Tools
    • Configuration files
    • Environment variables
    • Hooks [EXPERIMENTAL]
  • Videos and links
  • FAQ
  • Changelog
conan

This document is for a "1.X" legacy Conan version, which is no longer recommended. Please update to Conan 2, click here to read the Conan 2 documentation

🔍 Scan for vulnerabilities in your packages with the new conan audit command. Register now.

  • Reference
  • Commands
  • conan search
  • Edit on GitHub

conan search

$ conan search [-h] [-o] [-q QUERY] [-r REMOTE] [--case-sensitive]
               [--raw] [--table TABLE] [-j JSON]
               [pattern_or_reference]

Searches package recipes and binaries in the local cache or in a remote. If you provide a pattern, then it will search for existing package recipes matching it. If a full reference is provided (pkg/0.1@user/channel) then the existing binary packages for that reference will be displayed. If no remote is specified, the search will be done in the local cache. Search is case sensitive, exact case has to be used. For case insensitive file systems, like Windows, case sensitive search can be forced with ‘–case-sensitive’.

positional arguments:
  pattern_or_reference  Pattern or package recipe reference, e.g.,
                        'MyPackage/1.2@user/channel', 'boost/*'

optional arguments:
  -h, --help            show this help message and exit
  -o, --outdated        Show only outdated from recipe packages. This flag can
                        only be used with a reference
  -q QUERY, --query QUERY
                        Packages query: 'os=Windows AND (arch=x86 OR
                        compiler=gcc)'. The 'pattern_or_reference' parameter
                        has to be a reference: MyPackage/1.2@user/channel
  -r REMOTE, --remote REMOTE
                        Remote to search in. '-r all' searches all remotes
  --case-sensitive      Make a case-sensitive search. Use it to guarantee
                        case-sensitive search in Windows or other case-
                        insensitive file systems
  --raw                 Print just the list of recipes
  --table TABLE         Outputs html file with a table of binaries. Only valid
                        for a reference search
  -j JSON, --json JSON  json file path where the search information will be
                        written to

Examples

$ conan search zlib/*
$ conan search zlib/* -r=conan-center

To search for recipes in all defined remotes use --all (this is only valid for searching recipes, not binaries):

$ conan search zlib/* -r=all

If you use instead the full package recipe reference, you can explore the binaries existing for that recipe, also in a remote or in the local conan cache:

$ conan search Boost/1.60.0@lasote/stable

A query syntax is allowed to look for specific binaries, you can use AND and OR operators and parenthesis, with settings and also options.

$ conan search Boost/1.60.0@lasote/stable -q arch=x86_64
$ conan search Boost/1.60.0@lasote/stable -q "(arch=x86_64 OR arch=ARM) AND (build_type=Release OR os=Windows)"

If you specify a query filter for a setting and the package recipe is not restricted by this setting, Conan won’t find the packages. e.g:

class MyRecipe(ConanFile):
    settings="arch"
$ conan search MyRecipe/1.0@lasote/stable -q os=Windows

The query above won’t find the MyRecipe binary packages (because the recipe doesn’t declare “os” as a setting) unless you specify the None value:

$ conan search MyRecipe/1.0@lasote/stable -q os=None

You can generate a table for all binaries from a given recipe with the --table option:

$ conan search zlib/1.2.11@conan/stable --table=file.html -r=conan-center
$ file.html # or open the file, double-click
../../../_images/search_binary_table.png
Previous Next

© Copyright 2016-2018, JFrog.

Built with Sphinx using a theme provided by Read the Docs.
Version: 1.9
Versions
2.16
2.15
2.14
2.13
2.12
2.11
2.10
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
2

1
1.66
1.65
1.64
1.63
1.62
1.61
1.60
1.59
1.58
1.57
1.56
1.55
1.54
1.53
1.52
1.51
1.50
1.49
1.48
1.47
1.46
1.45
1.44
1.43
1.42
1.41
1.40
1.39
1.38
1.37
1.36
1.35
1.34
1.33
1.32
1.31
1.30
1.29
1.28
1.27
1.26
1.25
1.24
1.23
1.22
1.21
1.20
1.19
1.18
1.17
1.16
1.15
1.14
1.13
1.12
1.11
1.10
1.9
1.8
1.7
1.6
1.5
1.4
1.3
Downloads
PDF