Overview
Valid syntax for Alexa AI CLI commands:- High-level commands handle the add-on workflow by orchestrating multiple steps in a single call. Use these for day-to-day development. Examples include
new,deploy,test, andsubmit. - Catalog commands give you direct control over individual catalog operations, such as creating, uploading, and associating Point of Interest (POI) and event data. Use these when you need control over catalog management.
- Metrics commands let you discover and query usage metrics for your add-on, including task completion funnels, engagement, and API performance data.
configure and new commands are client-side only and don’t make any API calls.
Common parameters
The following parameters are available on all Alexa AI CLI commands.alexa-ai --version.
alexa-ai configure
Sets up CLI authentication through the Login with Amazon (LWA) OAuth flow and stores credentials at~/.alexa-ai/credentials. Run this command again to refresh credentials for the specified profile.
Example usage
Example usage
alexa-ai new
Scaffolds a new add-on project locally. Doesn’t make any backend calls. Supports both interactive and non-interactive modes.Positional argument
Options
If you omit required options, the CLI prompts for them interactively.Interactive mode
If you runalexa-ai new without arguments, the CLI prompts you to choose an integration type and then asks for the required values. This is the recommended approach for first-time setup.
Non-interactive mode
Pass all required options on the command line to skip prompts. This is useful for CI/CD pipelines and automation scripts. The CLI silently ignores options that don’t apply to the chosen type.Example usage
Example usage
Example output
Example output
alexa-ai deploy
Uploads the add-on package, triggers the build pipeline, and deploys to the development stage. The first deploy creates the add-on with a new add-on ID. Subsequent deploys create new versions by using the ID stored in.alexa-ai/config.json.
- Computes a SHA-256 hash of the
addon-package/directory. If the hash matches the last deployed package and--ignore-hashisn’t set, upload is skipped. Build and deploy still run. - Zips the
addon-package/directory and callsPOST /v1/addons/uploadsto get a pre-signed S3 upload URL. - Uploads the ZIP to the pre-signed URL.
- Calls
POST /v1/addons/packages(first deploy) orPOST /v1/addons/{addOnId}/packages(subsequent deploys) to trigger the build pipeline. Returns apackageIdvia theLocationresponse header. - Polls
GET /v1/addons/{addOnId}/packages/{packageId}until the build reaches a terminal state (BUILTorFAILED). - Calls
POST /v1/addons/{addOnId}/deploymentswith thepackageIdto deploy to the development stage. Returns adeploymentIdvia theLocationresponse header. - Polls
GET /v1/addons/{addOnId}/deployments/{deploymentId}until deployment reaches a terminal state (SUCCEEDEDorFAILED). - Stores the add-on ID and package hash in
.alexa-ai/config.jsonfor subsequent operations.
Example usage
Example usage
Example output
Example output
Example JSON output
Example JSON output
Example JSON output (failed)
Example JSON output (failed)
alexa-ai test
Runs tests against the deployed add-on and returns the test execution results. Deploy the add-on to the target stage before running tests.- Reads the test suite from the local
test-suites/directory or the path specified by--test-suite. - Calls
POST /v1/addons/{addOnId}/stages/{stage}/testswith the test suite. Returns atestExecutionId. - Polls
GET /v1/addons/{addOnId}/tests/{testExecutionId}until the execution reaches a terminal state (COMPLETEDorSYSTEM_ERROR). - Displays a summary of passed and failed tests, and provides a URL to download the full test report.
Example usage
Example usage
Example output
Example output
Example JSON output
Example JSON output
alexa-ai submit
Submits the current development version of the add-on for certification.- Resolves the add-on ID from
.alexa-ai/config.json. - Prompts for confirmation (skipped if
--yesis provided). - Calls
POST /v1/addons/{addOnId}/submit. ReturnsSUBMITTED_FOR_CERTIFICATIONstatus. - The certification workflow validates artifacts and initiates the review process.
Example usage
Example usage
Example output
Example output
Example JSON output
Example JSON output
alexa-ai list
Lists all add-ons owned by the authenticated vendor.- Resolves the vendor ID from the authentication token.
- Calls
GET /v1/addons?vendorId={vendorId}&maxResults={n}&nextToken={token}&sortBy={field}&sortOrder={order}. Returns a paginated list of add-ons. - Each entry includes the add-on ID, name, latest version, stage, status, and last updated timestamp.
- If a
nextTokenis present in the response, use--next-tokento retrieve the next page.
Example usage
Example usage
Example output
Example output
Example JSON output
Example JSON output
alexa-ai status
Checks the lifecycle status of an add-on or a specific deployment.Example usage
Example usage
alexa-ai configure-account-linking
Configures OAuth2 account linking for an add-on. Account linking enables your add-on to access user data from your service by connecting the user’s Alexa identity to their account on your service.Example usage
Example usage
alexa-ai get-account-linking
Retrieves the current OAuth2 account linking configuration for an add-on.Example usage
Example usage
Catalog commands
Use these commands to manage point of interest (POI) and event data catalogs.alexa-ai create-catalog
Creates a new catalog for a vendor.alexa-ai upload-catalog
Uploads data to an existing catalog.alexa-ai associate-catalog-with-addon
Associates a catalog with an add-on.alexa-ai get-content-upload-by-id
Gets the processing status of a catalog content upload.alexa-ai list-catalogs
Lists catalogs owned by the authenticated vendor.alexa-ai get-catalog
Gets details of a specific catalog.alexa-ai list-catalog-uploads
Lists content uploads for a specific catalog.Add-on usage metrics commands
Use these commands to discover and query usage metrics for your add-on, including task completion funnels, engagement, account linking, and API performance data. Metric families Metrics are organized into families:--category flag for add-ons with multiple categories. For single-category add-ons, the category is resolved automatically.
Supported stats:
alexa-ai list-addon-metrics
Discovers available metrics for your add-on. Use this command to find metric names, supported stats, and available dimensions before running a query.Example usage
Example usage
Example JSON response
Example JSON response
alexa-ai get-addon-metrics
Retrieves time series metric data for your add-on. You can query a single metric, compare up to five metrics side by side, or expand an entire family to get the full funnel in one call.--last-n-periods—returns the last N aggregation buckets. If you omit all time range options, this defaults to 3.--start-timeand--end-time—explicit ISO-8601 range.
400 INVALID_REQUEST error.
Example usage
Example usage
Example JSON response
Example JSON response
--group-by is set, the data array contains multiple entries—one per distinct value of the grouped field, sorted by volume in descending order.
Metrics error codes
The following errors are specific to the metrics commands. For general errors that apply to all commands (authentication, rate limiting, server errors), see Error codes.Error codes
When a command fails, the CLI displays errors in the following format: Human-readable (default):Examples
Examples
JSON error format (with –json flag)
JSON error format (with –json flag)

