Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including cloudelements-cmtool with all npm packages installed. Try it out:

var cloudelementsCmtool = require("cloudelements-cmtool")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

cloudelements-cmtool v0.2.7

An integrated client for CE CM apps.

Cloud Elements CMTool

This is the Cloud Elements CM tool, which is used to connect with and integrate the various CM applications used by Cloud Elements, such as Git and Pivotal Tracker.

Install (or update) it globally:

$ npm install -g cloudelements-cmtool
$ npm update -g cloudelements-cmtool

You may also need to set some environment variables: (you could put these in your ~/.bash_profile or other startup script)

$ export CMTOOL_GIT_DIR=/path/to/git/repo
$ export CMTOOL_PIVOTAL_TOKEN=mypivotaltoken12345abcde
$ export CMTOOL_DB_URL=postgres://user:pass@localhost:5432/dbname
$ export CMTOOL_CONFIG_HOME=/path/to/cmtool_home

Once these are sorted, you can use the cmtool from the command line:

$ cmtool <command> [parameters]

For example,

$ cmtool release-notes 1.10 1.11
$ cmtool qa-label "release-1.10" "qa environment"
$ cmtool get-props
$ cmtool put-props
$ cmtool one-shot uptime snap
$ cmtool delete-user

Or, you can use it in your javascript code:

var cmtool = require('cloudelements-cmtool'),
    git = new cmtool.Git,
    pivotal = new cmtool.Pivotal('my-pivotal-token'),
    cart = new cmtool.Cart(pivotal, git);


cart.changeLog('1.10', '1.11', function(err, stories) {
  console.log("err", err);
  console.log("stories", stories);

git.log('patch-1.10.6', function(err, entry, done) {
  if (err != null) {
    console.log("err", err);
  } else if (done) {
  } else {
    console.log("found commit with hash", entry.hash);

var cmdStep = cmtool.homie.cmdStep,
    task = {
  name: 'one-shot',
  usesConn: true,
  ccb: function(err) {
    if (err != null) {
      console.warn("Connection error: ", err);
  steps: [cmdStep('command', 'uptime')]
cmtool.homie.runTaskOn(task, 'all');

var dbUrl = 'postgres://user:pass@localhost:5432/dbname',
    dbtool = new cmtool.Dbtool(dbUrl),
    email = '';

dbtool.deleteUser(email, function(err){
  if (err != null) {
    say("err: ", err);
  } else {
    say("Delete " + email + " complete");
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free