Before you begin
You need:- A Stripe account
- The Stripe CLI with Stripe Projects, authenticated with
stripe login
Initialize your project
- From your repository, initialize your project:
This adds project-level metadata to your repository, recording which providers are provisioned and how credentials are handled. The CLI and any agents you use later read this metadata.Command line
- Optional: browse all available providers, including Algolia:
Command line
Provision Algolia
1
Add Algolia to your project
Command line
algolia.
To use a different resource name, add --name.
The resource name prefixes your environment variables and identifies the service in the management commands.2
Name your Algolia application
Enter a name for your application.
This name appears in the Algolia dashboard, and Stripe writes it to your
.env file as ALGOLIA_APPLICATION_NAME.
It’s separate from the resource name in your project.3
Choose a region
Select the region where you want to host your application:
- EU West
- US Central
- US East
- US West
- United Kingdom
4
Choose your plan
Select Build, Grow, or Grow Plus, then accept the plan terms when prompted.
Build is free, and both Grow plans include a free tier.
.env file:
ALGOLIA_APPLICATION_IDALGOLIA_APPLICATION_NAMEALGOLIA_SEARCH_API_KEYALGOLIA_WRITE_API_KEY, for server-side use only
The injected variable names don’t have a framework prefix, so build tools don’t expose them to browser code. To use the application ID and search API key in your frontend, add them again with your framework’s public prefix, such as
NEXT_PUBLIC_ for Next.js or VITE_ for Vite. Never expose the write API key in frontend code.Manage your Algolia application
Use the Stripe CLI to manage the lifecycle of your application. These commands take the resource name you set when you added the service, which isalgolia by default.
- Change your plan:
stripe projects upgrade algoliaorstripe projects downgrade algolia - Rotate credentials:
stripe projects rotate algolia - Review charges:
stripe projects spend algolia - Check your project’s services:
stripe projects status - Open the Algolia dashboard:
stripe projects open algolia
stripe projects --help for all available commands.
Next steps: add search to your app
- Index your data: send the content you want to search to Algolia as records, authenticating with the injected credentials.
- Configure relevance: tell Algolia which attributes to search, how to rank results, and which attributes to use as facets.
- Build your UI: create a search or chat interface with prebuilt InstantSearch components, backed by Agent Studio for conversational AI.