commerce
commands for the Adobe I/O CLI
There is currently a known issue affecting aio-cli so you will see a warning related to punycode
. This does not impact
functionality. Follow here: adobe/aio-cli#679
❗ You must have Node >= 22. Consider using nvm to manage multiple versions.
❗ You must have the aio CLI installed.
❗ You must have the gh CLI tool installed and authenticated before using this plugin.
brew install gh
gh auth login
The prerequisites in this section are only necessary if you are provisioning API Mesh for your storefront.
❗ You must have developer access in Adobe Developer Console to create Meshes. Please make sure you have the correct entitlements and also accept the terms and conditions of the Developer Console.
❗ You must also have the api-mesh
plugin installed if you wish to use mesh provisioning.
aio plugins:install @adobe/aio-cli-plugin-api-mesh
❗ You must also log in to the Adobe I/O CLI using your credentials.
# logout/clear config
aio config clear
# set cli env to "prod" or "stage"
aio config set cli.env prod
# trigger login and select your org
aio console org select
Due to AEM restrictions on subdomains the full project url cannot exceed 63 characters. You also cannot use the _
character.
Consider using a short name, and hyphens instead of underscores.
If you choose a workspace with a pre-existing mesh, the mesh provisioning will fail. Create or choose an empty workspace, or delete the pre-existing mesh (only if you are sure it is unused).
Sometimes your AIO authentication can become invalid. You must first aio logout
and then aio login
. Also verify you are using the correct cli environment (stage
or prod
).
If you are already authenticated to experience.adobe.com with a specific org selected, the aio login command will use that authentication. If this does not match the org you are trying to use for CCM or API Mesh, you will need to log out and log in again.
If you see a 404 when you navigate to your storefront "aem.page" url, it can be due to a few reasons. Here are some steps you can take to troubleshoot:
- Check the URL: Ensure that the URL you are trying to access is correct and that there are no typos.
- Check AEM Code Sync Bot: Ensure that the AEM Code Sync Bot is installed to the correct github repository. _you cannot select "all repositories"!
If you are still having problems, please open an issue and confirm that you:
- can consistently reproduce the issue
- are able to obtain the full error output using AIO_LOG_LEVEL=debug aio commerce init.
- verify you have tried using the "demo" backends
- verify you have tried with and without API Mesh
- verify you deleted the mesh before using the CLI (
aio api-mesh:delete
) - verify you have tried using unique destination repo name
- verify you are in the correct IMS environment (
aio config set cli.env <env>
) - verify you are authorized to the correct IMS org (
aio config get console.org
) - Sign out of https://experience.adobe.com first before running the CLI, as this may “auto select” the wrong org
- verify you are authorized to the correct gh user gh auth status
Additionally, please:
- provide the storefront url
- provide exact steps/inputs you chose in order to reproduce the issue
$ aio plugins:install https://github.com/adobe-commerce/aio-cli-plugin-commerce
$ # OR
$ aio discover -i
$ aio commerce --help
USAGE
$ aio commerce init [-d <value>] [-r <value>] [--skipMesh] [-t <value>]
FLAGS
-d, --datasource=<value> your datasource, ie "https://my-commerce-api.com/graphql
-r, --repo=<value> your github repo, ie "my-git-user/my-test-storefront"
--skipMesh skip creating API Mesh
-t, --template=<value> the template to use, ie "adobe-commerce/adobe-demo-store
DESCRIPTION
Scaffold your own Adobe Commerce on EDS storefront
EXAMPLES
$ aio commerce:init
$ aio commerce:init --template "adobe-commerce/adobe-demo-store" --skipMesh --repo "my-git-user/my-site"
USAGE
$ aio commerce dev
DESCRIPTION
one command to clone, install, and run the local development server.
EXAMPLES
$ aio commerce:dev
Contributions are welcomed! Read the Contributing Guide for more information.
git clone [email protected]:adobe-commerce/aio-cli-plugin-commerce.git
cd aio-cli-plugin-commerce
npm install
aio plugins:link commerce
Uses winston internally.
Use AIO_LOG_LEVEL=debug|verbose|info|warn|error <command>
to see full logs.
AIO_LOG_LEVEL=debug aio commerce:init
This project is licensed under the Apache V2 License. See LICENSE for more information.