create-instantsearch-app CLI supports both interactive and non-interactive modes.
Basic Usage
Interactive Mode (Default)
Run without flags to enter interactive mode:Algolia Credentials
- Application ID (defaults to
latencydemo) - Search API key (defaults to demo key)
- Index name (defaults to
instant_search)
Search Configuration
- Attributes to display in results
- Image attribute for result thumbnails
- Attributes for faceting/filtering
Non-Interactive Mode
Use the--no-interactive flag with other options:
CLI Flags
Basic Options
The name of the application or widget
The InstantSearch template to use (see Templates)Examples:
"InstantSearch.js", "React InstantSearch", "Vue InstantSearch"The version of the library to useExample:
"4.0.0"Algolia Configuration
Your Algolia application ID
Your Algolia search API key (public, search-only)
The main index for your search
Search UI Configuration
Comma-separated list of attributes to display in search resultsExample:
"name,description,price"The attribute to use for displaying images in resultsExample:
"image_url"Comma-separated list of attributes to use for filteringExample:
"brand,category,color"Other Options
Path to a configuration file (JSON) containing all optionsSee Configuration for details
Skip automatic dependency installation
Disable all interactive prompts
Output the version number
Display help information
Examples
Create React app with demo credentials
Create Vue app with custom index
Skip dependency installation
User Events (Insights)
When prompted to “Enable user events”, selecting ‘Y’ activates the
insights option. This allows Algolia to process user events like clicks and conversions, enabling powerful analytics and personalization features.Autocomplete vs Search Box
For supported templates and versions, you can choose between:- Autocomplete: Enhanced search input with suggested searches and recent searches (requires Query Suggestions index)
- Regular search box: Standard search input field