Skip to content
/ cli Public

A command-line interface to interact with the Coveo platform and quickly create Coveo Headless-powered search pages with Angular, React or Vue.js.

License

Notifications You must be signed in to change notification settings

coveo/cli

Coveo CLI

Build

What Is the Coveo CLI?

The Coveo CLI is a powerful command-line interface (CLI) that interacts with the Coveo platform to facilitate development and build automation. Key features include the following:

  • Quickly create a Coveo Headless-powered search page for your Coveo organization, relying on popular frameworks like Angular, React, and Vue.js.
  • Quickly create a Coveo Atomic-powered search page for your Coveo organization, with custom component examples and a search token provider.
  • Create and manage Coveo organizations.
  • Automate deployments between organizations.
  • Manage Coveo Push API sources.
  • Perform queries against a Coveo index.

When to Use the Coveo CLI?

We recommend the Coveo CLI both to newcomers who are looking for quick scaffolding options and to more seasoned Coveo developers who want to optimize their workflow. With the CLI, developers can get their frontend project started with a single command rather than by copy-pasting examples. The CLI also lets you automate deployments on your machine or in your CI/CD pipeline using the org:resources commands and/or the source commands.

Most if not all of those operations can be done either through the Coveo Administration Console or directly using the Coveo REST APIs. The former, while being easy to understand and get started with, can also be a bit cumbersome and time-consuming for repetitive tasks. The CLI lets you avoid this issue by providing single commands that can accomplish the target tasks, and by allowing you to automate and chain commands together easily. The REST APIs are on the opposite side of the spectrum: they go straight to the point and avoid any repetition. They can however be quite hard to understand at first and require making numerous and complex requests to different APIs. The CLI can handle most of this complexity for you.

Installation

Option 1: Install via an Executable

Download and run the executable for your operating system to install the latest available version of the CLI.

Afterward, you can run coveo update at any time to update your CLI installation to the latest version.

Option 2: Install via NPM

You can alternatively install the CLI globally via npm:

npm install -g @coveo/cli

Afterward, you can run npm update -g @coveo/cli at any time to update your npm-based CLI installation to the latest version.

You can also run the CLI via npx:

npx @coveo/cli

Validating your installation

To validate your CLI installation, use the coveo --version command:

$ npm install -g @coveo/cli
$ coveo COMMAND
running command...
$ coveo (--version)
@coveo/cli/3.2.7 linux-x64 node-v20.12.2
$ coveo --help [COMMAND]
USAGE
  $ coveo COMMAND
...

Getting started

After you install the CLI, you'll typically want to login to your Coveo Organization. You can check out all the available commands here.

The project is still under heavy development and more features are coming, stay tuned!

Local Setup to Contribute

To install all dependencies and link local packages, run:

npm i

To run the local version of the CLI

./packages/cli/core/bin/dev

To build all projects for production, run:

npm run build

To run unit tests

npm run test