> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# algolia indices config import

> Import an index configuration (settings, synonyms, rules) from a file.

```txt Usage theme={"system"}
algolia indices config import <index> -F <file> --scope <scope>... [flags]
```

## Examples

Import the config from a .json file into 'PROD\_MOVIES' index:

```sh icon=square-terminal theme={"system"}
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json
```

Import only the synonyms and settings from a .json file to the 'PROD\_MOVIES' index:

```sh icon=square-terminal theme={"system"}
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json --scope synonyms, settings
```

Import only the synonyms from a .json file to the 'PROD\_MOVIES' index and clear all existing ones:

```sh icon=square-terminal theme={"system"}
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json --scope synonyms --clear-existing-synonyms
```

Import only the rules from a .json file to the 'PROD\_MOVIES' index and clear all existing ones:

```sh icon=square-terminal theme={"system"}
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json --scope rules --clear-existing-rules
```

## Flags

<ParamField body="-r, --clear-existing-rules">
  Clear ALL existing rules of the index before import
</ParamField>

<ParamField body="-o, --clear-existing-synonyms">
  Clear ALL existing synonyms of the index before import
</ParamField>

<ParamField body="-y, --confirm">
  Skip confirmation prompt
</ParamField>

<ParamField body="-F, --file">
  Directory path of the JSON config file
</ParamField>

<ParamField body="-l, --forward-rules-to-replicas">
  Forward imported rules to replicas
</ParamField>

<ParamField body="-t, --forward-settings-to-replicas">
  Forward imported settings to replicas
</ParamField>

<ParamField body="-m, --forward-synonyms-to-replicas">
  Forward imported synonyms to replicas
</ParamField>

<ParamField body="-s, --scope">
  Scope to import (default: none)
</ParamField>
