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

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Mar 7, 2024
Jul 6, 2021
Jun 1, 2022
Feb 21, 2024
Feb 21, 2024
Feb 21, 2024
Sep 28, 2022
Mar 7, 2024
Dec 14, 2022
Jul 24, 2023
Feb 20, 2024
Apr 11, 2023
Mar 7, 2024
Feb 1, 2022
Aug 26, 2022
Jan 20, 2021
Feb 14, 2023
Feb 1, 2022
Jan 16, 2024
Sep 21, 2022
Mar 7, 2024
Sep 21, 2022
Feb 11, 2022
Feb 12, 2021
Feb 21, 2024
Jan 11, 2023
Feb 13, 2023
Mar 6, 2023
Jan 11, 2023
Aug 30, 2021
Mar 4, 2024
Sep 16, 2022
Mar 22, 2023
Mar 7, 2024
Mar 7, 2024
May 4, 2023
Feb 1, 2022

Repository files navigation

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.2 linux-x64 node-v20.9.0
$ 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