@alokai/cli
Alokai CLI built on top of oclif
.
Usage
$ npm install -g @alokai/cli
$ alokai-cli COMMAND
running command...
$ alokai-cli (--version)
@alokai/cli/1.0.0 darwin-arm64 node-v22.14.0
$ alokai-cli --help [COMMAND]
USAGE
$ alokai-cli COMMAND
...
Commands
alokai-cli help [COMMAND]
Display help for alokai-cli.
USAGE
$ alokai-cli help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for alokai-cli.
See code: @oclif/plugin-help
alokai-cli store
Multibrand stores management
USAGE
$ alokai-cli store
DESCRIPTION
Multibrand stores management
alokai-cli store add
This command allows you to add a new store to the project.
USAGE
$ alokai-cli store add [--force] [--template] [--console-project-name <value>] [--cloud-region <value>]
[--framework <value>] [-s <value>] [-p <value>] [-v]
FLAGS
-p, --parent=<value> parent
-s, --store-id=<value> store-id
-v, --verbose verbose
--cloud-region=<value> [default: europe-west1] cloud-region
--console-project-name=<value> console-project-name
--force force
--framework=<value> framework
--template template
DESCRIPTION
This command allows you to add a new store to the project.
EXAMPLES
Create a new store. It will prompt for all the required information.
$ alokai-cli store add
Create a new deployable store with one-liner
$ alokai-cli store add --store-id=my-store --framework=nextjs --console-project-name=my-project --force
Create a new template store with one-liner
$ alokai-cli store add --store-id=my-store --template --framework=nextjs --console-project-name=my-project \
--force
FLAG DESCRIPTIONS
-p, --parent=<value> parent
Parent ID for the store nesting, default is root
-s, --store-id=<value> store-id
Store ID for newly generated store
-v, --verbose verbose
Show verbose output
--cloud-region=<value> cloud-region
Cloud region for the given Console project
--console-project-name=<value> console-project-name
Project name for newly generated store in Alokai Console
--force force
Force the operation and ignore prompts
--framework=<value> framework
Frontend framework for the new store to use in deployment
--template template
Defines if the store is a template store that will not be deployed, all its files will be used for inheritance
purposes
alokai-cli store build
Build the production version of the stores
USAGE
$ alokai-cli store build [-s <value>...] [--compose-only] [--cache-dir <value>] [-a] [-v] [--filter <value>...]
FLAGS
-a, --all all
-s, --store-id=<value>... [default: ] store-id
-v, --verbose verbose
--cache-dir=<value> cache-dir
--compose-only compose-only
--filter=<value>... [default: ] filter
DESCRIPTION
Build the production version of the stores
EXAMPLES
Build the production version of all stores
$ alokai-cli store build --all
Build the production version of the specific store
$ alokai-cli store build --store-id=my-store
Build the production version of multiple stores
$ alokai-cli store build --store-id=my-store my-other-store
Compose only the stores, do not build the production version
$ alokai-cli store build --all --compose-only
Specify the turbo cache directory
$ alokai-cli store build --cache-dir=/path/to/cache
Build all the apps in store except for middleware
$ alokai-cli store build --store-id=my-store --filter=!storefront-middleware-*
FLAG DESCRIPTIONS
-a, --all all
Build the production store for all stores
-s, --store-id=<value>... store-id
Build the production store for the specified single store or multiple stores
-v, --verbose verbose
Show verbose output
--cache-dir=<value> cache-dir
The directory to store the turbo cache. If not provided, the cache will be stored in the default location for turbo
--compose-only compose-only
Only compose the stores, do not build the production version
--filter=<value>... filter
Use Turborepo package filters to build only specified apps
alokai-cli store changed
Get a list of changed stores
USAGE
$ alokai-cli store changed [--condensed] [-s <value>] [--to <value>] [--global-dependencies <value>...]
[--deployable]
FLAGS
-s, --since=<value> [default: HEAD~1] since
--condensed condensed
--deployable deployable
--global-dependencies=<value>... [default: ] global-dependencies
--to=<value> to
DESCRIPTION
Get a list of changed stores
EXAMPLES
Get a list of changed stores since the last commit
$ alokai-cli store changed
Get a condensed list of changed stores since the last commit
$ alokai-cli store changed --condensed
Mark all stores as changed when any file in the packages directory changes
$ alokai-cli store changed --global-dependencies="packages/**"
Get a list of changed stores since the last 10 commits
$ alokai-cli store changed --since=HEAD~10
Get a list of changed stores since the specified commit
$ alokai-cli store changed --since=commit-sha
Get a list of deployable only stores changed since the last commit
$ alokai-cli store changed --deployable
FLAG DESCRIPTIONS
-s, --since=<value> since
Get a list of changed stores since the specified git reference
--condensed condensed
Condensed output that will return only an array of store IDs affected by the changes
--deployable deployable
If true, only deployable stores will be considered
--global-dependencies=<value>... global-dependencies
Path or globs to global dependencies which should trigger all stores to rebuild
--to=<value> to
Git branch commit ID or relative ref (for instance HEAD) to run tests to that commit
alokai-cli store deploy
Deploy stores to the Alokai Console
USAGE
$ alokai-cli store deploy --cloud-username <value> --cloud-password <value> --docker-registry-url <value> [-s
<value>... | -a] [-v] [-f nextjs|nuxt] [-p <value>] [-r <value>]
FLAGS
-a, --all all
-s, --store-id=<value>... [default: ] store-id
-v, --verbose verbose
DEPLOYMENT FLAGS
-f, --framework=<option> framework
<options: nextjs|nuxt>
-p, --project-name=<value> project-name
-r, --cloud-region=<value> cloud-region
--cloud-password=<value> (required) cloud-password
--cloud-username=<value> (required) cloud-username
--docker-registry-url=<value> (required) [default: registry.vuestorefront.cloud] docker-registry-url
DESCRIPTION
Deploy stores to the Alokai Console
EXAMPLES
Deploy all stores using environment variables for credentials
$ alokai-cli store deploy --all
Deploy a specific store with explicit credentials
$ alokai-cli store deploy --store-id=my-store --cloud-username=user --cloud-password=pass \
--docker-registry-url=registry.vuestorefront.cloud
Deploy single store with custom options deployment options. Custom options will override `alokai.config.json`
values.
$ alokai-cli store deploy --store-id=my-store --cloud-username=user --cloud-password=pass --p project-stage -f \
nuxt -r eu-west-1
FLAG DESCRIPTIONS
-a, --all all
Run the deployment for all stores
-f, --framework=nextjs|nuxt framework
The framework to use for the deployment. Can be used only for a single store.
-p, --project-name=<value> project-name
The project name to use for the deployment. Can be used only for a single store.
-r, --cloud-region=<value> cloud-region
The region of the Alokai Cloud to deploy to. Can be used only for a single store.
-s, --store-id=<value>... store-id
Run the deployment for the specified single store or multiple stores
-v, --verbose verbose
Show verbose output
--cloud-password=<value> cloud-password
The user password for the Alokai Cloud, required for deployment. Alternatively, you can set the CLI_CLOUD_PASSWORD
environment variable
--cloud-username=<value> cloud-username
The user ID for the Alokai Cloud, required for deployment. Alternatively, you can set the CLI_CLOUD_USERNAME
environment variable
--docker-registry-url=<value> docker-registry-url
The URL of the Docker registry to push the images to. Alternatively, you can set the CLI_DOCKER_REGISTRY_URL
environment variable
alokai-cli store dev
Start the development server for stores.
USAGE
$ alokai-cli store dev [-s <value>...] [-a] [--skip-compose] [--with-local-domains] [-v] [--filter <value>...]
FLAGS
-a, --all all
-s, --store-id=<value>... [default: ] store-id
-v, --verbose verbose
--filter=<value>... [default: ] filter
--skip-compose skip-compose
--with-local-domains with-local-domains
DESCRIPTION
Start the development server for stores.
EXAMPLES
Start development server for all stores
$ alokai-cli store dev --all
Start development server for a specific store
$ alokai-cli store dev --store-id=my-store
Start development server for multiple stores
$ alokai-cli store dev --store-id=my-store my-other-store
Start development server excluding middleware apps
$ alokai-cli store dev --all --filter=!storefront-middleware-*
Start development server with local domains by using Caddy
$ alokai-cli store dev --all --with-local-domains
FLAG DESCRIPTIONS
-a, --all all
Run the development server for all stores
-s, --store-id=<value>... store-id
Run the development server for the specified single store or multiple stores
-v, --verbose verbose
Show verbose output
--filter=<value>... filter
Use Turborepo package filters to start dev mode only for specified apps. For example, use
--filter=!storefront-middleware-default to start dev mode in the default store except for middleware app
--skip-compose skip-compose
Skip composing temporary stores and use the existing ones
--with-local-domains with-local-domains
Run local HTTPS server using Caddy. This flag generates a Caddyfile using the `localDomain` entries from your
`alokai.config.json` file and starts the Caddy server. Before using `--with-local-domains` flag, ensure that:
1. Caddy is installed on your system. You can install it by following the instructions at
https://caddyserver.com/docs/install.
2. Your system's hosts file is correctly configured to map the `localDomain` values to your local machine.
You can check the generated Caddyfile in `.out/Caddyfile` file. Please keep in mind that the Caddyfile will be
overwritten every time you run the `dev` command with the `--with-local-domains` flag.
alokai-cli store move
Move stores to a different parent in the hierarchy
USAGE
$ alokai-cli store move [-s <value>...] [-p <value>]
FLAGS
-p, --parent=<value> ID of the new parent store
-s, --store-id=<value>... ID of the store(s) to move
DESCRIPTION
Move stores to a different parent in the hierarchy
EXAMPLES
Move a store under a new parent store
$ alokai-cli store move --store-id=my-store --parent=new-parent
Move multiple stores under the root
$ alokai-cli store move --store-id=store1,store2 --parent=root
FLAG DESCRIPTIONS
-p, --parent=<value> ID of the new parent store
Unique identifier of the new parent store (can be 'root')
-s, --store-id=<value>... ID of the store(s) to move
Unique identifier(s) of the store(s) to be moved
alokai-cli store remove STOREID
Remove a store and all its children from the project.
USAGE
$ alokai-cli store remove STOREID [--force] [-v]
ARGUMENTS
STOREID Store ID of the store to remove
FLAGS
-v, --verbose verbose
--force force
DESCRIPTION
Remove a store and all its children from the project.
EXAMPLES
Remove a store from the project.
$ alokai-cli store remove my-store
FLAG DESCRIPTIONS
-v, --verbose verbose
Show verbose output
--force force
Force the operation and ignore prompts
alokai-cli store start
Start the production server for stores. This command requires stores to be already built.
USAGE
$ alokai-cli store start [-s <value>...] [-a] [--with-local-domains] [-v] [--filter <value>...]
FLAGS
-a, --all all
-s, --store-id=<value>... [default: ] store-id
-v, --verbose verbose
--filter=<value>... [default: ] filter
--with-local-domains with-local-domains
DESCRIPTION
Start the production server for stores. This command requires stores to be already built.
EXAMPLES
Start production server for all stores
$ alokai-cli store start --all
Start production server for a specific store
$ alokai-cli store start --store-id=my-store
Start production server for multiple stores
$ alokai-cli store start --store-id=my-store my-other-store
Start production server excluding middleware apps
$ alokai-cli store start --all --filter=!storefront-middleware-*
FLAG DESCRIPTIONS
-a, --all all
Run the production server for all stores
-s, --store-id=<value>... store-id
Run the production server for the specified single store or multiple stores
-v, --verbose verbose
Show verbose output
--filter=<value>... filter
Use Turborepo package filters to start only specified apps. For example, use --filter=!storefront-middleware-default
to start all apps in the default store except for middleware
--with-local-domains with-local-domains
Run local HTTPS server using Caddy. This flag generates a Caddyfile using the `localDomain` entries from your
`alokai.config.json` file and starts the Caddy server. Before using `--with-local-domains` flag, ensure that:
1. Caddy is installed on your system. You can install it by following the instructions at
https://caddyserver.com/docs/install.
2. Your system's hosts file is correctly configured to map the `localDomain` values to your local machine.
You can check the generated Caddyfile in `.out/Caddyfile` file. Please keep in mind that the Caddyfile will be
overwritten every time you run the `dev` command with the `--with-local-domains` flag.
alokai-cli store test
This command allows to run playwright tests for the specified single store or multiple stores.
USAGE
$ alokai-cli store test [-s <value>...] [-a] [--since <value>] [--to <value>] [--ui] [-p <value>...]
FLAGS
-a, --all all
-p, --playwright-options=<value>... [default: ] playwright-options
-s, --store-id=<value>... [default: ] store-id
--since=<value> since
--to=<value> to
--ui ui
DESCRIPTION
This command allows to run playwright tests for the specified single store or multiple stores.
If a store ID or store IDs are specified, it will run tests only for the specified store(s).
EXAMPLES
Run tests for all stores
$ alokai-cli store test --all
Run tests for a specific store
$ alokai-cli store test --store-id=my-store
Run tests for multiple stores
$ alokai-cli store test --store-id=my-store my-other-store
Run tests for changes since a specific commit
$ alokai-cli store test --since=commit-sha
Run tests in UI mode for a specific store
$ alokai-cli store test --store-id=my-store --ui
Run tests with additional Playwright options
$ alokai-cli store test --playwright-options="--project=nuxt-desktop --headed"
FLAG DESCRIPTIONS
-a, --all all
Run playwright test for all stores
-p, --playwright-options=<value>... playwright-options
Options to be passed as-is to playwright test command. See available options here
https://playwright.dev/docs/test-cli
-s, --store-id=<value>... store-id
Run playwright tests for the specified single store or multiple stores
--since=<value> since
git branch, commit id or relative ref (for instance HEAD~1) to run tests since that commit
--to=<value> to
Git branch commit ID or relative ref (for instance HEAD) to run tests to that commit
--ui ui
Run Playwright's tests in the UI mode. Only works with a single store and you need to provide store ID with the
--store-id flag