[![Gem Version](https://badge.fury.io/rb/arli.svg)](https://badge.fury.io/rb/arli) [![Build Status](https://travis-ci.org/kigster/arli.svg?branch=master)](https://travis-ci.org/kigster/arli) [![Maintainability](https://api.codeclimate.com/v1/badges/0812671b4bec27ba89b9/maintainability)](https://codeclimate.com/github/kigster/arli/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/0812671b4bec27ba89b9/test_coverage)](https://codeclimate.com/github/kigster/arli/test_coverage) # Arli Arli is a simple and easy to use Arduino Dependency Manager, that uses a a YAML formatted file declaring dependencies, as follows: ```yaml # vi:syntax=yaml version: 1.0.0 dependencies: - name: ESP8266WiFi version: '1.0' url: https://github.com/esp8266/Arduino - name: Time - name: "Adafruit GFX Library" - name: SimpleTimer url: https://github.com/jfturcot/SimpleTimer ``` The libraries may be specified with a name and url only, OR they can be specified by name (and optionally version) — as long as this is one of the standard libraries documented in the [Arduino official library database](http://downloads.arduino.cc/libraries/library_index.json.gz) JSON file. Basically a simple pairing of a library/project name (which also happens to be the local directory it's cloned into) and a remote URL. The gem was created to fill the need of managing many external libraries for an Arduino projects in a consistent way. Arli's API was loosely inspired by Bundler. ## Installation Install the gem globally like this: ```bash # if using rbenv, or rvm; otherwise you may need to prefix # with 'sudo' $ gem install arli ``` ## Usage Run `arli --help` for more information: ```bash Usage: arli [options] [ command [options] ] -D, --debug Print debugging info. -t, --trace Print exception stack traces. -v, --verbose Print more information. -V, --version Print current version and exit -h, --help prints this help Available Commands: install : installs libraries defined in Arlifile search : Flexible Search of the Arduino Library Database See arli --help for more information on a specific command. ``` #### Install Command Use this command to install libraries for the first time. NOTE: unless you pass `-e` flag, install command falls back to `update` if the target folder already exists. With `-e` flag, installer aborts if the target library already exists. ```bash Description: installs libraries defined in Arlifile Usage: arli install [options] Command Options -l, --libs PATH Local folder where libraries are installed Defaults to ~/Dropbox/Workspace/oss/arduino/libraries -p, --arli-path PATH Folder where Arlifile is located, Defaults to the current directory. -e, --if-exists ACTION If a library folder already exists, by default it will be overwritten or updated if possible. Alternatively you can either abort or backup -D, --debug Print debugging info. -t, --trace Print exception stack traces. -v, --verbose Print more information. -V, --version Print current version and exit -h, --help prints this help ``` #### Search Command To search Arduino library database, you can use the search command: ```bash Description: Flexible Search of the Arduino Library Database Usage: arli search [options] Command Options -d FILE/URL, a JSON file name, or a URL that contains the index --database Defaults to the Arduino-maintained list -m, --max NUMBER if provided, limits the result set to this number Defaults to 100 -D, --debug Print debugging info. -t, --trace Print exception stack traces. -v, --verbose Print more information. -V, --version Print current version and exit -h, --help prints this help Example: arli search 'name: /AudioZero/, version: "1.0.1"' I``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/kigster/arli. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).