Skill

algolia-cli

Use this skill whenever a user wants to execute operations against Algolia indices or accounts — deleting records, copying/migrating indices, backing up data, importing/exporting records, managing API keys, editing synonyms, configuring rules, changing settings like facets, clearing indices, or automating Algolia in CI/CD pipelines. The key signal is that the user wants to *act on* their Algolia data or configuration (server-side / backend / admin operations), regardless of whether they mention "CLI" or "command line." If someone names a specific Algolia index and wants to change, move, query, or manage it, use this skill. Do NOT use for frontend search UI work (InstantSearch, React components, autocomplete widgets), Algolia dashboard GUI questions, or evaluating Algolia vs. other providers.

From algobot-cli
Install
1
Run in your terminal
$
npx claudepluginhub algolia/skills --plugin algolia-cli
Tool Access

This skill uses the workspace's default tool permissions.

Supporting Assets
View in Repository
evals/EVAL_RESULTS.md
evals/evals.json
evals/run_cli_evals.sh
references/commands.md
references/getting-started.md
Skill Content

Algolia CLI

Manage Algolia search infrastructure from the terminal using the algolia CLI.

When to Use This Skill vs. algolia-mcp

NeedUse
Write/modify data (import, delete, update records)algolia-cli (this skill)
Manage configuration (settings, rules, synonyms)algolia-cli (this skill)
Admin operations (API keys, profiles, index copy/move)algolia-cli (this skill)
Backup/restore indicesalgolia-cli (this skill)
Search queries and view resultsalgolia-mcp
Analytics (top searches, click rates, no-results)algolia-mcp
Recommendations (related products, trending)algolia-mcp

Rule of thumb: If the user wants to read or analyze data → algolia-mcp. If they want to change, move, or manage data → algolia-cli.

Setup

Run /algolia-cli:setup to install the CLI and configure a profile, or follow Getting Started.

Command Quick Reference

Profile

TaskCommand
Add profile (non-interactive)algolia profile add --name "default" --app-id "<ID>" --api-key "<KEY>" --default
List profilesalgolia profile list
Remove a profilealgolia profile remove "<name>" -y
Set default profilealgolia profile setdefault "<name>"

API Keys

TaskCommand
List API keysalgolia apikeys list
Create API keyalgolia apikeys create --acl search,browse --description "..." --indices "idx1,idx2"
Get API keyalgolia apikeys get <key>
Delete API keyalgolia apikeys delete <key> -y

Search

TaskCommand
Search an indexalgolia search <index> --query "<query>"
Search with filtersalgolia search <index> --query "<query>" --filters "<filter>"
Paginated searchalgolia search <index> --query "<query>" --hitsPerPage 10 --page 2

Indices

TaskCommand
List all indicesalgolia indices list
Delete an indexalgolia indices delete <index> -y
Clear records (keep settings)algolia indices clear <index> -y
Copy indexalgolia indices copy <src> <dst> -y
Copy only settingsalgolia indices copy <src> <dst> --scope settings -y
Move/rename indexalgolia indices move <src> <dst> -y

Objects (Records)

TaskCommand
Browse all recordsalgolia objects browse <index>
Browse specific attributesalgolia objects browse <index> --attributesToRetrieve title,price
Import records from filealgolia objects import <index> -F data.ndjson
Import from stdincat data.ndjson | algolia objects import <index> -F -
Delete by IDsalgolia objects delete <index> --object-ids id1,id2 -y
Delete by filteralgolia objects delete <index> --filters "type:obsolete" -y
Partial updatealgolia objects update <index> -F updates.ndjson

Settings

TaskCommand
Get settingsalgolia settings get <index>
Set a settingalgolia settings set <index> --typoTolerance="false"
Import settings from filealgolia settings import <index> -F settings.json
Import and forward to replicasalgolia settings import <index> -F settings.json -f

Rules

TaskCommand
Browse all rulesalgolia rules browse <index>
Import rulesalgolia rules import <index> -F rules.ndjson -y
Replace all rulesalgolia rules import <index> -F rules.ndjson -c -y
Delete rules by IDalgolia rules delete <index> --rule-ids id1,id2 -y

Synonyms

TaskCommand
Browse all synonymsalgolia synonyms browse <index>
Import synonymsalgolia synonyms import <index> -F synonyms.ndjson
Replace all synonymsalgolia synonyms import <index> -F synonyms.ndjson -r
Delete synonyms by IDalgolia synonyms delete <index> --synonym-ids id1,id2 -y
Save a single synonymalgolia synonyms save <index> --id my-syn --synonyms foo,bar

Synonym Type Guide

Choosing the right synonym type matters for search quality:

  • synonym (regular/two-way): All terms are interchangeable. Use when the words truly mean the same thing in both directions. Example: "sneakers" ↔ "trainers" — searching either should find the other.
  • oneWaySynonym: Only the input term expands to include the synonyms, not the reverse. Use when a short/abbreviated term should match longer/specific terms, but not vice versa. Example: "TV" → "television", "flat screen" — searching "TV" finds "television" results, but searching "television" does NOT return "TV" results.

Rule of thumb: If the user says "searching X should also match Y", that's one-way (input: X, synonyms: [Y]). If they say "X and Y should be equivalent/interchangeable", that's two-way.

Key Conventions

  1. Always use non-interactive mode. Destructive commands need -y (or --confirm) to skip confirmation prompts. This includes objects delete, indices delete/clear/copy/move, rules import/delete, synonyms delete, and apikeys delete. Without -y, the CLI will hang waiting for user input. Note: objects import, objects update, and synonyms import do not have a -y flag — they run non-interactively by default.
  2. ndjson format. objects browse, objects import, rules browse/import, and synonyms browse/import use newline-delimited JSON (one JSON object per line), not JSON arrays.
  3. Profile flag. Use -p <profile> to target a non-default profile. Omit it to use the default.
  4. Credential precedence. Environment variables override all other configuration. The resolution order is: env vars > CLI flags (--application-id, --api-key) > profile config file > default profile. Supported env vars: ALGOLIA_APPLICATION_ID, ALGOLIA_API_KEY, ALGOLIA_ADMIN_API_KEY, ALGOLIA_SEARCH_HOSTS, ALGOLIA_CRAWLER_USER_ID, ALGOLIA_CRAWLER_API_KEY. If env vars are set, --profile/-p is ignored for those credentials.
  5. Wait flag. Use -w (or --wait) when subsequent commands depend on the operation completing (e.g., import then search).
  6. Pipe between commands. Copy data across indices: algolia objects browse SRC | algolia objects import DST -F -
  7. JSON output. Use --output json (or -o json) when you need machine-readable output.

Common Workflows

Migrate records between indices (with field filtering)

algolia objects browse SOURCE --attributesToRetrieve objectID,title,price \
  | algolia objects import DEST -F - -w

Full index backup

algolia objects browse MY_INDEX > my_index_records.ndjson
algolia settings get MY_INDEX > my_index_settings.json
algolia rules browse MY_INDEX > my_index_rules.ndjson
algolia synonyms browse MY_INDEX > my_index_synonyms.ndjson

Note: settings use .json (standard JSON), everything else uses .ndjson (newline-delimited JSON).

Restore from backup

algolia objects import MY_INDEX -F my_index_records.ndjson -w
algolia settings import MY_INDEX -F my_index_settings.json -w
algolia rules import MY_INDEX -F my_index_rules.ndjson -c -y -w
algolia synonyms import MY_INDEX -F my_index_synonyms.ndjson -r -w

Direct Invocation

If the skill doesn't trigger automatically, users can invoke it directly:

  • /algolia-cli — Load the full skill into context for any Algolia CLI task
  • /algolia-cli:setup — Install the CLI and configure a profile

This is useful when the request is brief (e.g., "import my data into Algolia") and the skill might not auto-trigger.

Reference Docs

Stats
Stars4
Forks0
Last CommitMar 18, 2026