Install the Algolia CLI
Install the CLI with a package manager, or download a binary from the Releases page of the GitHub repository. The CLI runs on macOS, Linux, and Windows, on both AMD64 and ARM64 platforms.- npm
- macOS
- Linux
- Windows
If you have Node.js installed,
you can run the CLI with To install it globally with npm, run:
npx, which doesn’t require installation:Create a new account
To sign in to an existing account, see Sign in. To create a new account from the CLI, run:--app-name and --region.
To print the sign-up URL and not open a browser, add --no-browser.
For example, use this flag when an agent runs the CLI.
Sign in
To sign in to an existing account, run:--no-browser.
To check that you’re signed in, run algolia auth status.
For details and other ways to authenticate, such as in CI, see Sign in with OAuth.
Switch applications
The CLI runs commands against your current application. To see your current application, runalgolia application current.
To switch to a different one, run:
Index and search your first records
Save these records in a file namedmovies.ndjson.
Each line is one record:
movies.ndjson
MOVIES.
The --wait flag makes the command wait until indexing is complete:
Explore other commands
To list the available commands, runalgolia.
To get more information about a command and its flags, add --help to the command.
For example, to list all indices in your current application, run:
Next steps
- Set up command completion. Enable shell completion for Bash, Zsh, Fish, or PowerShell.
- Use the CLI in automation. Run the CLI in scripts, CI, and agent workflows with structured output, exit codes, and dry runs.
- Opt out of telemetry collection. See which data the CLI collects, and turn off telemetry and update checks.
- Usage examples for the Algolia CLI. Import, export, compare, and copy Algolia data.