# Shared indexes

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/en-us/help/go/llms.txt).

> **TL;DR**
> Required plugin: [Shared Project Indexes](https://plugins.jetbrains.com/plugin/14437-shared-indexes/)

Shared indexes let you reduce the time it takes for GoLand to [analyze
your project](project-analysis.html). Unlike regular indexes that are built locally each time the project is analyzed, shared indexes are generated once and are later reused on other computers whenever needed.

> **Tip:**
> Using shared indexes is one of several ways to [reduce the project analysis time](project-analysis.html#reducing_time).

GoLand can build and use shared indexes for your project's code. Whenever the IDE needs to reanalyze your project, it will use the available shared indexes and build local indexes for the rest of the project. Usually, this is faster than analyzing the entire project locally from scratch.

Procedure: Install the plugin

To be able to use shared project indexes, the [Shared Indexes](https://plugins.jetbrains.com/plugin/14437-shared-indexes/) plugin must be installed:

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Plugins`.

2. Find the `Shared Indexes` plugin and click Install.

3. Apply the changes and close the dialog. Restart the IDE if prompted.

## Shared project indexes

Shared project indexes are built for project sources and their dependencies. By generating indexes on a single computer and distributing them to other computers, you can avoid repeating the project analysis process on each machine. This way, each computer can benefit from the precomputed indexes without having to perform the expensive project analysis operations individually. This is the main advantage of shared indexes over regular indexes.

> **Tip:**
> Using shared indexes is reasonable for large projects, where project analysis might take a lot of time, creating inconveniences for the teams involved. For smaller projects, we recommend [other ways of reducing the project
> analysis time](project-analysis.html#reducing_time).

### Before you begin

The computer that builds shared project indexes and any computers that use these shared indexes:

* Should use the same IDE version to ensure index compatibility.

* Can have different operating systems.

Before incorporating shared project indexes into your infrastructure, you can [evaluate
how much time they can save](#evaluate_saved_time_boost) on project analysis by running the command-line tool.

If you are satisfied with the results, you can keep using shared indexes. In more complex scenarios, you can customize sample scripts from the [IntelliJ Shared Indexes Tool Example](https://github.com/JetBrains/intellij-shared-indexes-tool-example) repository. For example, you can use a JSON configuration file to disable xz compression or use gzip compression when generating shared indexes.

Procedure: Evaluate project analysis time with shared indexes

Before using shared project indexes in your workflow, you can check how much time they can save you. During the evaluation, the tool will generate some files in the directory that you have specified.

1. Download the latest version of the [command-line tool](https://packages.jetbrains.team/maven/p/ij/intellij-shared-indexes/com/jetbrains/intellij/indexing/shared/ij-shared-indexes-tool-cli/) and unzip the archive.

2. In the command line, navigate to the directory of the command-line tool and execute the binary file by running:

Windows:

```CONSOLE
.\bin\ij-shared-indexes-tool-cli.bat boost
```

macOS:

```CONSOLE
./bin/ij-shared-indexes-tool-cli boost
```

Linux:

```CONSOLE
./bin/ij-shared-indexes-tool-cli boost
```

with the following options:

* `--ij`: (mandatory) path to a locally installed IDE. > **Note:** > The path to the locally installed IDE may differ depending on how it was installed.

* `--project`: (mandatory) path to the project for which you want to build shared indexes.

* `--port`: port for running a local server. The default port is 25561.

* `--data-directory`: directory for storing generated indexes and server data. The default directory is `./ij-shared-indexes-tool-data`.

For example:

```GENERIC
./bin/ij-shared-indexes-tool-cli boost --ij "/Users/jetbrains/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-1/232.7754.76/PyCharm 2023.2 EAP.app" --project "/Users/jetbrains/PycharmProjects/mySampleProject"
```

For example:

```GENERIC
./bin/ij-shared-indexes-tool-cli boost --ij "/Users/jetbrains/Applications/GoLand.app" --project "/Users/jetbrains/gitProjects/serverdemo"
```

3. Wait for some time. After that, the project analysis time with shared indexes and without them will appear.

![Estimated project analysis time](https://resources.jetbrains.com.cn/help/img/idea/2026.3/go_new_shared_indexes_cmd.png)

By comparing the difference in time, you can decide whether you want to use shared project indexes in your workflow or not.

Procedure: Generate project indexes

Use these steps to generate index files. After the indexes have been generated, you will need to [upload the files to a file server or S3-compatible storage](#upload-files).

1. Download the latest version of the [command-line tool](https://packages.jetbrains.team/maven/p/ij/intellij-shared-indexes/com/jetbrains/intellij/indexing/shared/ij-shared-indexes-tool-cli/) and unzip the archive.

2. In the command line, navigate to the directory of the command-line tool and execute the binary file via the command line by running:

Windows:

```GENERIC
.\bin\ij-shared-indexes-tool-cli.bat indexes
```

macOS:

```GENERIC
./bin/ij-shared-indexes-tool-cli indexes
```

Linux:

```GENERIC
./bin/ij-shared-indexes-tool-cli indexes
```

with the following options:

* `--ij`: (mandatory) [path to a locally installed IDE.](#ide_installation_note)

* `--project`: (mandatory) path to the project for which you want to build shared indexes.

* `--base-url`: (mandatory) Indexes server URL. The base URL that will be used to define the full URL where shared indexes are hosted.

* `--data-directory`: directory for storing generated indexes and server data. The default directory is `./ij-shared-indexes-tool-data`. You should upload files from this directory to the server specified in the `base-url` parameter.

3. Once the project indexes have been generated, a message with the information required to [configure shared indexes in your project](#configure-index-update) will appear.

After you have generated indexes, two folders appear in the [directory you
have specified](#data-dir-no-server) when executing the `indexes` command: `server` and `temp`. The index files are stored within the `server` directory.

### Upload files to the storage

After you have [generated indexes](#generate-project-indexes), two folders appear in the [directory you
have specified](#data-dir-no-server) when executing the `indexes` command: `server` and `temp`. The index files are stored within the `server` directory.

Procedure: Uploading shared indexes to a remote storage

* Upload the `data` and the `project` folders from the `server` directory to your file server or S3-compatible storage. The storage location should have the same base URL as the URL that was defined using the [base-url](#base-url-parameter) parameter when generating the indexes.

Procedure: Publishing shared indexes when testing locally

When testing shared indexes, you can use the `server` command to start a server on the generated files.

* In the command line, navigate to the directory of the command-line tool and execute the binary file by running:

Windows:

```CONSOLE
.\bin\ij-shared-indexes-tool-cli.bat server
```

macOS:

```GENERIC
./bin/ij-shared-indexes-tool-cli server
```

Linux:

```GENERIC
./bin/ij-shared-indexes-tool-cli server
```

with the following options:

* `--port`: port for running a local server.

* `--server-directory`: directory for server data. The default directory is `./ij-shared-indexes-tool-data/server`.

For example:

Windows:

```CONSOLE
.\bin\ij-shared-indexes-tool-cli.bat server --port 8080 --server-directory "C:\Users\jetbrains\ij-shared-indexes-tool-data\server"
```

macOS:

```
./bin/ij-shared-indexes-tool-cli server --port 8080 --server-directory "/Users/jetbrains/ij-shared-indexes-tool-data/server"
```

Linux:

```CONSOLE
./bin/ij-shared-indexes-tool-cli server --port 8080 --server-directory "/home/jetbrains/ij-shared-indexes-tool-data/server" 
```

### Configure access to shared indexes

Once the project indexes are [uploaded to the file storage](#upload-files), they can be downloaded and applied on another computer.

Procedure:

* In the project directory, create a new file `intellij.yaml` and copy the information from the terminal to the new file, for example:

![YAML file with shared indexes](https://resources.jetbrains.com.cn/help/img/idea/2026.3/go_shared_indexes_yaml.png)

If the project has not been analyzed yet or you have [cleared the system cache](invalidate-caches.html#clear-system-cache), the IDE will download the shared indexes and use them.

In the default configuration, the IDE will download the shared indexes automatically. You may choose to change this and [confirm every download](#download_with_confirmation) manually.

Project indexes will be downloaded to `index/shared_indexes` in the IDE [system directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#system-directory).

> **Tip:**
> Place the `<project home>/intellij.yaml` file under VCS so that other developers in your team can get access to the project shared indexes.

When the indexes are being downloaded, the progress is displayed in the status bar.

When everything is ready, a corresponding notification will appear in the Notifications  tool window.

![Shared indexes are downloaded](https://resources.jetbrains.com.cn/help/img/idea/2026.3/go_shared_indexes_are_downloaded.png)

Procedure: Change the way indexes are downloaded

In the default configuration, the IDE will be downloading shared indexes automatically. You can confirm every download manually.

1. From the `intellij.yaml` file, remove the `consents` section and restart your project.

2. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), select `Tools | Shared Indexes` and in the Project Shared Indexes area, select Ask before download.

![Configuring options for downloading shared indexes](https://resources.jetbrains.com.cn/help/img/idea/2026.3/shared-indexes-project.png)

3. Apply the changes and close the dialog.

## Invalidate downloaded shared indexes

After invalidation, GoLand will download and use new shared indexes if they are available. Otherwise, new indexes will be built locally during [project
analysis](project-analysis.html).

Procedure:

1. From the main menu, select `File | Invalidate Caches…`.

2. Select Invalidate downloaded shared indexes and click Invalidate and Restart.

## Shared indexes CLI command reference

boost
: Measures the project analysis speed up with project shared indexes. Options:
:
:
:
: * `--project`: (mandatory) Path to a project.
:
: * `--ij`: (mandatory) [Path to a locally installed IDE.](#ide_installation_note)
:
: * `--port`: Port for running a local server. The default port is 25561.
:
: * `--data-directory`: Directory to use for generation and server data.

indexes
: Generates project shared indexes and makes them ready to be uploaded. Options:
:
:
:
: * `--project`: (mandatory) Path to a project.
:
: * `--ij`: (mandatory) [Path to a locally installed IDE.](#ide_installation_note)
:
: * `--base-url`: (mandatory) Indexes server URL.
:
: * `--data-directory`: Directory to use for generation and server data.

server
: Starts a server on local indexes. Options:
:
:
:
: * `--port`: port for running a local server. The default port is 25561.
:
: * `--server-directory`: directory for server data. The default directory is `./ij-shared-indexes-tool-data/server`.

version
: Displays shared indexes version information. Options:
:
:
:
: * `--ij`: (mandatory) [path to a locally installed IDE.](#ide_installation_note).

You can keep using shared indexes from the command line. In more complex scenarios, you can customize sample scripts from the [IntelliJ Shared Indexes Tool Example](https://github.com/JetBrains/intellij-shared-indexes-tool-example) repository.

## See also

### Procedures

[IntelliJ Shared Indexes Tool Example](https://github.com/JetBrains/intellij-shared-indexes-tool-example) [Project analysis](project-analysis.html)

