Package Exports
- @upstash/search-migrator
Readme
Upstash Search Migrator CLI
A command-line tool to migrate your data from an Algolia or Meilisearch index to an Upstash Search index.
Getting Started
You can run the CLI directly using npx without any installation, which ensures you are always using the latest version.
Using npx
npx @upstash/search-migratorUsage
The CLI can be run by passing command-line flags; otherwise, those credentials will be asked in the CLI.
Interactive Mode
Simply run the command without any flags to be guided through the migration process with interactive prompts.
npx @upstash/search-migratorUsing Flags
You can also provide your credentials and other information as command-line flags.
Algolia to Upstash
npx @upstash/search-migrator \
--upstash-url "YOUR_UPSTASH_URL" \
--upstash-token "YOUR_UPSTASH_TOKEN" \
--algolia-app-id "YOUR_ALGOLIA_APP_ID" \
--algolia-api-key "YOUR_ALGOLIA_WRITE_API_KEY"Meilisearch to Upstash
npx @upstash/search-migrator \
--upstash-url "YOUR_UPSTASH_URL" \
--upstash-token "YOUR_UPSTASH_TOKEN" \
--meilisearch-host "YOUR_MEILISEARCH_HOST" \
--meilisearch-api-key "YOUR_MEILISEARCH_API_KEY"Obtaining Credentials
Upstash
- Go to your Upstash Console.
- Select your Search index.
- Under the Details section, you will find your
UPSTASH_SEARCH_REST_URLandUPSTASH_SEARCH_REST_TOKEN.--upstash-urlcorresponds toUPSTASH_SEARCH_REST_URL.--upstash-tokencorresponds toUPSTASH_SEARCH_REST_TOKEN.
Algolia
- Go to your Algolia Dashboard.
- Navigate to Settings > API Keys.
- You will find your Application ID here. This is your
--algolia-app-id. - For the API key (
--algolia-api-key), you need a key withwritepermissions for your indices. You can use your Write API Key or create a new one with the necessary permissions.
Meilisearch
- Go to your Meilisearch Console.
- Find your Meilisearch deployment and copy the Host URL and API Key.
--meili-hostcorresponds to your Meilisearch instance URL (e.g.,https://ms-xxxxxx.meilisearch.io).--meili-api-keycorresponds to your Meilisearch API key.