Initialize your app
Before initializing your App Builder application for App Management, ensure you have completed the prerequisites and have the required services configured.
Prerequisites
Complete the following steps before initializing your app:
Create a project in the Adobe Developer Console
Create a new project or use an existing one in the Adobe Developer Console.
Add required services
Add the following services to your project:
- I/O Management API. Required for App Builder runtime actions.
- I/O Events. Required only if your app uses events.
- I/O Events for Adobe Commerce. Required only if your app uses events.
- Adobe Commerce as a Cloud Service. Required only for Adobe Commerce as a Cloud Service instances.
Only add the services your app needs. This keeps your credentials scoped to the minimum required permissions.
Set up App Builder
Ensure you have the Adobe I/O CLI installed and configured.
Initialize
Run the following command to set up your App Builder project:
Copied to your clipboardnpx @adobe/aio-commerce-lib-app init
The initialization process:
- Creates
app.commerce.configwith a template (prompts you to choose format and features if the file doesn't exist) - Installs required dependencies (
@adobe/aio-commerce-lib-app,@adobe/aio-commerce-sdk, and@adobe/aio-commerce-lib-configwhen business configuration is enabled) - Adds a
postinstallhook topackage.json - Generates all required artifacts (
commerce/configuration/1resources are only generated whenbusinessConfigis defined) - Updates
app.config.yamlandinstall.yamlwith the appropriate extension references. Creates these files if they do not exist.
The command automatically detects your package manager and uses the appropriate package runner (npx for npm, yarn dlx for Yarn, pnpm dlx for pnpm, bunx for Bun).
CLI commands
The library provides the following CLI commands:
| Command | Description |
|---|---|
npx @adobe/aio-commerce-lib-app init | Initialize the project. Recommended for a first-time setup. The @adobe prefix is only required for this command |
npx aio-commerce-lib-app generate all | Generate all artifacts (manifest, schema, and runtime actions). If your schema contains password fields, configure an encryption key. An encryption key is generated when no encryption key is found. See Password field encryption for more information |
npx aio-commerce-lib-app generate manifest | Generate only the app manifest file |
npx aio-commerce-lib-app generate actions | Generate only runtime actions |
npx aio-commerce-lib-app generate schema | Generate only the configuration schema |
Update the library
When a new version of the library is available, update your project to get the latest features and fixes:
Copied to your clipboardnpm install @adobe/aio-commerce-lib-app@latest @adobe/aio-commerce-sdk@latest
If you use a business configuration, also run the following command:
Copied to your clipboardnpm install @adobe/aio-commerce-lib-config@latest
The postinstall hook regenerates runtime actions when you install or update the library.
