Tools / CLI / Get started

Get started with the Algolia CLI

Hero

The Algolia CLI (command-line interface) lets you work with Algolia’s APIs from the comfort of your terminal. It’s great for interactive commands, scripts, and continuous integration workflows.

Before you begin

To interact with your Algolia resources, you’ll need a (free) Algolia account.

Install the Algolia CLI

You can install the CLI with your favorite package manager, or download binaries from the Releases page in the GitHub repository.

The CLI runs on macOS, Linux, and Windows, on both AMD64 and ARM64 platforms.

macOS

The Algolia CLI is available on Homebrew. To install it, run:

1
brew install algolia/algolia-cli/algolia

Or go to the Releases page and download the latest archive for your Mac: algolia_*_macOS_*.tar.gz. Unpack it by running tar xf algolia_*_macOS_*.tar.gz.

Linux

The Algolia CLI is available as DEB and RPM package. Go to the Releases page and download the appropriate *.deb and *.rpm file for your platform. To install it, run:

1
sudo dpkg -i /path/to/algolia_*.deb

Or go to the Releases page and download the latest archive for Linux: algolia_*_linux_*.tar.gz. Unpack it by running tar xf algolia_*_linux_*.tar.gz.

Windows

The Algolia CLI is available for the Chocolatey package manager. To install it, run:

1
choco install algolia

Or go to the Releases page and download the latest archive: algolia_*_windows_*.zip and unpack it. If you’re using the Windows Subsystem for Linux (WSL), follow the instructions for Linux.

Run your first command

Explore the CLI by typing algolia. This lists the available commands. Add --help to any command to get more information about the command and its available options.

For example, to list all indices in your Algolia application, run:

1
2
3
algolia indices list \
        --application-id ALGOLIA_APPLICATION_ID \
        --api-key ALGOLIA_API_KEY

Since this command makes a request to the Algolia Search API, you need to provide your Algolia credentials. You can find your application ID and API key in the Algolia dashboard.

To avoid entering your credentials every time, you can add profiles for each of your Algolia applications. For more information, see Authentication.

Next steps

To make exploring the CLI easier, set up command completion. If you want to run many interactive commands, consider creating a profile.

Did you find this page helpful?