jbcli - Jitterbit CLI
A command-line tool for interacting with Jitterbit's Citizen recipe repository.
Installation Instructions
Prerequisites
- Install nodejs v6.x or greater from nodejs
Install from NPM
npm install -g jbcli
Run the tool
The general format for commands is as follows:
jbcli <entity> <action> [options]
Command List
# Log in jbcli login --host <hostname[:port]> --email <email> --password <password>User <email> authenticated succesfully into <hostname[:port]>. # You may also omit your password, and you will be prompted for it (input will be hidden). jbcli login --host <hostname[:port]> --email <email>Password:User <username> authenticated succesfully into <hostname[:port]>. # Log out jbcli logoutUser <email> logged out. # List user organizations jbcli org list[orgId1] orgName1[orgId2] orgName2... # List environments in the current organization jbcli env list[envId1] envName1[envId2] envName2... # Set properties jbcli config set <key1>=<value1> <key2>=<value2> ...<key1>=<value1> set<key2>=<value2> set... # Get a property jbcli config get <key><key>: <value> # List all recipes jbcli recipe list [--private][id1] name1 by author1 [id2] name2 by author2 ... # Get a specific recipe [and save the jitterpak locally] jbcli recipe get <id> [--clean] [--saverecipe <location>] [--savejpk <location>]{<recipe>} | Recipe saved to <location>.[Jitterpak saved to <location>.] # Upload a new recipe jbcli recipe upload --jpk <jpk> --recipe <recipe> [--public]Recipe uploaded, assigned ID <id>, and can be found at <location> # Update an existing recipe jbcli recipe update <id> --jpk <jpk> --recipe <recipe> [--public]Recipe with ID <id> updated. # Delete an existing recipe jbcli recipe delete <id>Recipe with ID <id> deleted. # Validate a recipe jbcli recipe validate --recipe <recipe>Recipe is valid. # Generate a recipe and/or a configure jbcli recipe generate --jpk <jitterpak> [--recipeonly | --cfgonly][Configure file saved to <location>.][Recipe saved to <location>.] # Deploy a recipe jbcli recipe deploy <ID> --cfg <configure>Recipe deployed, ID <id>. # List deployed recipes jbcli deployed-recipe list <--all | --environment <env>>[id1] name1 by author1[id2] name2 by author2... # Undeploy and delete a deployed recipe jbcli deployed-recipe delete <id>Deployed recipe with ID <id> deleted.
For Developers
To set up an environment to contribute to the project.
Install the required npm packages
sudo npm install -g typescript
sudo npm install -g tslint typescript
sudo npm install -g typings
sudo npm install -g gulp
Clone the repository and install the dependencies
git clone https://github.com/jitterbit/jbcli.git
cd jbcli
npm install
typings install
npm link
Known Issues
- Due to a quirk in Node.js, Windows users will need to run the tool from the Command Prompt (cmd.exe) and not a terminal like Cygwin, as this breaks text input.