Catalyst CLI
The Catalyst CLI is generally available, but Native Hosting is currently in closed beta. There may be breaking changes to the Native Hosting APIs as we finalize them. To express interest in gaining access, fill out the Native Hosting Closed Beta Interest Form.
Make sure to read the Overview documentation to understand the purpose of the CLI, how configuration variables work, etc. The Catalyst CLI supports the following commands:
Configuration values are resolved in this priority order: flags > environment variables > .bigcommerce/project.json. If CATALYST_STORE_HASH is unset, the CLI falls back to BIGCOMMERCE_STORE_HASH.
Commands that manage a resource are named in the plural — projects, channels, domains, and logs. Each one also accepts its singular form as an alias, so catalyst project list and catalyst projects list do the same thing. The plural form is canonical; use it in new scripts.
version
Display detailed version information (CLI version, Node version, and platform).
Parameters
This command does not accept any parameters.
Example
create
Scaffold a new Catalyst storefront and connect it to your BigCommerce store. The CLI will prompt for any required values not passed as flags.
Parameters
Example
auth login
Authenticate with BigCommerce via your browser. Uses an OAuth device code flow. The CLI displays a one-time code, opens your browser to the BigCommerce login page, and waits for you to authorize. After logging in, your credentials are stored in .bigcommerce/project.json. Falls back to an interactive store hash + access token prompt if the browser flow is unavailable.
If a store hash and access token are already resolved — from --store-hash/--access-token, or already stored from a previous login — the CLI doesn’t attempt to log in again: it displays those credentials and suggests running catalyst auth logout first to re-authenticate.
Parameters
Example
auth logout
Remove stored credentials for the current project.
Parameters
This command does not accept any parameters.
Example
auth whoami
Verify your stored credentials and display information about the authenticated store and linked project.
Parameters
Example
Example output:
If no credentials are found, the command exits with a “not logged in” message.
start
Start a local preview of your Catalyst storefront. For projects set up for Commerce Hosting, this previews the OpenNext/Cloudflare build via Wrangler and requires a successful catalyst build first. For self-hosted projects, it falls back to next start instead.
Before the Commerce Hosting preview, the CLI symlinks .bigcommerce/.dev.vars to your .env.local (so Wrangler picks up the same variables) unless .dev.vars already exists as something else, in which case it warns and leaves it alone. If .env.local doesn’t exist, it warns that the preview may fail without environment variables.
Parameters
This command does not accept any parameters.
Example
build
Build your Catalyst project. If the project is configured for Native Hosting (Commerce Hosting), this runs the OpenNext/Cloudflare pipeline and a Wrangler dry-run to generate deployment artifacts. Otherwise, it falls back to next build.
Parameters
Example
deploy
Deploy your application to Cloudflare. By default, this also runs a build before deploying which can be skipped with the --prebuilt flag. Generates a bundle from .bigcommerce/dist, uploads it to BigCommerce, and creates a deployment. If no project is linked and --project-uuid isn’t passed, the CLI prompts you to select or create one and links it automatically before continuing.
Runtime secrets can be persisted with env add — they are sent automatically on every deploy — or passed per run with --secret. A --secret value overrides any stored value for the same key.
Parameters
Example
env add
Add or update one or more deployment environment variables. Stored in .bigcommerce/project.json and sent as secrets on every catalyst deploy, so you no longer need to pass --secret for each one. Run a value through --secret on deploy only when you want to override a stored value for a single run.
Parameters
Example
env remove
Remove one or more stored deployment environment variables.
Parameters
Example
env list
List stored deployment environment variables. Values are masked.
Parameters
This command does not accept any parameters.
Example
logs tail
Tail live logs from your deployed application. Streams log output in real time using Server-Sent Events (SSE). The stream automatically reconnects on transient errors (up to 5 retries). Authentication errors (401) and other 4xx responses are treated as fatal instead — the command exits immediately rather than retrying, since reconnecting won’t resolve them.
Parameters
The available formats are:
default—[timestamp] [LEVEL] messageshort— message onlyrequest—[timestamp] [LEVEL] METHOD URL (status_code) messagejson— raw JSON outputpretty— pretty-printed JSON
Example
logs query
Query historical logs from your deployed application. Specify a time window with --since (relative to now) or with --start/--end (absolute timestamps), and optionally filter by HTTP method, status code, URL, and log level. The window may not exceed 7 days. Entries print oldest-first, with timestamps in UTC.
Parameters
The available formats are the same as logs tail.
This command paginates with cursors. When more entries exist than --limit
allows, the CLI prints a ready-to-run command with --after <cursor> for
the next (older) page, or --before <cursor> for the previous (newer) page
— follow the printed hint to keep paging. Cursors are only valid together
with the exact window and filters they came from, so re-run with the same
--start/--end, --method, --status-code, --url-like, --level-min,
and --format flags. With --format json, the cursors are emitted as a
trailing {"meta": ...} line instead of a printed hint.
Example
projects create
Create a new BigCommerce infrastructure project and link it to your local Catalyst project. The project UUID is written to .bigcommerce/project.json. Walks you through logging in via the browser device-code flow (the same flow as auth login) if you aren’t authenticated yet.
Parameters
Example
projects link
Link your local Catalyst project to a BigCommerce infrastructure project. You can provide a project UUID directly, or use store credentials to fetch and select from available projects (or create a new one). The linked project UUID is written to .bigcommerce/project.json.
After linking, if the project isn’t already set up for Commerce Hosting, the CLI asks whether to run that setup now (transforming the project and installing dependencies). If the project is already set up, this step is skipped, though the CLI still silently cleans up any Cloudflare-incompatible artifacts left over from before.
Parameters
Example
projects list
List BigCommerce infrastructure projects for your store. The currently linked project is highlighted.
Parameters
Example
projects delete
Permanently delete a BigCommerce infrastructure project. This action is irreversible. If --project-uuid is not provided, the CLI fetches available projects and prompts you to select one. A confirmation prompt is shown before deletion unless --force is passed.
Parameters
Example
channels create
Create a new Catalyst storefront channel on your BigCommerce store. This is the same channel-creation flow offered by create during scaffolding, exposed as a standalone command so you can add channels to an existing project without scaffolding a new one.
Like channels link, this is an onboarding command: if you are not already authenticated, it logs you in via the browser device-code flow (the same flow as auth login) before continuing. It then checks whether your store is eligible to create a Catalyst channel and exits with the store’s message if it is not.
By default it prompts for the channel name, a default language, optional additional languages (up to 4), and whether to install sample data. Pass the corresponding flags to skip any prompt. Passing more than 4 values to --additional-locales fails immediately with an error, before any network call.
After the channel is created, the CLI asks whether to link it to your project — writing the channel’s credentials (store hash, storefront token, channel ID, etc.) to .env.local in the current working directory, the same as channels link. Pass --link to write the credentials without prompting.
Parameters
Example
channels link
Link this Catalyst project to a BigCommerce channel and write its credentials to .env.local. This is an onboarding command: if you are not already authenticated, it logs you in via the browser device-code flow (the same flow as auth login) before continuing. By default it prompts you to pick from the storefront channels on your store; pass --channel-id to skip the picker.
The channel’s environment variables (store hash, storefront token, channel ID, etc.) are written to .env.local in the current working directory — run this from inside your project’s core/ directory, the same place you run dev, build, and deploy.
Parameters
Example
channels update
Update a BigCommerce channel’s site URL to point at one of your project’s deployment hostnames. Runs interactively by default, prompting you to select a channel and a hostname. Pass --channel-id and --hostname to skip the prompts. Run projects list to see the available deployment hostnames. If no project is linked, the CLI prints guidance to run projects create instead of failing.
Parameters
Example
domains add
Add a custom domain to the current Native Hosting project. Newly added domains start in a pending verification state; pass --wait to poll until verification completes or times out (5 minutes).
Parameters
Example
domains list
List custom domains for the current Native Hosting project, along with each domain’s verification status.
Parameters
Example
domains status
Show the verification status of a custom domain on the current Native Hosting project. Pass --wait to poll until a pending domain finishes verifying.
Parameters
Example
domains claim
Claim ownership of a custom domain that is currently in use on another store. When you try to add a domain that is already bound to a different store, catalyst domains add prints an ownership-verification TXT record. Publish that record with your DNS provider, then run this command to release the domain from the other store and bind it to your project. If ownership has not yet been verified, the command prints the TXT record again so you can publish it and retry. Pass --wait to poll until the claimed domain finishes verifying.
Parameters
Example
domains transfer
Transfer a custom domain from its current project to another project in the same store. This is the same-store counterpart to catalyst domains claim (which handles domains in use on a different store): when you try to add a domain already bound to another project in your store, catalyst domains add tells you to transfer it. The source is the current (linked) project; the destination is the project you transfer to. Omit --to-project-uuid to pick the destination interactively from your store’s projects. Pass --wait to poll until the transferred domain finishes verifying.
If the domain isn’t found on the current (linked) project, the CLI scans the store’s other projects to find which one actually owns it, then prints the exact domains transfer command to re-run from there — it won’t guess and transfer from the wrong project.
Parameters
Example
domains remove
Remove a custom domain from the current Native Hosting project. If the domain is active (verified), the CLI prompts for confirmation before removing it, since traffic may stop routing to the project. Pass --force to skip the prompt.
Parameters
Example
upgrade
Upgrade your Catalyst project to a newer version by applying a 3-way merge between your project’s base version, your local changes, and the target version. Conflicts are written as standard <<<ours/===/theirs>>> markers — the upgrade never aborts. Run this from inside a Catalyst git repository with a clean working tree (commit or stash local changes first).
Catalyst versions are git tags on the bigcommerce/catalyst repository, not npm packages. Set the GITHUB_TOKEN environment variable to raise the GitHub API rate limit. The command has the aliases up.
If your project’s package.json has no catalyst.ref field and --from isn’t passed, the CLI infers a base version from the package name and version, asks you to confirm it (unless --yes is passed), and — after downloading — warns if the inferred base looks unreliable (less than 50% of its files match your project), suggesting you re-run with --from <correct-version>.
Parameters
Example
telemetry
View or change CLI telemetry collection status (enable, disable, or show current status). Enabling telemetry helps BigCommerce support diagnose and troubleshoot errors.
Parameters
Example
debug
Print a diagnostic report — CLI version, runtime, project state, resolved config, telemetry status, and the presence of key project files — to include when filing a bug report. Credentials, stored environment variables, and CLI/build environment variables are always reported by presence and source only; secret values are never printed.