Command Line Tool

The Cloud CMS Command Line tool provides developers and dev ops with the ability to work with and script against Cloud CMS content, applications and projects from the command line.

It is free to install but requires a Cloud CMS subscription to use.

How to Install

The Command Line Tool is easy to install using npm (the Node Package Manager).
You must first install Node.js in order to do so.

Step 1

Install Node.js

Node.js is a powerful JavaScript tool that does everything from power command-line tools to run entire web servers.
Install Node.js

Step 2

Install the Cloud CMS Client

Open a command prompt and run:

npm install cloudcms-cli -g

Note: If you're in Linux (or Mac), you might have to run sudo npm install cloudcms-cli -g.

Step 3

Register the Command Line Client

Open a command prompt and run:

cloudcms init

You'll be prompted for your Cloud CMS domain URL, your username and password. These are the ones that you created when you signed up for Cloud CMS.

Simply complete the prompts and your Command Line Interface will be connected to Cloud CMS!


To see what you can do with the tool, simply run:


And you will see something like this:

Cloud CMS command line tool

Usage: cloudcms [command]


    init                 Configures your Cloud CMS command line client

    create               Creates and connects the local app to a new Cloud CMS Application
    connect              Connects the local app to an existing Cloud CMS Application

    install              Installs packaged content into the local app
    uninstall            Removes packaged content from the local app
    import               Imports data (non-schema) from the local app

    deploy               Deploys the local app to the cloud
    undeploy             Undeploys the local app from the cloud
    start                Manually starts a deployed cloud app, making it live
    stop                 Manually stops a deployed cloud app, taking it offline
    info                 Retrieves information for a deployed cloud app
    open                 Launches the deployed cloud app in a browser

    server               Starts the Cloud CMS app server


    -h, --help     output usage information
    -v, --version  output the version number

Creating a new Application

You can use the command line tool to create a new Application and/or a new Project within Cloud CMS. Once created, the API Keys for your new Application will be retrieved so that your code can use them to connect to your Cloud CMS tenant.
Just run the following:

cloudcms create

And follow the prompts.

The file gitana.json will be created in your working directory. It contains your API Keys.

Connecting to an existing Application

Similar, you can also use the command line to connect your code to an existing Application instance within your Cloud CMS tenant. In this case, the existing API Keys for your Application are retrieved and made available to your code.
Just run the following:

cloudcms connect

And follow the prompts.

The file gitana.json will be created in your working directory. It contains your API Keys.

Running a Web Server

The command line includes a web server that you can run to test your local web applications. This web server is functionally equivalent to the hosting web server that runs deployed applications in the cloud.
Just run the following:

cloudcms server

You can then access your web site by pointing your browser to http://localhost:2999