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:
Sign in once with
algolia auth login, then select an application withalgolia application select. The CLI stores credentials in your operating system’s keychain, so you don’t re-enter them for every command or leave them in 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 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.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 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.