Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Category SDK
MCP toolkit
Certify
Resources
Skip to main content
The Alexa AI CLI lets you manage the lifecycle of your Alexa+ add-ons. Use it to create, deploy, test, and submit add-ons.

Overview

Valid syntax for Alexa AI CLI commands:
The Alexa AI CLI has three types of 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, and submit.
  • 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.
Each CLI command maps to one or more calls to the Alexa Add-on API (AAPI) — the REST API that manages the add-on lifecycle. The 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. To determine the version of the Alexa AI CLI installed on your computer, run 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.

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 run alexa-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.

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.
Flow
  1. Computes a SHA-256 hash of the addon-package/ directory. If the hash matches the last deployed package and --ignore-hash isn’t set, upload is skipped. Build and deploy still run.
  2. Zips the addon-package/ directory and calls POST /v1/addons/uploads to get a pre-signed S3 upload URL.
  3. Uploads the ZIP to the pre-signed URL.
  4. Calls POST /v1/addons/packages (first deploy) or POST /v1/addons/{addOnId}/packages (subsequent deploys) to trigger the build pipeline. Returns a packageId via the Location response header.
  5. Polls GET /v1/addons/{addOnId}/packages/{packageId} until the build reaches a terminal state (BUILT or FAILED).
  6. Calls POST /v1/addons/{addOnId}/deployments with the packageId to deploy to the development stage. Returns a deploymentId via the Location response header.
  7. Polls GET /v1/addons/{addOnId}/deployments/{deploymentId} until deployment reaches a terminal state (SUCCEEDED or FAILED).
  8. Stores the add-on ID and package hash in .alexa-ai/config.json for subsequent operations.
Possible status values in JSON output:

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.
Flow
  1. Reads the test suite from the local test-suites/ directory or the path specified by --test-suite.
  2. Calls POST /v1/addons/{addOnId}/stages/{stage}/tests with the test suite. Returns a testExecutionId.
  3. Polls GET /v1/addons/{addOnId}/tests/{testExecutionId} until the execution reaches a terminal state (COMPLETED or SYSTEM_ERROR).
  4. Displays a summary of passed and failed tests, and provides a URL to download the full test report.

alexa-ai submit

Submits the current development version of the add-on for certification.
Flow
  1. Resolves the add-on ID from .alexa-ai/config.json.
  2. Prompts for confirmation (skipped if --yes is provided).
  3. Calls POST /v1/addons/{addOnId}/submit. Returns SUBMITTED_FOR_CERTIFICATION status.
  4. The certification workflow validates artifacts and initiates the review process.

alexa-ai list

Lists all add-ons owned by the authenticated vendor.
Flow
  1. Resolves the vendor ID from the authentication token.
  2. Calls GET /v1/addons?vendorId={vendorId}&maxResults={n}&nextToken={token}&sortBy={field}&sortOrder={order}. Returns a paginated list of add-ons.
  3. Each entry includes the add-on ID, name, latest version, stage, status, and last updated timestamp.
  4. If a nextToken is present in the response, use --next-token to retrieve the next page.

alexa-ai status

Checks the lifecycle status of an add-on or a specific deployment.

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.

alexa-ai get-account-linking

Retrieves the current OAuth2 account linking configuration for an add-on.

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-level families require the --category flag for add-ons with multiple categories. For single-category add-ons, the category is resolved automatically. Supported stats: Supported aggregation periods: For the full list of available metric names, supported stats, and dimensions, see Add-on Metrics Catalog.

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.

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.
Time range rules: Specify a time range using one of these mutually exclusive options:
  • --last-n-periods—returns the last N aggregation buckets. If you omit all time range options, this defaults to 3.
  • --start-time and --end-time—explicit ISO-8601 range.
Providing both returns a 400 INVALID_REQUEST error.
When --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):

Common error codes


Last modified on August 18, 2026