---
title: CLI - Quick Reference
slug: klevu-magento-v4/indexing-cli
docTags: 
createdAt: 2024-09-23T16:14:01.303Z
---

Summary of Klevu Indexing CLI Commands

## Attribute Discovery

`klevu:indexing:attribute-discovery`

The discovery can also be triggered via CLI and has 2 optional parameters&#x20;

- `api-keys` - \[optional] comma-separated list of API keys to run discovery for
- `attribute-types` - \[optional] comma-separated list of  attribute types to run discovery for, options:
  - `KLEVU_PRODUCT`&#x20;
  - `KLEVU_CATEGORY`

```shell
bin/magento klevu:indexing:attribute-discovery \
    --attribute-types="KLEVU_PRODUCT" \
    --api-keys="klevu-example-js-api-key"
```

## Attribute Update&#x20;

`klevu:indexing:attribute-update`

The update can be triggered via CLI and has 1 required parameter and 2 optional parameters&#x20;

- `attribute-ids` - comma-separated list of attribute IDs to update
- `api-keys` - \[optional] comma-separated list of API keys to update
- `attribute-types` - \[optional] comma-separated list of  attribute types to update, options:
  - `KLEVU_PRODUCT`&#x20;
  - `KLEVU_CATEGORY`

```shell
bin/magento klevu:indexing:attribute-update \
    --attribute-ids="1,2,3" \
    --attribute-types="KLEVU_PRODUCT" \
    --api-keys="klevu-example-js-api-key" 
```

## Attribute Sync

`klevu:indexing:attribute-sync`

The sync can be triggered via CLI and has 2 optional parameters&#x20;

- `api-keys` - \[optional] comma-separated list of API keys to sync
- `attribute-types` - \[optional] comma-separated list of attribute types to sync, options:
  - `KLEVU_PRODUCT`&#x20;
  - `KLEVU_CATEGORY`

Increasing the verbosity of the command will give you more information using `-v`, `-vv`, or `-vvv`

```shell
bin/magento klevu:indexing:attribute-sync \
    --attribute-types="KLEVU_PRODUCT" \
    --api-keys="klevu-example-js-api-key" \
    -vvv
```

***

## Entity Discovery

`klevu:indexing:entity-discovery`

The discovery can be triggered via CLI and has 2 optional parameters

- `api-keys` - \[optional] comma-separated list of API keys to run discovery for
- `entity-types` - \[optional] comma-separated list of entity types to run discovery for,
  options:
  - `KLEVU_PRODUCT`
  - `KLEVU_CATEGORY`
  - `KLEVU_CMS`

```shell
bin/magento klevu:indexing:entity-discovery \
    --entity-types="KLEVU_PRODUCT" \
    --api-keys="klevu-example-js-api-key"
```

## Entity Update

`klevu:indexing:entity-update`

The update can be triggered via CLI and has 1 required parameter and 2 optional parameters

- `entity-ids` - a comma-separated list of entity IDs to update
- `api-keys` - \[optional] comma-separated list of API keys to update
- `entity-types` - \[optional] comma-separated list of entity types to update,
  options:
  - `KLEVU_PRODUCT`
  - `KLEVU_CATEGORY`

```shell
bin/magento klevu:indexing:entity-update \
    --entity-ids="1,2,3" \
    --entity-types="KLEVU_PRODUCT" \
    --api-keys="klevu-example-js-api-key"
```

## Entity Sync

`klevu:indexing:entity-sync`

The sync can be triggered via CLI and has 2 optional parameters

- `api-keys` - \[optional] comma-separated list of API keys to update
- `entity-types` - \[optional] comma-separated list of entity types to sync,
  &#x20;options:
  - `KLEVU_PRODUCT`
  - `KLEVU_CATEGORY`
  - `KLEVU_CMS`

Increasing the verbosity of the command will give you more information using `-v`, `-vv`, or `-vvv`

```shell
bin/magento klevu:indexing:entity-sync \
    --entity-types="KLEVU_PRODUCT" \
    --api-keys="klevu-example-js-api-key" \
    -vvv
```

