Bootic command-line interface
Clone or download
Latest commit b4ac046 Aug 2, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Retry requests when a open o read timeout occurs May 25, 2018
lib 0.5.4 Aug 2, 2018
libexec Update inspector Jan 22, 2018
spec Compare against both dev and public when running 'themes compare' Aug 1, 2018
.gitignore ignore examples Jul 29, 2017
.travis.yml WiP Sep 22, 2015 Update Feb 6, 2018
Gemfile WiP Sep 22, 2015
LICENSE.txt WiP Sep 22, 2015 README Aug 2, 2018
Rakefile Update custom commands path (to ~/.bootic) and README, as we're not u… Jan 23, 2018
bootic_cli.gemspec 0.5.3 Aug 2, 2018

Bootic CLI

CLI to interact with the Bootic API and run custom API scripts. Aquí hay una guía en castellano que explica cómo se instala y usa.


Install via Rubygems:

gem install bootic_cli


bootic help
bootic setup
bootic login
bootic console


bootic console launches an API session into an IRB console. You'll have root and shop API entities already initialized for you.

> shop.orders(status: "all").each do |o|
>   puts
> end

> explain shop

> list shop.products

> explain_link shop, :products

Access the configured client:

> client session.client
> new_root = client.from_url("")

Custom scripts

You can run simple Ruby scripts in the context of an API session with

bootic runner my_script.rb

Your script will be provided with the following variables:

# the API root resource

# your default shop

An example script that lists your shop's products:

# list_products.rb
shop.products.full_set.each do |p|
  puts p.title

You run it with:

bootic runner list_products.rb

Custom Thor commands

More advanced scripts can be written as Thor commands. Any scripts in ~/bootic will be loaded automatically.

# ~/.bootic/list_products.rb
class ListProducts < BooticCli::Command

  desc "list", "list products by status"
  option :s, banner: "<status>"
  def list
    shop.products(status: options["s"]).full_set.each do |p|
      puts p.title
  declare self, "list_products"

Now bootic help will list your custom list_products command.

bootic help list_products

# list hidden products
bootic list_products list -s hidden


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request