Package: idf-component-manager
IDF Component ManagerThe IDF Component manager is a tool that downloads dependencies for anyESP-IDFCMake project. It makes sure that the right versions of all components required for a successful build of your project are in place. The download happens automatically during a run of CMake. It can source components either fromthe component registryor from a git repository.A list of components can be found athttps://components.espressif.com/Official documentationDisabling the Component ManagerThe component manager can be explicitly disabled by settingIDF_COMPONENT_MANAGERenvironment variable to0.Using with a projectYou can addidf_component.ymlmanifest files with the list of dependencies to any component in your project.IDF Component Manager will download dependencies automatically during the project build process.When CMake configures the project (e.g.idf.py reconfigure) component manager does a few things:Processesidf_component.ymlmanifests for every component in the projectCreates adependencies.lockfile in the root of the project with a full list of dependenciesDownloads all dependencies to themanaged_componentsdirectoryThe component manager won't try to regeneratedependencies.lockor download any components if manifests, lock file, and content ofmanaged_componentdirectory weren't modified since the last successful build.Defining dependencies in the manifestAll dependencies are defined in the manifest file.dependencies:# Required IDF versionidf:">=4.1"# For components maintained by Espressif only name can be used.# Same as `espressif/component`component:version:"~2.0.0"# Or in a shorter formcomponent2:">=1.0.0"# For 3rd party components :username/component:version:"~1.0.0"# For transient dependencies `public` flag can be set.public:trueanotheruser/component:"<3.2.20"# For components hosted on non-default registry:company_user/component:version:"~1.0.0"service_url:"https://componentregistry.company.com"# For components in git repository:test_component:path:test_componentgit:ssh://git@gitlab.com/user/components.git# For test projects during component development# components can be used from a local directory# with relative or absolute pathsome_local_component:path:../../projects/component# For optional dependenciesoptional_component:version:"~1.0.0"rules:# will add "optional_component" only when all if clauses are True-if:"idf_version>=3.3,<5.0"# supports all SimpleSpec grammars (https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec)-if:"targetin[esp32,esp32c3]"# supports boolean operator ==, !=, in, not in.# For example of the componentnamespace/component_with_example:version:"~1.0.0"# if there is no `override_path` field, use component from registryoverride_path:"../../"# use component in a local directory, not from registrynamespace/no_required_component:version:"*"require:no# Download component but don't add it as a requirementnamespace/pre_release_component:version:"*"pre_release:true# Allow downloading of pre-release versionsComponent metadata cachingBy default, information about available versions of components not cached. If you make many requests to the registry from one machine, you can enable caching by settingIDF_COMPONENT_API_CACHE_EXPIRATION_MINUTESenvironment variable to the number of minutes to cache the data.External linksYou can add links to theidf_component.ymlfile to the root of the manifest:url:"https://example.com/homepage"# URL of the component homepagerepository:"https://gitexample.com/test_project"# URL of the public repository with component source code, i.e GitHub, GitLab, etc.documentation:"https://example.com/documentation"# URL of the component documentationissues:"https://git.example.com/test_project/tracker"# URL of the issue trackerdiscussion:"https://discord.example.com/test_project"# URL of the component discussion, i.e. Discord, Gitter, forum, etc.A link should be a correct HTTP(S) URL likehttps://example.com/pathexcept therepositoryfield,
it is expected to be a validGit remoteURL.Add examples to the componentTo add examples to your component, place them in theexamplesdirectory inside your component.
Examples are discovered recursively in subdirectories at this path.
A directory withCMakeLists.txtthat registers a project is considered as an example.Custom example pathsYou can specify custom example paths for uploading them to the component registry.
For that, addexamplesfield to the root of the manifest:examples:-path:../some/path-path:../some/other_pathEnvironment variablesVariableDefault value (or example for required)DescriptionIDF_COMPONENT_API_TOKENAPI token to access the component registryIDF_COMPONENT_REGISTRY_URLhttps://components.espressif.com/URL of the default component registryIDF_COMPONENT_STORAGE_URLhttps://components-file.espressif.com/URL of the default file storage serverIDF_COMPONENT_REGISTRY_PROFILEdefaultProfile in the config file to use for component registryIDF_COMPONENT_API_CACHE_EXPIRATION_MINUTES0API Cache expiration time in minutesIDF_COMPONENT_CACHE_PATH* Depends on OSCache directory for component managerCOMPONENT_MANAGER_JOB_TIMEOUT300Timeout in seconds to wait for component processingIDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS0Overwrite files in the managed_component directory, even if they have been modified by the userIGNORE_UNKNOWN_FILES_FOR_MANAGED_COMPONENTS0Ignore unknown files in managed_components directoryIDF_COMPONENT_CHECK_NEW_VERSION0Check for new versions of componentsIDF_COMPONENT_VERIFY_SSL1Verify SSL certificates when making requests to the registry, set it 0 to disable or provide a CA bundle pathContributions GuideWe welcome all contributions to the Component Manager project.You can contribute by fixing bugs, adding features, adding documentation, or reporting anissue. We accept contributions viaGitHub Pull Requests.Before reporting an issue, make sure you've searched for a similar one that was already created. If you are reporting a new issue, please follow the Issue Template.Installing a development version of the component managerYou can install the development version of the component manager from the main branch of this repository:On Linux/macOS:Go to the directory with your ESP-IDF installation and run:# activate ESP-IDF environmentsource./export.sh# or . ./export.fish, if you use fish shell# remove old version of the component managerpython-mpipuninstall-yidf-component-manager# install the development version (from the main branch)python-mpipinstallgit+https://github.com/espressif/idf-component-manager.git@mainOn Windows:RunESP-IDF PowerShell EnvironmentorESP-IDF Command Prompt (cmd.exe)from the Start menu and run the following command:# remove old version of the component managerpython-mpipuninstall-yidf-component-manager# install the development version (from the main branch)python-mpipinstallgit+https://github.com/espressif/idf-component-manager.git@mainResourcesThe Component managerDocumentationThe Python Package Index project pagehttps://pypi.org/project/idf-component-manager/The Component Manager section in theESP-IDF Programming Guide