Credentials in automation
For environment variables, profiles, command-line flags, precedence, and Crawler keys, see Authenticate CLI commands. Automation-focused choices:-
CI and other servers:
Use
ALGOLIA_APPLICATION_IDandALGOLIA_API_KEYfrom your platform’s secret store so keys don’t end up in version control or config files. - **Local machines, including frequent CLI use by agents: Use profiles to avoid entering credentials for every command and to keep them out of shell history.
-
One-off commands or temporary overrides:
--application-idand--api-keycan target a different Algolia application or API key for one command. On native Windows, these flags aren’t supported. Use environment variables or profiles instead. See Command-line options.
Non-interactive runs
In non-interactive environments, such as CI/CD, pipes, and agent workflows, the CLI doesn’t prompt for confirmation. Commands that delete or replace existing data require confirmation. To run these commands in a non-interactive environment, pass--confirm.
Otherwise, the command exits with an error.
Structured output and command metadata
-
JSON output. To keep standard output machine-readable,
use
-o json,-o jsonl, or-o ndjsonwhere supported. -
Command schema.
To help agents understand a command without parsing
--help, runalgolia describe <command>. This prints JSON metadata for the command, including flags and response fields.
Exit codes
The Algolia CLI uses the following conventions for exit code. Use them in scripts and CI to handle command outcomes programmatically.| Code | Meaning |
|---|---|
0 | Success |
1 | Error |
2 | User cancelled |
4 | Auth error |
Pipe data into the CLI
To import data from another command or script, use-F - to read from standard input.
Supported commands accept NDJSON or line-delimited JSON,
depending on the command.
Command line
Observability
Telemetry
By default the CLI sends usage analytics. Opt out withALGOLIA_CLI_TELEMETRY=0.
For details, see Telemetry.
Debug logging
SetDEBUG=1 (or any non-empty value) to print additional error details to stderr for telemetry and update notifier issues.
For more information, see Telemetry.
Dry runs
To validate changes without applying them, use--dry-run.
To get a structured preview, combine it with -o json.
Supported for these commands:
| Command area | Examples |
|---|---|
| Application | algolia application create |
| Crawler | algolia crawler create, pause, reindex, run, test, unblock |
| Dictionary | algolia dictionary entries import |
| Indices | algolia indices delete |
| Objects | algolia objects update, operations, delete |
| Rules | algolia rules import |
| Synonyms | algolia synonyms import |
Command line
"dryRun": true and preview fields.
The exact output depends on the command.
Use llms.txt for agent navigation
Algolia provides llms.txt files that help agents discover resources.
- Use
algolia.com/llms.txtfor a high-level map of Algolia, including product areas and key links. - Use
algolia.com/doc/llms.txtfor documentation-focused navigation, such as API references and developer guides.
Environment variables (quick reference)
| Variable | Effect |
|---|---|
ALGOLIA_CLI_TELEMETRY=0 | Opt out of telemetry |
ALGOLIA_NO_UPDATE_NOTIFIER | Skip update checks when set to any value |
DEBUG=1 | Enable debug output on stderr when set to any non-empty value |