Skip to main content

Third-Party Library Submission Guidelines

How To Provide Your Code Using The Electric Imp Code Library System

Electric Imp is now able to make your library code available for other developers to include in their own Squirrel applications via the #require directive. If you would like us to provide your library to our developer and customer community in this way, please read through the guidelines and conditions presented below. The guidelines cover both your initial submission and all future updates. By submitting a new or updated library to Electric Imp, you accepting the terms and conditions listed below.

General Terms And Conditions

  • Electric Imp assumes no responsibility for publishing, updating or supporting your library.
  • You must maintain and support your library and its users. This includes providing updates to the library as required to address bugs, and to provide support options for users in case they have questions.
  • You must acknowledge any third-party code used in your library as required by the licensing terms of that third-party code.
  • Electric Imp will strive to publish updates to you have made to your library within a reasonable timeframe, but accepts no responsibility for any outcome caused by a delayed release for whatever reason.
  • By submitting your library to Electric Imp, you agree that Electric Imp is not required to use any part of your library; Electric Imp’s use of your library or the timing of such use is within Electric Imp’s sole discretion.
  • By submitting your library to Electric Imp, you further agree to Electric Imp’s Terms and Conditions and Privacy Policy as may be amended from time to time.

Development Procedure

  1. Host your code at a GitHub repository.
  2. For existing libraries, please make sure to pull the latest documentation and sources from our fork of your remote source repository electricimp/:master as there may have been some minor clean-up changes made to the source and/or the documentation before the previous final release.
  3. For a new library, please add this LICENSE file to the root directory of the repository. Please make sure to replace [yyyy] with the year of the repository’s creation, and Electric Imp with your own name or company.
    • Place a copy of the LICENSE file’s content at the head of every source file. Each line should be commented individually.
    • When a source file is changed and the current year differs from the year of creation, the date in the source header and your own LICENSE file should be updated in the form: yyyy-YYYY, where yyyy is the year of the original file creation and YYYY is the year of its latest update.
    • Note the LICENSE file slightly differs from what we used to have before, so please use the new file.
  4. For a new library, name your source code files as follows:
    • Add the library name in upper camel case, eg. MyElectricImpLibrary
    • If the code targets either agent or device, or has separate source for both agent and device, add .agent or .device to the file name(s) as appropriate, eg. MyElectricImpLibrary.device, MyElectricImpLibrary.agent.
    • If you use the same source file for agent and device, do not add .device or .agent to the file name.
    • All library source code files should then be suffixed. .lib.nut, eg. MyElectricImpLibrary.device.lib.nut, MyElectricImpLibrary.agent.lib.nut, YourElectricImpLibrary.lib.nut.
  5. Make the necessary code changes.
  6. Create or update the static VERSION property of the library class, which holds the current library version string, eg. static VERSION = "1.0.0";
  7. Create or update the file with descriptions of any new methods provided by your library, along with a description of its recommended usage. Include code examples, as well as information about users’ support options for users (email address, forum, ticket system, etc).
  8. Provide a fully functional example of the library usage in the /example folder.
  9. Provide some unit tests for the new functionality. Please use impt to implement your tests.
  10. Make sure the code style conforms to the Electric Imp Style Guide.
  11. Send us a link to your GitHub repository for review (in case of a new library) or a pull request, and provide some complete working use cases for the proposed functionality.


We will review the library, and may provide feedback. If we need you to make some code changes, go back to to step 5, above.

Release Procedure

  1. When the library is complete, Electric Imp will merge the pull request or fork the library to a corresponding repository.
  2. Your documentation may be edited and updated.
  3. The electricimp repository is tagged with the new library version number.
  4. The new version is pushed to the Electric Imp servers and from this point is available to user via #require.

Ongoing Maintenance

You provide code and documentation updates via Github as needed. You must notify Electric Imp of any such updates. The process for reviewing and releasing code updates follows the steps outlined above.