|
| 1 | +# Arduino Library Manager FAQ |
| 2 | + |
| 3 | +## Table of Contents |
| 4 | + |
| 5 | +<!-- toc --> |
| 6 | + |
| 7 | +- [General](#general) |
| 8 | + - [What is the Arduino Library Manager?](#what-is-the-arduino-library-manager) |
| 9 | + - [How is the Library Manager index generated?](#how-is-the-library-manager-index-generated) |
| 10 | +- [Submission](#submission) |
| 11 | + - [How can I add my library to Library Manager?](#how-can-i-add-my-library-to-library-manager) |
| 12 | + - [What are the requirements for a library to be added to Library Manager?](#what-are-the-requirements-for-a-library-to-be-added-to-library-manager) |
| 13 | +- [Updates](#updates) |
| 14 | + - [How can I publish a new release once my library is in the list?](#how-can-i-publish-a-new-release-once-my-library-is-in-the-list) |
| 15 | + - [What are the requirements for publishing new releases of libraries already in the Library Manager list?](#what-are-the-requirements-for-publishing-new-releases-of-libraries-already-in-the-library-manager-list) |
| 16 | + - [Why aren't releases of my library being picked up by Library Manager?](#why-arent-releases-of-my-library-being-picked-up-by-library-manager) |
| 17 | + - [I did something wrong! How can I change or unpublish an already published library?](#i-did-something-wrong-how-can-i-change-or-unpublish-an-already-published-library) |
| 18 | + - [How can I change my library's name?](#how-can-i-change-my-librarys-name) |
| 19 | +- [Limitations](#limitations) |
| 20 | + - [Is my Git repository OK?](#is-my-git-repository-ok) |
| 21 | + - [Are Git submodules supported?](#are-git-submodules-supported) |
| 22 | +- [Usage](#usage) |
| 23 | + - [Can I add my own URL with my own library index?](#can-i-add-my-own-url-with-my-own-library-index) |
| 24 | + - [When I install a library that I know depends on another library, will this other library be installed as well?](#when-i-install-a-library-that-i-know-depends-on-another-library-will-this-other-library-be-installed-as-well) |
| 25 | + - [Can I install multiple versions of one library and use the proper one in my sketches?](#can-i-install-multiple-versions-of-one-library-and-use-the-proper-one-in-my-sketches) |
| 26 | + - [How can I remove a library I installed via Library Manager?](#how-can-i-remove-a-library-i-installed-via-library-manager) |
| 27 | + |
| 28 | +<!-- tocstop --> |
| 29 | + |
| 30 | +## General |
| 31 | + |
| 32 | +### What is the Arduino Library Manager? |
| 33 | + |
| 34 | +Library Manager is a feature of the Arduino development software which makes it easy for users to find, install, and update both official and 3rd party libraries. |
| 35 | + |
| 36 | +- In the Arduino IDE: **Sketch > Include Library > Manage Libraries...** |
| 37 | +- In Arduino CLI: `arduino-cli lib --help` |
| 38 | +- In Arduino Web Editor: all Library Manager libraries are pre-installed. |
| 39 | + |
| 40 | +When a library is [added to the library list](README.md#adding-a-library-to-library-manager), every release of the library will automatically be made available for installation via Library Manager. Users can set their preferences to display an update notification when a new version of any installed library on the list is available and easily update to the new version with just a couple clicks. |
| 41 | + |
| 42 | +More information: |
| 43 | + |
| 44 | +- https://www.arduino.cc/en/Guide/Libraries#toc3 |
| 45 | +- https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_lib/ |
| 46 | +- https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-on-various-platforms-4b3e4a |
| 47 | + |
| 48 | +### How is the Library Manager index generated? |
| 49 | + |
| 50 | +[The Library Manager index](http://downloads.arduino.cc/libraries/library_index.json) contains the data for every release of every one of the thousands of libraries that have been added to the Library Manager list. This index is used by Library Manager to provide installation and updates of the libraries as well as to generate automated documentation pages for the [Arduino Library Reference](https://www.arduino.cc/reference/en/libraries/). |
| 51 | + |
| 52 | +Every hour, the automated Library Manager indexer system: |
| 53 | + |
| 54 | +1. checks every repository in the Library Manager list for new tags |
| 55 | +1. checks whether those tags meet [the requirements for addition to the index](#update-requirements) |
| 56 | +1. adds entries to the index for compliant tags |
| 57 | +1. pushes the updated index to Arduino's download server |
| 58 | + |
| 59 | +## Submission |
| 60 | + |
| 61 | +### How can I add my library to Library Manager? |
| 62 | + |
| 63 | +Follow the instructions [here](README.md#adding-a-library-to-library-manager). |
| 64 | + |
| 65 | +### What are the requirements for a library to be added to Library Manager? |
| 66 | + |
| 67 | +<a id="submission-requirements"></a> |
| 68 | + |
| 69 | +- [ ] The library must be fully compliant with the [Arduino Library Specification](https://arduino.github.io/arduino-cli/latest/library-specification). |
| 70 | +- [ ] The library must have [a library.properties file](https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata), in compliance with the Arduino Library 1.5 format. |
| 71 | +- [ ] The library.properties file must be located in the root of the repository. |
| 72 | +- [ ] The library must not have the same library.properties `name` value (regardless of case) as another library previously added to the Library Manager list. |
| 73 | +- [ ] For 3rd party libraries, the `name` field in library.properties must not start with `Arduino`. |
| 74 | +- [ ] The library repository must not contain any `.exe` files. |
| 75 | +- [ ] The library repository must not contain a [`.development` file](https://arduino.github.io/arduino-cli/latest/library-specification/#development-flag-file). |
| 76 | +- [ ] The library repository must not contain any [symlinks](https://en.wikipedia.org/wiki/Symbolic_link). |
| 77 | +- [ ] The library repository must not contain any files detected as infected by our antivirus scan. |
| 78 | +- [ ] The library repository must have a [Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) (or [release](https://help.github.com/articles/creating-releases/)) and must have been compliant with all the above requirements at the time of that tag. |
| 79 | +- [ ] The library repository must be hosted on a major Git-hosting website like GitHub, BitBucket or GitLab (other hosting sites may be considered on request). |
| 80 | + |
| 81 | +Arduino has created a command line tool to check libraries for compliance with all the Library Manager requirements: |
| 82 | + |
| 83 | +https://github.com/arduino/arduino-lint |
| 84 | + |
| 85 | +Arduino Lint is also available as a GitHub Actions action that can be used in the CI systems of Arduino library repositories to ensure continued compliance: |
| 86 | + |
| 87 | +https://github.com/arduino/arduino-lint-action |
| 88 | + |
| 89 | +## Updates |
| 90 | + |
| 91 | +### How can I publish a new release once my library is in the list? |
| 92 | + |
| 93 | +1. Make sure the library is compliant with [all requirements](#update-requirements). |
| 94 | +1. Update the `version` in your [`library.properties`](https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata)). |
| 95 | +1. Tag your library once more and push the new tag (or create a release if your Git-hosting site offers a way to do it, for example with [GitHub "releases"](https://help.github.com/articles/creating-releases/)). |
| 96 | + |
| 97 | +[Our indexer](#how-is-the-library-manager-index-generated) checks for new releases every hour and will eventually fetch and publish your new release. |
| 98 | + |
| 99 | +### What are the requirements for publishing new releases of libraries already in the Library Manager list? |
| 100 | + |
| 101 | +<a id="update-requirements"></a> |
| 102 | + |
| 103 | +- [ ] The library must be compliant with all the same [requirements that apply to submissions](#submission-requirements). |
| 104 | +- [ ] The `name` property in library.properties must not have changed from the value it had when the library was submitted. If you must change the library name, see [this](#how-can-i-change-my-librarys-name). |
| 105 | +- [ ] The `version` property in library.properties must not be the same as it was in a tag previously added to the Library Manager index. |
| 106 | + |
| 107 | +### Why aren't releases of my library being picked up by Library Manager? |
| 108 | + |
| 109 | +The Library Manager indexer job will reject any releases which aren't compliant with all [the requirements](#update-requirements). |
| 110 | + |
| 111 | +### I did something wrong! How can I change or unpublish an already published library? |
| 112 | + |
| 113 | +In order to change contents of an already published library version, you can recreate its related tag. |
| 114 | + |
| 115 | +In order to **un**publish a library version, delete its related tag/release. |
| 116 | + |
| 117 | +Once you have done that, open an issue in [the issue tracker of this repository](https://github.com/arduino/library-registry/issues), specifying the URL of the library repository and requesting that the library be updated. |
| 118 | + |
| 119 | +### How can I change my library's name? |
| 120 | + |
| 121 | +For the sake of continuity, libraries in the Library Manager list are locked to the name they had at the time they were added to the list. Changing the library name can be disruptive to its users because this is the unique identifier for the library used by the Arduino development software [command line interfaces](https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_lib/), sketch [metadata](https://arduino.github.io/arduino-cli/latest/sketch-specification/#metadata), library [dependencies](https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format), and installation location. |
| 122 | + |
| 123 | +If you wish to change the name it will need to be done manually by request: |
| 124 | + |
| 125 | +1. Change the `name` value in your [library.properties file](https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format) and update the `version`. |
| 126 | +1. Create a release or tag. |
| 127 | +1. Submit an [issue report](https://github.com/arduino/library-registry/issues) requesting the name be changed and stating the URL of your library's repository. |
| 128 | + |
| 129 | +## Limitations |
| 130 | + |
| 131 | +### Is my Git repository OK? |
| 132 | + |
| 133 | +Your repo is OK if it meets all [the requirements listed here](#submission-requirements). |
| 134 | + |
| 135 | +### Are Git submodules supported? |
| 136 | + |
| 137 | +No. The library archive distributed by Library Manager will only contain an empty folder where the submodule should be. |
| 138 | + |
| 139 | +## Usage |
| 140 | + |
| 141 | +### Can I add my own URL with my own library index? |
| 142 | + |
| 143 | +No. At the moment, the Arduino development software handles one URL only, and that's written into the code (dev jargon: it's hardcoded), this is a known limitation. |
| 144 | +However, if you know your way through the code, you can change that URL with another one. |
| 145 | + |
| 146 | +### When I install a library that I know depends on another library, will this other library be installed as well? |
| 147 | + |
| 148 | +As of Arduino IDE 1.8.10 and Arduino CLI 0.7.0, you can specify the dependencies of your library in the `depends` field of library.properties. Those libraries can be installed automatically when someone installs your library via Library Manager. |
| 149 | + |
| 150 | +For more information, see the [`library.properties` file format documentation](https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format). |
| 151 | + |
| 152 | +### Can I install multiple versions of one library and use the proper one in my sketches? |
| 153 | + |
| 154 | +Library Manager installs libraries into your sketchbook's `libraries` folder. Since you cannot create two folders with the same name, we can't install two versions of the same library. However, you can switch between library versions by selecting the appropriate one from the version dropdown that pops up on Library Manager when more than one version is available. |
| 155 | + |
| 156 | +### How can I remove a library I installed via Library Manager? |
| 157 | + |
| 158 | +#### Arduino IDE 2.x |
| 159 | + |
| 160 | +Hover the mouse pointer over the "INSTALLED" label on the library listing in Library Manager. It will now change to "UNINSTALL", which you can click to uninstall that library. |
| 161 | + |
| 162 | +#### Classic Arduino IDE |
| 163 | + |
| 164 | +This version of the Arduino IDE does not have an integrated uninstall functionality, so you will need to remove the library manually. Open your sketchbook's `libraries` folder with your operating system's file explorer (Windows: Explorer, Mac: Finder, Linux: Nautilus, kfiles...) and delete the folder containing the library. |
| 165 | + |
| 166 | +#### Arduino CLI |
| 167 | + |
| 168 | +Libraries can be uninstalled via [the `arduino-cli lib uninstall` command](https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_lib_uninstall/). |
0 commit comments