Cli Docs

Coveo CLI

What is it?

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:

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

Usage

$ npm install -g @coveo/cli
$ coveo COMMAND
running command...
$ coveo (--version)
@coveo/cli/1.34.0 linux-x64 node-v16.16.0
$ coveo --help [COMMAND]
USAGE
  $ coveo COMMAND
...

Commands

coveo auth:login

Log in to the Coveo Platform using the OAuth2 flow.

USAGE
  $ coveo auth:login [-r US|EU|AU] [-e dev|stg|hipaa|prod] [-o <value>]

FLAGS
  -e, --environment=<option>  [default: prod] The Coveo Platform environment to log in to.
                              <options: dev|stg|hipaa|prod>
  -o, --organization=myOrgID  The identifier of the organization to log in to. If not specified, the CLI logs you in to
                              the first available organization. See also commands `config:get`, `config:set`, and
                              `org:list`.
  -r, --region=<option>       [default: us] The Coveo Platform region to log in to. See
                              <https://docs.coveo.com/en/2976>.
                              <options: US|EU|AU>

DESCRIPTION
  Log in to the Coveo Platform using the OAuth2 flow.

EXAMPLES
  $ coveo auth:login

See code: src/commands/auth/login.ts

coveo auth:token

Log in to the Coveo Platform using an access token.

USAGE
  $ coveo auth:token -t <value> [-r US|EU|AU] [-e dev|stg|hipaa|prod]

FLAGS
  -e, --environment=<option>  [default: prod] The Coveo Platform environment to log in to.
                              <options: dev|stg|hipaa|prod>
  -r, --region=<option>       [default: us] The Coveo Platform region to log in to. See
                              <https://docs.coveo.com/en/2976>.
                              <options: US|EU|AU>
  -t, --token=xxx-api-key     (required) The API-Key that shall be used to authenticate you to the organization. See
                              <https://github.com/coveo/cli/wiki/Using-the-CLI-using-an-API-Key>.

DESCRIPTION
  Log in to the Coveo Platform using an access token.

EXAMPLES
  $ coveo auth:token

See code: src/commands/auth/token.ts

coveo config:get [KEY]

Display the current configuration.

USAGE
  $ coveo config:get [KEY]

ARGUMENTS
  KEY  The config key for which to show the value

DESCRIPTION
  Display the current configuration.

EXAMPLES
  $ coveo config:get

  $ coveo config:get organization

  $ coveo config:get accessToken

See code: src/commands/config/get.ts

coveo config:set

Modify the current configuration.

USAGE
  $ coveo config:set [-o <value>]

FLAGS
  -o, --organization=myOrgID  The identifier of the organization inside which to perform operations. See
                              <https://docs.coveo.com/en/1562/#organization-id-and-other-information>.

DESCRIPTION
  Modify the current configuration.

See code: src/commands/config/set.ts

coveo help [COMMAND]

Display help for coveo.

USAGE
  $ coveo help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for coveo.

See code: @oclif/plugin-help

coveo org:create NAME

Create a new test Coveo organization.

USAGE
  $ coveo org:create [NAME] [-s]

ARGUMENTS
  NAME  The name to assign to the new organization.

FLAGS
  -s, --[no-]setDefaultOrganization  Set the created organization as the default one

DESCRIPTION
  Create a new test Coveo organization.

See code: src/commands/org/create.ts

coveo org:list

List Coveo organizations.

USAGE
  $ coveo org:list [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml |  |
    [--csv | --no-truncate]] [--no-header | ]

FLAGS
  -x, --extended     show extra columns
  --columns=<value>  only show provided columns (comma-separated)
  --csv              output is csv format [alias: --output=csv]
  --filter=<value>   filter property by partial string matching, ex: name=foo
  --no-header        hide table header from output
  --no-truncate      do not truncate output to fit screen
  --output=<option>  output in a more machine friendly format
                     <options: csv|json|yaml>
  --sort=<value>     property to sort by (prepend '-' for descending)

DESCRIPTION
  List Coveo organizations.

See code: src/commands/org/list.ts

coveo org:resources:list

List available snapshots from an organization

USAGE
  $ coveo org:resources:list [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml |  |
    [--csv | --no-truncate]] [--no-header | ] [-o <value>]

FLAGS
  -o, --organization=targetorganizationg7dg3gd  The unique identifier of the organization containing the snapshots. If
                                                not specified, the organization you are connected to will be used.
  -x, --extended                                show extra columns
  --columns=<value>                             only show provided columns (comma-separated)
  --csv                                         output is csv format [alias: --output=csv]
  --filter=<value>                              filter property by partial string matching, ex: name=foo
  --no-header                                   hide table header from output
  --no-truncate                                 do not truncate output to fit screen
  --output=<option>                             output in a more machine friendly format
                                                <options: csv|json|yaml>
  --sort=<value>                                property to sort by (prepend '-' for descending)

DESCRIPTION
  List available snapshots from an organization

See code: src/commands/org/resources/list.ts

coveo org:resources:model:create

Create a Snapshot Pull Model

USAGE
  $ coveo org:resources:model:create

DESCRIPTION
  Create a Snapshot Pull Model

See code: src/commands/org/resources/model/create.ts

coveo org:resources:monitor SNAPSHOTID

Monitor a Snapshot operation

USAGE
  $ coveo org:resources:monitor [SNAPSHOTID] [-w <value>] [-o <value>]

ARGUMENTS
  SNAPSHOTID  The unique identifier of the target snapshot.

FLAGS
  -o, --organization=targetorganizationg7dg3gd  The unique identifier of the organization containing the snapshot. If
                                                not specified, the organization you are connected to will be used.
  -w, --wait=seconds                            [default: 60] The maximum number of seconds to wait before the commands
                                                exits with a timeout error. A value of zero means that the command will
                                                wait indefinitely.

DESCRIPTION
  Monitor a Snapshot operation

See code: src/commands/org/resources/monitor.ts

coveo org:resources:preview

Preview resource updates

USAGE
  $ coveo org:resources:preview [-w <value>] [-p none|light|detailed] [-o <value>] [-s <value> | ] [-d]

FLAGS
  -d, --showMissingResources                    Preview resources deletion when enabled
  -o, --organization=targetorganizationg7dg3gd  The unique identifier of the organization where to preview the changes
                                                If not specified, the organization you are connected to will be used.
  -p, --previewLevel=(none|light|detailed)      [default: detailed] The verbosity of the preview. The `light` preview is
                                                faster to generate but only contains a limited amount of information, as
                                                opposed to the `detailed` preview that takes more time to generate, but
                                                returns a diff representation of all the changes to apply.
  -s, --snapshotId=<value>                      The unique identifier of the snapshot to pull. If not specified, a new
                                                snapshot will be created. You can list available snapshot in your
                                                organization with org:resources:list
  -w, --wait=seconds                            [default: 60] The maximum number of seconds to wait before the commands
                                                exits with a timeout error. A value of zero means that the command will
                                                wait indefinitely.

DESCRIPTION
  Preview resource updates

See code: src/commands/org/resources/preview.ts

coveo org:resources:pull

Pull resources from an organization

USAGE
  $ coveo org:resources:pull [-w <value>] [-o <value>] [-g] [-f] [-m <value> | [-s <value> | -r
    EXTENSION|FEATURED_RESULT|FIELD|FILTER|MAPPING|QUERY_PARAMETER|QUERY_PIPELINE|QUERY_PIPELINE_CONDITION|RANKING_EXPRE
    SSION|RANKING_WEIGHT|SEARCH_PAGE|SECURITY_PROVIDER|SOURCE|STOP_WORD|SUBSCRIPTION|THESAURUS|TRIGGER] |  | ]

FLAGS
  -f, --overwrite                               Overwrite resources directory if it exists.
  -g, --[no-]git                                Whether to create a git repository when creating a new project.
  -m, --model=path/to/snapshot.json             The path to a snapshot pull model. This flag is useful when you want to
                                                include only specific resource items in your snapshot (e.g., a subset of
                                                sources). Use the "org:resources:model:create" command to create a new
                                                Snapshot Pull Model
  -o, --organization=targetorganizationg7dg3gd  The unique identifier of the organization from which to pull the
                                                resources If not specified, the organization you are connected to will
                                                be used.
  -r, --resourceTypes=type1 type2...            [default:
                                                EXTENSION,FEATURED_RESULT,FIELD,FILTER,MAPPING,QUERY_PARAMETER,QUERY_PIP
                                                ELINE,QUERY_PIPELINE_CONDITION,RANKING_EXPRESSION,RANKING_WEIGHT,SEARCH_
                                                PAGE,SECURITY_PROVIDER,SOURCE,STOP_WORD,SUBSCRIPTION,THESAURUS,TRIGGER]
                                                The resources types to pull from the organization.
  -s, --snapshotId=<value>                      The unique identifier of the snapshot to pull. If not specified, a new
                                                snapshot will be created. You can list available snapshot in your
                                                organization with org:resources:list
  -w, --wait=seconds                            [default: 60] The maximum number of seconds to wait before the commands
                                                exits with a timeout error. A value of zero means that the command will
                                                wait indefinitely.

DESCRIPTION
  Pull resources from an organization

See code: src/commands/org/resources/pull.ts

coveo org:resources:push

Preview, validate and deploy your changes to the destination org

USAGE
  $ coveo org:resources:push [-w <value>] [-p none|light|detailed] [-o <value>] [--deleteMissingResources]

FLAGS
  -o, --organization=targetorganizationg7dg3gd  The unique identifier of the organization where to send the changes If
                                                not specified, the organization you are connected to will be used.
  -p, --previewLevel=(none|light|detailed)      [default: detailed] The verbosity of the preview. The `light` preview is
                                                faster to generate but only contains a limited amount of information, as
                                                opposed to the `detailed` preview that takes more time to generate, but
                                                returns a diff representation of all the changes to apply.
  -w, --wait=seconds                            [default: 60] The maximum number of seconds to wait before the commands
                                                exits with a timeout error. A value of zero means that the command will
                                                wait indefinitely.
  --deleteMissingResources                      Delete missing resources when enabled

DESCRIPTION
  Preview, validate and deploy your changes to the destination org

See code: src/commands/org/resources/push.ts

coveo org:search:dump

Dump the content of one or more sources in CSV format.

USAGE
  $ coveo org:search:dump -s <value> [-p <value>] [-x <value>] [-d <value>] [-n <value>] [-f <value>] [-c <value>]

FLAGS
  -c, --chunkSize=<value>           [default: 10000] The maximum number of results to dump into each CSV file.
  -d, --destination=<value>         [default: .] The folder in which to create the CSV files. The data dump will fail if
                                    the folder doesn't exist.
  -f, --additionalFilter=<value>    The additional search filter to apply while getting the content. See
                                    <https://docs.coveo.com/en/1552>.
  -n, --name=<value>                [default: indexdump] The base name to use when creating a new CSV file. If more than
                                    one file is created, the CLI will append `_2`, `_3`, etc. to each new file name
                                    after the first one.
  -p, --pipeline=<value>            The name of the query pipeline through which to get content. If not specified, the
                                    default query pipeline is used.
  -s, --source=mySourceName...      (required) The names (not the identifiers) of the sources from which to get content.
  -x, --fieldsToExclude=<value>...  The fields to exclude from the data dump. If not specified, all fields are included.

DESCRIPTION
  Dump the content of one or more sources in CSV format.

  Note: DictionnaryFields/Values are experimentally supported. In case of failure, you should exclude them using the
  `-x` flag.

See code: src/commands/org/search/dump.ts

coveo source:catalog:add SOURCEID

Index a JSON document into a Coveo Catalog source. See https://docs.coveo.com/en/2956 for more information.

USAGE
  $ coveo source:catalog:add [SOURCEID] [-f <value>] [-c <value> | ] [-m] [-n] [--fullUpload] [--skipFullUploadCheck]

ARGUMENTS
  SOURCEID  The identifier of the Catalog source on which to perform the add operation. See `source:list` to obtain the
            identifier.

FLAGS
  -c, --maxConcurrent=<value>
      [default: 10] The maximum number of requests to send concurrently. Increasing this value increases the speed at
      which documents are indexed to the Coveo platform. However, if you run into memory or throttling issues, consider
      reducing this value.

  -f, --files=myfile.json...
      Combinaison of JSON files and folders (containing JSON files) to push. Can be repeated.

  -m, --[no-]createMissingFields
      Analyse documents to detect and automatically create missing fields in the destination organization. When enabled,
      an error will be thrown if a field is used to store data of inconsistent type across documents.

  -n, --[no-]normalizeInvalidFields
      Whether to normalize invalid fields detected from the documents. If set to `false`, an error will be thrown when
      invalid fields are detected.

  --fullUpload
      Controls the way your items are added to your catalog source.

      Setting this option to false will trigger a document update (Default operation). Useful to perform incremental
      updates for smaller adjustments to your catalog that do not require pushing the entire catalog. A document update
      must only be performed after a full catalog upload.
      See https://docs.coveo.com/en/l62e0540

      Setting this option to true will trigger a full catalog upload. This process acts as a full rebuild of your catalog
      source. Therefore, previous items that are not included in the new payload will be deleted.
      See https://docs.coveo.com/en/lb4a0344

  --skipFullUploadCheck
      Do not check whether a full catalog upload was triggered on the target source.

DESCRIPTION
  Index a JSON document into a Coveo Catalog source. See https://docs.coveo.com/en/2956 for more information.

See code: src/commands/source/catalog/add.ts

coveo source:catalog:new NAME

Create a new catalog source in a Coveo organization

USAGE
  $ coveo source:catalog:new [NAME] [-v PRIVATE|SECURED|SHARED]

ARGUMENTS
  NAME  The name of the source to create.

FLAGS
  -v, --sourceVisibility=(PRIVATE|SECURED|SHARED)  [default: SECURED] Controls the content security option that should
                                                   be applied to the items in a source. See
                                                   https://docs.coveo.com/en/1779/index-content/content-security

DESCRIPTION
  Create a new catalog source in a Coveo organization

See code: src/commands/source/catalog/new.ts

coveo source:list

List all available push sources in your Coveo organization

USAGE
  $ coveo source:list [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml |  |
    [--csv | --no-truncate]] [--no-header | ]

FLAGS
  -x, --extended     show extra columns
  --columns=<value>  only show provided columns (comma-separated)
  --csv              output is csv format [alias: --output=csv]
  --filter=<value>   filter property by partial string matching, ex: name=foo
  --no-header        hide table header from output
  --no-truncate      do not truncate output to fit screen
  --output=<option>  output in a more machine friendly format
                     <options: csv|json|yaml>
  --sort=<value>     property to sort by (prepend '-' for descending)

DESCRIPTION
  List all available push sources in your Coveo organization

See code: src/commands/source/list.ts

coveo source:push:add SOURCEID

Index a JSON document into a Coveo Push source. See https://github.com/coveo/cli/wiki/Pushing-JSON-files-with-Coveo-CLI for more information.

USAGE
  $ coveo source:push:add [SOURCEID] [-f <value>] [-c <value> | ] [-m] [-n]

ARGUMENTS
  SOURCEID  The identifier of the source on which to perform the add operation. See source:list to obtain the
            identifier.

FLAGS
  -c, --maxConcurrent=<value>        [default: 10] The maximum number of requests to send concurrently. Increasing this
                                     value increases the speed at which documents are indexed to the Coveo platform.
                                     However, if you run into memory or throttling issues, consider reducing this value.
  -f, --files=myfile.json...         Combinaison of JSON files and folders (containing JSON files) to push. Can be
                                     repeated.
  -m, --[no-]createMissingFields     Analyse documents to detect and automatically create missing fields in the
                                     destination organization. When enabled, an error will be thrown if a field is used
                                     to store data of inconsistent type across documents.
  -n, --[no-]normalizeInvalidFields  Whether to normalize invalid fields detected from the documents. If set to `false`,
                                     an error will be thrown when invalid fields are detected.

DESCRIPTION
  Index a JSON document into a Coveo Push source. See
  https://github.com/coveo/cli/wiki/Pushing-JSON-files-with-Coveo-CLI for more information.

See code: src/commands/source/push/add.ts

coveo source:push:delete SOURCEID

Delete one or multiple items in a given Push source. See https://docs.coveo.com/en/171 and https://docs.coveo.com/en/131

USAGE
  $ coveo source:push:delete [SOURCEID] [-d <value> | -x <value>] [-c]

ARGUMENTS
  SOURCEID  The identifier of the Push source on which to perform the delete operation. To retrieve the list of
            available Push source identifiers, use the `source:push:list` command.

FLAGS
  -c, --[no-]deleteChildren
      Whether to delete all items that share the same base URI as the specified item to delete.

  -d, --deleteOlderThan=2000-01-01T00:00:00-06:00 OR 1506700606240
      If this flag is set, all items that have been added or updated in the source before the specified ISO 8601 date or
      Unix timestamp in milliseconds will be deleted. The documents will be deleted using the default queueDelay, meaning
      they will stay in the index for about 15 minutes after being marked for deletion.

  -x, --delete=<value>...
      The URIs of the items to delete. Can be repeated. If you want to delete more than one specific items, use the
      `source:push:batch` command instead.

DESCRIPTION
  Delete one or multiple items in a given Push source. See <https://docs.coveo.com/en/171> and
  <https://docs.coveo.com/en/131>

See code: src/commands/source/push/delete.ts

coveo source:push:list

[Deprecated] List all available push sources in your Coveo organization

USAGE
  $ coveo source:push:list [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml |  |
    [--csv | --no-truncate]] [--no-header | ]

FLAGS
  -x, --extended     show extra columns
  --columns=<value>  only show provided columns (comma-separated)
  --csv              output is csv format [alias: --output=csv]
  --filter=<value>   filter property by partial string matching, ex: name=foo
  --no-header        hide table header from output
  --no-truncate      do not truncate output to fit screen
  --output=<option>  output in a more machine friendly format
                     <options: csv|json|yaml>
  --sort=<value>     property to sort by (prepend '-' for descending)

DESCRIPTION
  [Deprecated] List all available push sources in your Coveo organization

See code: src/commands/source/push/list.ts

coveo source:push:new NAME

Create a new push source in a Coveo organization

USAGE
  $ coveo source:push:new [NAME] [-v PRIVATE|SECURED|SHARED]

ARGUMENTS
  NAME  The name of the source to create.

FLAGS
  -v, --sourceVisibility=(PRIVATE|SECURED|SHARED)  [default: SECURED] Controls the content security option that should
                                                   be applied to the items in a source. See
                                                   https://docs.coveo.com/en/1779/index-content/content-security

DESCRIPTION
  Create a new push source in a Coveo organization

See code: src/commands/source/push/new.ts

coveo ui:create:angular NAME

Create a Coveo Headless-powered search page with the Angular web framework. See https://docs.coveo.com/headless and https://angular.io/.

USAGE
  $ coveo ui:create:angular [NAME] [-v <value>] [-d]

ARGUMENTS
  NAME  The name of the application to create.

FLAGS
  -d, --defaults         Whether to automatically select the default value for all prompts that have a default value.
  -v, --version=<value>  [default: 1.34.0] The version of @coveo/angular to use.

DESCRIPTION
  Create a Coveo Headless-powered search page with the Angular web framework. See <https://docs.coveo.com/headless> and
  <https://angular.io/>.

See code: src/commands/ui/create/angular.ts

coveo ui:create:atomic NAME

Create a Coveo Headless-powered search page with Coveo’s own Atomic framework. See https://docs.coveo.com/atomic and https://docs.coveo.com/headless.

USAGE
  $ coveo ui:create:atomic [NAME] [-v <value>] [-p <value>]

ARGUMENTS
  NAME  The name of the application to create.

FLAGS
  -p, --pageId=7944ff4a-9943-4999-a3f6-3e81a7f6fb0a  The hosted search page ID.
  -v, --version=<value>                              [default: 1.34.0] The version of @coveo/create-atomic to use.

DESCRIPTION
  Create a Coveo Headless-powered search page with Coveo's own Atomic framework. See <https://docs.coveo.com/atomic> and
  <https://docs.coveo.com/headless>.

EXAMPLES
  $ coveo ui:create:atomic myapp

See code: src/commands/ui/create/atomic.ts

coveo ui:create:react NAME

Create a Coveo Headless-powered search page with the React web framework. See https://docs.coveo.com/headless and https://reactjs.org/.

USAGE
  $ coveo ui:create:react [NAME] [-v <value>]

ARGUMENTS
  NAME  The name of the application to create.

FLAGS
  -v, --version=<value>  [default: 1.34.0] Version of @coveo/cra-template to use.

DESCRIPTION
  Create a Coveo Headless-powered search page with the React web framework. See <https://docs.coveo.com/headless> and
  <https://reactjs.org/>.

EXAMPLES
  $ coveo ui:create:react myapp

  $ coveo ui:create:react --help

See code: src/commands/ui/create/react.ts

coveo ui:create:vue NAME

Create a Coveo Headless-powered search page with the Vue.js web framework. See https://docs.coveo.com/headless and https://vuejs.org/.

USAGE
  $ coveo ui:create:vue [NAME] [-v <value>] [-p <value>]

ARGUMENTS
  NAME  The name of the application to create.

FLAGS
  -p, --preset=path      The path to a JSON file with pre-defined options and plugins for creating a new project.
                         If not specified, the default TypeScript preset is used.
                         For more information about Vue CLI presets, see
                         https://cli.vuejs.org/guide/plugins-and-presets.html#presets.
  -v, --version=<value>  [default: 1.34.0] The version of @coveo/vue-cli-plugin-typescript to use.

DESCRIPTION
  Create a Coveo Headless-powered search page with the Vue.js web framework. See <https://docs.coveo.com/headless> and
  <https://vuejs.org/>.

EXAMPLES
  $ coveo ui:create:vue --preset path/to/my/preset.json

  $ coveo ui:create:vue --help

See code: src/commands/ui/create/vue.ts

coveo update [CHANNEL]

update the coveo CLI

USAGE
  $ coveo update [CHANNEL] [-a] [-v <value> | -i] [--force]

FLAGS
  -a, --available        Install a specific version.
  -i, --interactive      Interactively select version to install. This is ignored if a channel is provided.
  -v, --version=<value>  Install a specific version.
  --force                Force a re-download of the requested version.

DESCRIPTION
  update the coveo CLI

EXAMPLES
  Update to the stable channel:

    $ coveo update stable

  Update to a specific version:

    $ coveo update --version 1.0.0

  Interactively select version:

    $ coveo update --interactive

  See available versions:

    $ coveo update --available

See code: @oclif/plugin-update

coveo version

USAGE
  $ coveo version [--json] [--verbose]

FLAGS
  --verbose  Show additional information about the CLI.

GLOBAL FLAGS
  --json  Format output as json.

FLAG DESCRIPTIONS
  --verbose  Show additional information about the CLI.

    Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.

See code: @oclif/plugin-version

What's next for me?