CLI
Easily migrate your Shopify products to the search platform with our CLI
The CLI tool offers a command-line interface for managing various aspects of your Commerce instance.
Installation
You can install the CLI globally using npm, pnpm, or yarn:
Usage
For more information run:
Our CLI will try to find required environment variables in packages/apps/web/.env.local
.
Each variable will be prompted to you for confirmation when using commands.
To opt-in you have to follow the below naming convention:
Available Commands
sync
commerce-cli sync | s [opts]
This command allows you to pull all of your products and categories from your commerce platform, and synchronize it with your search & merch solution.
You will be asked whether to set up webhooks to keep your products and categories in sync continuously, eliminating the need for manual synchronization.
Importantly, this command does not modify your products in Shopify, eliminating the need for backups or concerns about data alteration. It solely fetches product data and uploads it to your search engine.
Options:
webhook
commerce-cli webhook | w [opts]
This command helps you check and maintain webhooks set for your commerce platform with ease. You can delete and modify existing webhooks individually or in bulk, as well as create new ones.
This allows you to stay in control of background tasks set for your commerce.
Options:
You can also simply run commerce-cli webhook
and use the UI to get things done.
For more information on how to possess each of the keys please check our Setup Page