Algolia CLI / Commands

Manage your Algolia indices.

algolia indices clear

Usage
algolia indices clear <index> [flags]

Clear the specified index.

Examples

1
2
3
# Clear the index named "TEST_PRODUCTS_1"
$ algolia index clear TEST_PRODUCTS_1

Flags

-y, --confirm

skip confirmation prompt.

algolia indices copy

Usage
algolia indices copy <source-index> <destination-index> [flags]

Make a copy of an index.

Examples

1
2
3
4
5
6
7
8
9
# Copy the records, settings, synonyms and rules from the "TEST_PRODUCTS_1" index to the "TEST_PRODUCTS_2" index
$ algolia indices copy TEST_PRODUCTS DEV_PRODUCTS

# Copy only the synonyms of the "TEST_PRODUCTS_1" to the "TEST_PRODUCTS_2" index
$ algolia indices copy TEST_PRODUCTS DEV_PRODUCTS --scope synonyms

# Copy the synonyms and rules of the index "TEST_PRODUCTS_1" to the "TEST_PRODUCTS_2" index
$ algolia indices copy TEST_PRODUCTS DEV_PRODUCTS --scope synonyms,rules

Flags

-y, --confirm

skip confirmation prompt.

-s, --scope

scope to copy (default: all).

-w, --wait

wait for the operation to complete.

algolia indices delete

Usage
algolia indices delete <index> [flags]

Delete one or multiple indices.

Examples

1
2
3
4
5
6
7
8
9
# Delete the index named "TEST_PRODUCTS_1"
$ algolia indices delete TEST_PRODUCTS_1

# Delete the index named "TEST_PRODUCTS_1", skipping the confirmation prompt
$ algolia indices delete TEST_PRODUCTS_1 -y

# Delete multiple indices
$ algolia indices delete TEST_PRODUCTS_1 TEST_PRODUCTS_2 TEST_PRODUCTS_3

Flags

-y, --confirm

skip confirmation prompt.

algolia indices list

Usage
algolia indices list [flags]

List indices.

Examples

1
2
3
# List indices
$ algolia indices list

Output formatting flags

--allow-missing-template-keys

If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.

-o, --output

Output format. One of: (json, jsonpath, jsonpath-as-json, jsonpath-file).

--template

Template string or path to template file to use when –output=jsonpath, –output=jsonpath-file.

algolia indices move

Usage
algolia indices move <source-index> <destination-index> [flags]

Move an index.

Examples

1
2
3
# Move the "TEST_PRODUCTS" index to "DEV_PRODUCTS"
$ algolia indices move TEST_PRODUCTS DEV_PRODUCTS

Flags

-y, --confirm

skip confirmation prompt.

-w, --wait

wait for the operation to complete.

Did you find this page helpful?