hubify

CLI for interacting with the Hubify API.

npm install hubify
6 downloads in the last week
12 downloads in the last month

Hubify CLI

A command-line interface for interacting with the Hubify API.

The Hubify CLI simplifies the process of environment setup and subsequent management of hub scripts deployed on hubify.com.

Installation

Installing NPM

curl http://npmjs.org/install.sh | sh

Installing Hubify CLI

[sudo] npm install -g hubify

Environment Setup

Create a working directory where your scripts will live:

$ mkdir my_username && cd my_username

Then run:

$ hubify init

This command will prompt you for your Hubify username and API key. Your API key can be found on the edit profile page once logged in over at hubify.com.

This will download both the necessary and available libraries for your script once deployed.

Development Workflow

The current feature set is quite limited. Only automated deployments are supported which means you will need to copy/paste existing scripts from hubify.com to your local environment. Creating new hubs must also be done from the hubify website.

By convention scripts should be named <slug>.js where slug is the slugified version of your hub's name. For example if your hub's name is My 1st Hub then your script name should be my-1st-hub.js. This generally means replacing spaces and special charachters with dashes. If you're unsure of what your hub's slug name is you should take a look at your hub's endpoint. The slug will be the portion after the last "/" and before the format ".json" (e.g. http://hubify.com/username/hub/_my-1st-hub_.json)

Once you've copied your hub down into your local work directory you can deploy by running:

$ hubify deploy my-1st-hub

A word of warning: The change will take effect immediately. In case you need to rollback, a backup of the previous script is created with the .bak extension in your working directory. This can be deployed using the -f switch to specify an alternate file to use instead of the default. For example: $ hubify deploy -f my-1st-hub.js.bak my-1st-hub

Supported Languages

Only JavaScript (Node JS) is supported at present but we have plans to add CoffeeScript and Python in the near future.

npm loves you