For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
  • Overview
    • Quick Start
    • Sandboxes
    • Tools & SDKs
    • Support
  • Docs
      • Getting Started
        • Overview
          • Client
          • CLI
          • Testing
          • Wishlists
          • Security
    • Archive
    • Closed Beta Programs
Dev Portal
LogoLogo
On this page
  • Global options
  • version
  • Parameters
  • Example
  • create
  • Parameters
  • Example
  • auth login
  • Parameters
  • Example
  • auth logout
  • Parameters
  • Example
  • auth whoami
  • Parameters
  • Example
  • start
  • Parameters
  • Example
  • build
  • Parameters
  • Example
  • deploy
  • Parameters
  • Example
  • logs tail
  • Parameters
  • Example
  • project create
  • Parameters
  • Example
  • project link
  • Parameters
  • Example
  • project list
  • Parameters
  • Example
  • project delete
  • Parameters
  • Example
  • telemetry
  • Parameters
  • Example
DocsStorefrontCatalystReference

Catalyst CLI

Pre-release
Was this page helpful?
Previous

Client

Next

Testing

Built with

The Catalyst CLI and Native Hosting are currently in closed alpha. There may be breaking changes as we finalize the API. To express interest in gaining access, fill out the Native Hosting Closed Alpha 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:

Global options

These options can be used with any Catalyst CLI command.

OptionDescription
--env-path <path>Path to an environment file to load (resolved relative to the current working directory). The file is loaded before the command runs, and its variables override anything already present in process.env. If the file does not exist or cannot be parsed, the command exits with an error.

version

Display detailed version information (CLI version, Node version, and platform).

Parameters

This command does not accept any parameters.

Example

$pnpm catalyst version

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

ParameterRequiredDescription
--project-name <name>NoName of your Catalyst project. Used as the directory name and display name.
--project-dir <dir>NoDirectory in which to create the project. Defaults to the current working directory.
--store-hash <hash>NoThe BigCommerce store hash (found in the URL of your store’s Control Panel). Can also be set via CATALYST_STORE_HASH.
--access-token <token>NoYour BigCommerce access token. Can also be set via CATALYST_ACCESS_TOKEN.
--channel-id <id>NoBigCommerce channel ID to connect the storefront to.
--storefront-token <token>NoBigCommerce Storefront API token.
--hosting <mode>NoHosting mode: self-hosted (default) or commerce. Use commerce to set up the project for Native Hosting.
--use-existingNoWhen used with --hosting commerce and --project-name, reuses an existing infrastructure project instead of prompting to create one.
--gh-ref <ref>NoClone a specific Git ref from the source repository. Defaults to @bigcommerce/catalyst-core@latest.
--repository <repo>NoGitHub repository to clone from. Defaults to bigcommerce/catalyst.
--env <KEY=VALUE>NoSet an arbitrary environment variable in .env.local. Can be repeated to set multiple variables.

Example

$# Interactive setup (prompts for all required values)
$pnpm catalyst create
$# Self-hosted setup with explicit credentials
$pnpm catalyst create --project-name my-store --store-hash <STORE_HASH> --access-token <ACCESS_TOKEN>
$# Native Hosting setup
$pnpm catalyst create --project-name my-store --hosting commerce --store-hash <STORE_HASH> --access-token <ACCESS_TOKEN>

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.

If you are already logged in, the CLI will display your current credentials and suggest running catalyst auth logout to re-authenticate.

Parameters

ParameterRequiredDescription
--store-hash <hash>NoThe BigCommerce store hash. When provided along with --access-token, skips the browser flow entirely and stores the credentials directly. Can also be set via CATALYST_STORE_HASH.
--access-token <token>NoYour BigCommerce access token. When provided along with --store-hash, skips the browser flow entirely. Can also be set via CATALYST_ACCESS_TOKEN.

Example

$# Login via browser (recommended)
$pnpm catalyst auth login
$# Login with existing credentials (skips browser flow)
$pnpm catalyst auth login --store-hash <STORE_HASH> --access-token <ACCESS_TOKEN>

auth logout

Remove stored credentials for the current project.

Parameters

This command does not accept any parameters.

Example

$pnpm catalyst auth logout

auth whoami

Verify your stored credentials and display information about the authenticated store and linked project.

Parameters

ParameterRequiredDescription
--store-hash <hash>NoThe BigCommerce store hash (found in the URL of your store’s Control Panel). Can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoYour BigCommerce access token. Can also be set via the CATALYST_ACCESS_TOKEN environment variable or .bigcommerce/project.json.

Example

$pnpm catalyst auth whoami

Example output:

Logged in to My Store (abc123), connected to project my-project (43eba682-0c48-11f1-9bd5-827a48b0ce1e)

If no credentials are found, the command exits with a “not logged in” message.


start

Start a local preview of your Catalyst storefront using OpenNext/Cloudflare. Requires a successful catalyst build first.

Parameters

This command does not accept any parameters.

Example

$pnpm catalyst start

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

ParameterRequiredDescription
--project-uuid <uuid>NoThe UUID of the project to include in the deployment configuration. Required for Native Hosting builds but can also be set via CATALYST_PROJECT_UUID or the .bigcommerce/project.json file.

Example

$pnpm catalyst build

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. Requires a linked project (via project link) if not passing --project-uuid.

Parameters

ParameterRequiredDescription
--store-hash <hash>NoThe BigCommerce store hash (found in the URL of your store’s Control Panel). Can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoYour BigCommerce access token. Can also be set via the CATALYST_ACCESS_TOKEN environment variable or .bigcommerce/project.json.
--project-uuid <uuid>NoThe UUID of the project to deploy to. Can also be set via the CATALYST_PROJECT_UUID environment variable or .bigcommerce/project.json.
--secret <KEY=VALUE>NoA runtime secret variable for the deployed project. Can be passed multiple times. You must supply all required runtime secrets either via --secret or as environment variables.
--prebuiltNoSkips the build step. Requires .bigcommerce/dist/ to already contain build output.
--dry-runNoGenerate the bundle without uploading or deploying.

Example

$pnpm catalyst deploy --secret BIGCOMMERCE_STORE_HASH=<YOUR_STORE_HASH> --secret BIGCOMMERCE_STOREFRONT_TOKEN=<YOUR_STOREFRONT_TOKEN>

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

Parameters

ParameterRequiredDescription
--store-hash <hash>NoThe BigCommerce store hash (found in the URL of your store’s Control Panel). Can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoYour BigCommerce access token. Can also be set via the CATALYST_ACCESS_TOKEN environment variable or .bigcommerce/project.json.
--project-uuid <uuid>NoThe project UUID. Can also be set via an environment variable named CATALYST_PROJECT_UUID or the .bigcommerce/project.json file.
--format <format>NoOutput format for log events. Choices: json, pretty, default, short, request. Defaults to default.
--api-host <host>NoAPI host to connect to. Defaults to api.bigcommerce.com.

The available formats are:

  • default — [timestamp] [LEVEL] message
  • short — message only
  • request — [timestamp] [LEVEL] METHOD URL (status_code) message
  • json — raw JSON output
  • pretty — pretty-printed JSON

Example

$pnpm catalyst logs tail
$# Tail logs with request format
$pnpm catalyst logs tail --format request
$# Tail logs as raw JSON (useful for piping to other tools)
$pnpm catalyst logs tail --format json

project create

Create a new BigCommerce infrastructure project and link it to your local Catalyst project. The project UUID is written to .bigcommerce/project.json.

Parameters

ParameterRequiredDescription
--store-hash <hash>NoThe BigCommerce store hash (found in the URL of your store’s Control Panel). Can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoYour BigCommerce access token. Can also be set via the CATALYST_ACCESS_TOKEN environment variable or .bigcommerce/project.json.

Example

$# Create a project (prompts for project name)
$pnpm catalyst project create
$# Create a project and pass store hash and access token
$pnpm catalyst project create --store-hash <STORE_HASH> --access-token <ACCESS_TOKEN>

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

Parameters

ParameterRequiredDescription
--store-hash <hash>NoBigCommerce store hash (found in the URL of your store Control Panel). If not passing --project-uuid, can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoBigCommerce access token (from a store-level API account). If not passing --project-uuid, can also be set via the CATALYST_ACCESS_TOKEN environment variable.
--project-uuid <uuid>NoBigCommerce infrastructure project UUID. Use this to link directly without fetching projects. Either this or both --store-hash and --access-token must be provided.

Example

$# Link using a project UUID directly
$pnpm catalyst project link --project-uuid <UUID>
$# Link by fetching projects (prompts to select or create)
$pnpm catalyst project link --store-hash <STORE_HASH> --access-token <ACCESS_TOKEN>

project list

List BigCommerce infrastructure projects for your store. The currently linked project is highlighted.

Parameters

ParameterRequiredDescription
--store-hash <hash>NoBigCommerce store hash (found in the URL of your store Control Panel). Can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoBigCommerce access token (from a store-level API account). Can also be set via the CATALYST_ACCESS_TOKEN environment variable or .bigcommerce/project.json.

Example

$pnpm catalyst project list
$# List projects by passing store hash and access token
$pnpm catalyst project list --store-hash <STORE_HASH> --access-token <ACCESS_TOKEN>

project 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

ParameterRequiredDescription
--store-hash <hash>NoThe BigCommerce store hash (found in the URL of your store’s Control Panel). Can also be set via the CATALYST_STORE_HASH environment variable or .bigcommerce/project.json.
--access-token <token>NoYour BigCommerce access token. Can also be set via the CATALYST_ACCESS_TOKEN environment variable or .bigcommerce/project.json.
--project-uuid <uuid>NoUUID of the project to delete. If omitted, the CLI prompts you to select from available projects. Can also be set via CATALYST_PROJECT_UUID or the .bigcommerce/project.json file.
--forceNoSkip the confirmation prompt before deleting. Use with caution.

Example

$# Delete a project (prompts for selection and confirmation)
$pnpm catalyst project delete
$# Delete a specific project by UUID
$pnpm catalyst project delete --project-uuid <UUID>
$# Delete without confirmation prompt
$pnpm catalyst project delete --project-uuid <UUID> --force

telemetry

View or change CLI telemetry collection status (enable, disable, or show current status). Enabling telemetry helps BigCommerce support diagnose and troubleshoot errors.

Parameters

ParameterRequiredDescription
[arg]NoSubcommand. Choices: disable, enable, status. Can also be omitted to show status.
--enableNoEnables CLI telemetry collection. Conflicts with --disable.
--disableNoDisables CLI telemetry collection.

Example

$# Show telemetry status
$pnpm catalyst telemetry
$# Enable telemetry collection
$pnpm catalyst telemetry enable
$# Disable telemetry collection
$pnpm catalyst telemetry --disable