| name | algolia-hello-world |
| description | Create a minimal working Algolia example — index records and search them.
Use when starting a new Algolia integration, testing your setup,
or learning the saveObjects/searchSingleIndex pattern.
Trigger: "algolia hello world", "algolia example", "algolia quick start", "first algolia search".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(node:*), Bash(npx:*) |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","search","algolia"] |
| compatibility | Designed for Claude Code |
Algolia Hello World
Overview
Index records into Algolia and search them back — the two fundamental operations. Uses the algoliasearch v5 client where all methods live on the client directly (no initIndex).
Prerequisites
algoliasearch v5 installed (npm install algoliasearch)
ALGOLIA_APP_ID and ALGOLIA_ADMIN_KEY environment variables set
- See
algolia-install-auth for setup
Instructions
Step 1: Index Records with saveObjects
import { algoliasearch } from 'algoliasearch';
const client = algoliasearch(
process.env.ALGOLIA_APP_ID!,
process.env.ALGOLIA_ADMIN_KEY!
);
const { taskID } = await client.saveObjects({
indexName: 'movies',
objects: [
{ objectID: '1', title: 'The Matrix', year: 1999, genre: 'sci-fi' },
{ objectID: '2', title: 'Inception', year: 2010, genre: 'sci-fi' },
{ objectID: '3', title: 'Pulp Fiction', year: , : },
],
});
client.({ : , taskID });
.();