Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Category SDK
MCP toolkit
Certify
Resources

Alexa AI CLI Reference

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:

alexa-ai [options]
alexa-ai [command] [options]
alexa-ai [command] [subcommand] [options]

The Alexa AI CLI has two 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.

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.

Parameter Short Type Required Default Description
--profile -p String No default Named credential profile to use. Create profiles with alexa-ai configure --profile <name>.
--debug Flag No Enables verbose debug output including HTTP request and response details.
--help -h Flag No Prints the description and available options for the command.

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.

Copied to clipboard.

alexa-ai configure [--profile <profile-name>] [--no-browser]
Parameter Type Required Description
--profile String No Named profile for storing credentials.
--no-browser Flag No Prints the auth URL instead of opening a browser. Use in SSH environments.


alexa-ai new

Scaffolds a new add-on project locally. Doesn't make any backend calls. Supports both interactive and non-interactive modes.

Copied to clipboard.

alexa-ai new [type] [options]

Positional argument

Argument Type Required Description
type String No Integration type to scaffold. Values: mcp, action. If omitted, the CLI prompts you to choose.

Options

If you omit required options, the CLI prompts for them interactively.

Parameter Type Applies to Description
--name String Category SDK and MCP Toolkit Add-on display name.
--locale String Category SDK and MCP Toolkit Locale for the add-on. Default: en-US.
--mcp-server-url String MCP Toolkit only MCP server endpoint URL.
--category String Category SDK and MCP Toolkit Category for the add-on.
Category SDK values: restaurant-reservation, food-ordering, home-services, local-booking, ticketing.
MCP Toolkit values (in-category add-ons only): ride_booking.
--language String Category SDK only Programming language. Values: typescript.
--hosting String Category SDK only Hosting method. Values: cdk.
--non-interactive Flag Category SDK and MCP Toolkit Skip all interactive prompts. Requires all mandatory options to be provided on the command line.
--requires-auth Flag MCP Toolkit only Indicates the MCP server requires authentication.
--auth-client-id String MCP Toolkit only OAuth2 client ID for MCP server authentication.
--auth-scopes String MCP Toolkit only Space-separated list of OAuth2 scopes required by the MCP server.

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.

Copied to clipboard.

alexa-ai deploy [--ignore-hash] [--json]
Parameter Type Required Description
--ignore-hash Flag No Force deploy even if no changes detected.
--skip-validation Flag No Skip pre-deploy validation checks.
--json Flag No Outputs results in JSON format.

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:

Status Description
SUCCEEDED Build and deployment completed.
BUILD_IN_PROGRESS Package build is still running.
BUILD_FAILED Package build failed. See status.failureReason for details.
DEPLOY_IN_PROGRESS Build succeeded, deployment to stage is still running.
DEPLOY_FAILED Deployment to stage failed. See status.failureReason for details.

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.

Copied to clipboard.

alexa-ai test [--stage <stage>] [--test-suite <path>] [--filter <pattern>] [--json]
Parameter Type Required Default Description
--stage String No development Stage to test against. Values: development, live.
--test-suite String No test-suites/ Path to a test suite JSON file or directory.
--filter String No Regex pattern to filter which tests to run. Only applicable for Category SDK add-ons.
--profile String No default Named credential profile to use.
--json Flag No Outputs results in JSON format.

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.

Copied to clipboard.

alexa-ai submit [--yes] [--json]
Parameter Type Required Description
--yes Flag No Skips the interactive confirmation prompt.
--json Flag No Outputs results in JSON format.

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.

Copied to clipboard.

alexa-ai list [--max-results <n>] [--next-token <token>] [--json]
Parameter Type Required Default Description
--max-results Integer No 10 Maximum number of add-ons to return. Maximum value is 50.
--next-token String No Pagination token from a previous response.
--json Flag No Outputs results in JSON format.

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.

Copied to clipboard.

alexa-ai status [--addon-id <id>] [--deployment-id <id>] [--json]
Parameter Type Required Description
--addon-id String No Add-on identifier. If not provided, resolves from .alexa-ai/config.json.
--deployment-id String No Deployment identifier to check status of a specific deployment.
--json Flag No Outputs results in JSON format.


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 platform.

Copied to clipboard.

alexa-ai configure-account-linking --addon-id <id> --config-file <path> [--json]
Parameter Type Required Description
--addon-id String Yes Add-on identifier.
--config-file String Yes Path to a JSON file containing the OAuth2 account linking configuration.
--json Flag No Outputs results in JSON format.


alexa-ai get-account-linking

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

Copied to clipboard.

alexa-ai get-account-linking [--addon-id <id>] [--stage <stage>] [--json]
Parameter Type Required Default Description
--addon-id String No Add-on identifier. If not provided, resolves from .alexa-ai/config.json.
--stage String No development Stage to retrieve the configuration from. Values: development, certification, certified, live.
--json Flag No Outputs results in JSON format.


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.

Copied to clipboard.

alexa-ai create-catalog --title <title> --type <type> --usage <usage> [--json]
Parameter Type Required Description
--title String Yes Human-readable name for the catalog.
--type String Yes Catalog type (for example, AMAZON.BroadcastChannel).
--usage String Yes The catalog's usage (for example, AlexaMusic.Catalog.BroadcastChannel).
--json Flag No Outputs results in JSON format.

alexa-ai upload-catalog

Uploads data to an existing catalog.

Copied to clipboard.

alexa-ai upload-catalog --catalog-id <id> --file <path> [--json]
Parameter Type Required Description
--catalog-id String Yes Catalog identifier from create-catalog.
--file String Yes Path to the data file (JSON) to upload.
--json Flag No Outputs results in JSON format.

alexa-ai associate-catalog-with-addon

Associates a catalog with an add-on.

Copied to clipboard.

alexa-ai associate-catalog-with-addon --addon-id <id> --catalog-id <id>
Parameter Type Required Description
--addon-id String Yes Add-on identifier.
--catalog-id String Yes Catalog identifier to associate.

alexa-ai get-content-upload-by-id

Gets the processing status of a catalog content upload.

Copied to clipboard.

alexa-ai get-content-upload-by-id --catalog-id <id> --upload-id <id> [--json]
Parameter Type Required Description
--catalog-id String Yes Catalog identifier.
--upload-id String Yes Upload identifier from upload-catalog.
--json Flag No Outputs results in JSON format.

alexa-ai list-catalogs

Lists catalogs owned by the authenticated vendor.

Copied to clipboard.

alexa-ai list-catalogs [--max-results <n>] [--next-token <token>] [--json]
Parameter Type Required Default Description
--max-results Integer No 10 Maximum number of catalogs to return.
--next-token String No Pagination token from a previous response.
--json Flag No Outputs results in JSON format.

alexa-ai get-catalog

Gets details of a specific catalog.

Copied to clipboard.

alexa-ai get-catalog --catalog-id <id> [--json]
Parameter Type Required Description
--catalog-id String Yes Catalog identifier.
--json Flag No Outputs results in JSON format.

alexa-ai list-catalog-uploads

Lists content uploads for a specific catalog.

Copied to clipboard.

alexa-ai list-catalog-uploads --catalog-id <id> [--max-results <n>] [--next-token <token>] [--json]
Parameter Type Required Default Description
--catalog-id String Yes Catalog identifier.
--max-results Integer No 10 Maximum number of uploads to return.
--next-token String No Pagination token from a previous response.
--json Flag No Outputs results in JSON format.

Error codes

When a command fails, the CLI displays errors in the following format:

Human-readable (default):

[<ERROR_CODE>] <description>.
  Fix: <command>

Field Type Description
success Boolean Always false.
command String Which command failed.
errorCode String or null Error code from AAPI (for example, UNAUTHORIZED, ADDON_NOT_FOUND).
error String Human-readable error description.
fix String or null Runnable CLI command to resolve the issue, or null.
data Object or null Partial context from the failed operation (for example, addOnId, stage).

Common error codes

HTTP status Code Description
400 INVALID_REQUEST Malformed request body or missing required fields.
400 INVALID_STAGE Invalid stage value. Must be development or live.
401 NOT_AUTHENTICATED The request has a missing, invalid, or expired authentication token.
403 NOT_AUTHORIZED The caller is authenticated but doesn't have permission to perform this operation.
404 ADDON_NOT_FOUND Add-on with the specified ID doesn't exist.
404 PACKAGE_NOT_FOUND Package with the specified ID doesn't exist.
404 DEPLOYMENT_NOT_FOUND Deployment with the specified ID doesn't exist.
404 CATALOG_NOT_FOUND Catalog with the specified ID doesn't exist.
404 TEST_EXECUTION_NOT_FOUND Test execution with the specified ID doesn't exist.
409 CONFLICT Operation conflicts with current state. For example, another version is already in certification.
409 INVALID_LIFECYCLE_STATE Add-on isn't in the required lifecycle state for this operation.
429 TOO_MANY_REQUESTS Rate limit exceeded. Retry after the number of seconds indicated in the Retry-After response header.
500 INTERNAL_SERVER_ERROR Unexpected server error.


Was this page helpful?

Last updated: Jul 10, 2026