Developing locally with CLI

Coveo Qubit CLI is a command line tool for working with experiences and Placements on your local file system.

This allows you to develop your Placement builds with all your existing tooling, to write and execute unit tests, and to use the CLI’s super fast built in local Placement server complete with hot reloading.

Installing Coveo Qubit CLI

Note

Before installing Qubit CLI, you’ll need to install node and npm on your machine.

Step 1

Install Qubit CLI as a global npm package:

npm install -g qubit-cli

Step 2

Install the Chrome extension for instant previewing. Run:

qubit extension

And drag the chrome-extension folder into the Chrome extensions pane.

Creating a Placement

$ qubit placement create

Cloning an existing Placement

$ qubit placement clone {propertyId} {placementId}

Pulling/pushing changes

$ qubit placement pull
$ qubit placement push

Developing locally

Qubit CLI comes with a built in local previewing server.

This allows you to develop your Placements and experiences locally with instant hot reloading and fast feedback on your changes.

Here’s how you can make use of the cli’s built in preview server

Step 1

Install Qubit CLI and the associated chrome extension.

Step 2

From your experience or Placement folder, run

$ qubit

Step 3

Open Chrome and select the Chrome extension icon. The icon should go from grey to yellow, which means it’s working.

Step 4

Add the following to your placement.css file:

body {
    background: yellow !important;
}

The page background should turn yellow!