The Altera CLI tool is a powerful command-line interface for interacting with your Shopify store through the Altera app. It provides an efficient way to manage your Shopify files and run data imports and exports. While we do not provide direct API access to Altera, this tool allows you to manage your store's data and files from the command line and to automate your workflows.
We launched the CLI tool in September 2025. If you have any questions or feedback we would love to hear from you.
Getting Started
Important: Keep your API key private as anyone with access will be able to access your store's data.
Install the Altera app from the Shopify App Store
Navigate to Settings β API Keys
Enter a contact email and save the settings
Then generate an API key and copy it to your clipboard
In your terminal run
npx altera shop addto connect your store to the CLI
Command Reference
This section provides a reference for all the commands available in the Altera CLI.
Shop Management
shop add [shopDomain]- Connect a new Shopify store to the CLIshop list- View all configured shopsshop use [shopDomain]- Switch between different shopsshop remove [shopDomain]- Remove a shop configurationshop test [shopDomain]- Test API connection for a specific shop
File Management
The files subcommand allows you to upload and download files from the Shopify Files section. Each time you upload or downloads files you will also get an Excel file of the files in the Altera format.
files download [localDir]- Download files from Shopify to local folderOptions:
--filename <filename>- Filter files by filename--media_type <type>- Filter by media type (IMAGE, EXTERNAL_VIDEO, MODEL_3D, VIDEO, FILE)
files upload [filePath]- Upload a file to Shopify
Example Commands
Download all files from Shopify to a local folder:
$ npx altera files download local_folder Downloading Files ----------------- URL: https://admin.shopify.com/store/example-store/apps/altera/job/q17bPE/ Output directory: ./local_folder Excel summary: ./local_folder/Files_2025-09-24_062200.xlsx [x] Preparing file list (1029) [x] Creating local directory [x] Downloading files (1029/1029) 1029 files downloaded to ./local_folder
Download all images from Shopify that contain 'shoes' in the filename:
$ npx altera files download local_folder --filename shoes --media_type IMAGE
Upload files from a local folder to Shopify:
$ npx altera files upload ./product_images/*.jpg Uploading Files ----------------- URL: https://admin.shopify.com/store/example-store/apps/altera/job/ED2k8q/ Excel summary: File_Upload_2025-09-24_063407.xlsx [x] Uploading files (4/4) [x] Waiting for Shopify to process files [x] Download summary File upload job completed successfully
Export Operations
Create and manage export jobs to download Shopify data as spreadsheets.
export create [resources...]
Create a new export job with one or more resources.
Resource Syntax:
Each resource can be specified with optional parts:
<resource>[:<part1>,<part2>...]
For example:
products- Export products with general fields onlyproducts:general,media- Export products with general and media fieldscatalogs:general,price_list- Export catalogs with general and price list fields
Available Resources:
products- Product catalog datacatalogs- Catalog and market pricingcustomers- Customer informationorders- Order historyarticles- Blog postscompanies- B2B company datadiscounts- Discount codes and rulesdraft_orders- Draft order datafiles- Media filesmenus- Navigation menusmetaobjects- Custom metaobjectspages- Store pagesredirects- URL redirectsshop- Store settingsmetafield_definitions- Metafield schemasmetaobject_definitions- Metaobject schemasevents- Store activity logspayouts- Payment informationblogs- Blog settingsmanual_collections- Manual collectionssmart_collections- Smart collections
Each resource supports different field groups that can be specified using the colon syntax (e.g., products:general,media).
Options:
-s, --shop <alias>- Select which configured shop to use-f, --filter <expr>- Add a filter expression (repeatable)--format <xlsx|csv|zip>- File format (default: xlsx)--filename <pattern>- Custom filename with placeholders--url-visible- Make the download URL public-t, --transform <resource>=<uuid>- Apply data transformation--download-to <dir>- Download file to directory after completion--datetime-format <format>- Datetime format (see Formatting Options)--phone-format <format>- Phone number format (see Formatting Options)--phone-cell-format <format>- Phone cell format for Excel (see Formatting Options)
Filename Placeholders:
#{{shop}}- Shop alias#{{resource}}- Resource name#{{date}}- Current date (YYYY-MM-DD)#{{time}}- Current time (HHMMSS)#{{timestamp}}- Combined date and time#{{job_id}}- Export job ID#{{uuid}}- Random unique ID
Filter Syntax:
Filters follow the pattern: <resource>.<field><operator><value>
Supported operators:
=- equals!=- not equals^=- starts with$=- ends with~=- contains>- greater than<- less than>=- greater than or equal<=- less than or equal
Examples:
Export products with general info and media:
npx altera export create products:general,media
Export products filtered by handle and date:
npx altera export create products --filter 'products.handle^=shoe-' --filter 'products.published_at>=2025-01-01'
Export catalogs with custom filename:
npx altera export create catalogs:general,price_list --filename 'catalogs-#{{date}}'
Export multiple resources:
npx altera export create products:general,media customers:general orders:general
Formatting Options
Control how datetime and phone fields are formatted in exports.
Datetime Formats (--datetime-format):
Value | Example Output |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Phone Number Formats (--phone-format):
Value | Example Output | Description |
|
| Pass through as-is (default) |
|
| Strict international format |
|
| Readable international format |
|
| National format |
Phone Cell Formats (--phone-cell-format):
Value | Example Output | Description |
|
| Prevents Excel auto-formatting (default) |
|
| Excel formula displays as text |
|
| No prefix |
Examples:
Export orders with ISO 8601 datetime format:
npx altera export create orders --datetime-format iso8601
Export customers with strict international phone format and no cell prefix:
npx altera export create customers --phone-format e164 --phone-cell-format raw
Export with US date format and international phone numbers:
npx altera export create orders:general --datetime-format us_date --phone-format international
Import Operations
Create import jobs to upload data from spreadsheets to your Shopify store.
import create <file>
Create a new import job using a local spreadsheet file.
Arguments:
<file>- Path to a local CSV, XLSX, or ZIP file
Options:
-s, --shop <alias>- Select which configured shop to use--types <list>- Comma-separated sheet-to-type mapping (e.g.,products,null,orders)--analyze-only- Run file analysis only, don't start import--ignore-warnings- Proceed automatically even with warnings
Behavior:
File Analysis: The file is first analyzed for errors and warnings
Errors will cause the import to fail
Warnings require confirmation unless
--ignore-warningsis usedImport Execution: If validation passes, the import starts automatically
Examples:
Import a products file:
npx altera import create ./products.xlsx
Import with explicit sheet type mapping (skip second sheet):
npx altera import create ./multi-sheet.xlsx --types products,null,orders
Analyze file without importing:
npx altera import create ./data.xlsx --analyze-only
Import and auto-proceed on warnings:
npx altera import create ./products.csv --ignore-warnings
Job Management
job status <jobId>
Get the current status of any job (import, export, or file operation).
Arguments:
<jobId>- The unique identifier for the job
Example:
npx altera job status abc123
Plan Requirements
Note: The CLI tool, including import and export commands, is available on the Developer and Pro plans only. The Community plan does not include CLI access.
To use the CLI:
You must be on the Developer or Pro plan
Generate an API key from Settings β API Keys in the Altera app
Configure your shop with
npx altera shop add
