Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
c3c6bc4
chore: add initial changeset for @bigcommerce/catalyst
chanceaclark Sep 17, 2025
d5d6eaa
chore: add pre version setup files
chanceaclark Sep 17, 2025
a1baee6
fix: optimize catalyst deployments
chanceaclark Oct 20, 2025
b93b452
rename variables to be prefixed with CATALYST_
jamesqquick Feb 11, 2026
a53ba6e
feat(cli): run build automatically when deploying
matthewvolk Feb 11, 2026
5047a4f
feat(cli): add --prebuilt flag to deploy command (#2874)
matthewvolk Feb 11, 2026
31d5a70
fix(cli): change --secret from variadic to repeatable
matthewvolk Feb 10, 2026
6dfeb4c
feat(cli): map ignition error codes to actionable messages (#2879)
matthewvolk Feb 12, 2026
75cf1be
write and read access token and store hash from project json file
jamesqquick Feb 11, 2026
b536b01
fix linting
jamesqquick Feb 11, 2026
a36e495
fix linting
jamesqquick Feb 11, 2026
7787447
added changeset
jamesqquick Feb 11, 2026
b33f4ac
updated deploy tests to use vitest stubbing for environment variables
jamesqquick Feb 16, 2026
75a8218
check valid options first in deploy command
jamesqquick Feb 16, 2026
e443e10
remove default loading of environment variable files
jamesqquick Feb 11, 2026
fa2a66f
added changeset
jamesqquick Feb 11, 2026
010fe6c
add .bigcommerce directory to core .gitignore file
jamesqquick Feb 16, 2026
c790654
add changeset
jamesqquick Feb 16, 2026
46ae3ca
add comment and new line in gitignore
jamesqquick Feb 16, 2026
a82fa36
remove changeset
jamesqquick Feb 16, 2026
9dc7c8f
feat(cli): add whoami command (#2881)
matthewvolk Feb 16, 2026
30c57e5
feat(cli): add crash reporting with trace ids (#2880)
matthewvolk Feb 16, 2026
b4ee057
feat(cli): add auth login and auth logout commands (#2887)
matthewvolk Feb 17, 2026
9d9b7d6
feat(cli): centralize credential resolution with resolveCredentials u…
matthewvolk Feb 17, 2026
747a972
feat(cli): remove --root-dir flag from project create and link comman…
matthewvolk Feb 19, 2026
50f2433
feat(cli): remove dev command (#2893)
matthewvolk Feb 19, 2026
445ba43
feat(cli): remove next start proxy from start command (#2894)
matthewvolk Feb 19, 2026
2fca759
add --env-file flag allowing user to pass path to environment variabl…
jamesqquick Feb 11, 2026
66533b6
rebase on alpha
jamesqquick Feb 17, 2026
dff0758
added changeset
jamesqquick Feb 11, 2026
08842bc
rename variable to fix linting issue
jamesqquick Feb 16, 2026
8fc765e
fix linting
jamesqquick Feb 16, 2026
80ed808
remove changeset
jamesqquick Feb 16, 2026
9a1cd64
throw error on failed load of env file
jamesqquick Feb 16, 2026
b8f93be
add arg parsing for env path
jamesqquick Feb 18, 2026
50e112b
fix linting
jamesqquick Feb 18, 2026
1449ea1
add tests for --env-path flag
jamesqquick Feb 19, 2026
482413b
fix linting
jamesqquick Feb 19, 2026
783d006
feat(cli): remove framework config and simplify build command (#2895)
matthewvolk Feb 20, 2026
1179593
fix: show readable error when project creation errors with 422 (#2938)
jorgemoya Mar 20, 2026
2365bc2
CATALYST-1718: feat(cli) - Add catalyst logs command (#2921)
jordanarldt Mar 20, 2026
18e44f5
fix(cli): symlink .env.local to .dev.vars before preview (#2944)
matthewvolk Mar 24, 2026
0314b32
fix(cli): pin @opennextjs/cloudflare peer dependency to 1.17.3 (#2949)
matthewvolk Mar 25, 2026
60a2abd
chore: consolidate changesets for alpha release
chanceaclark Mar 26, 2026
3ee7a8b
chore: version @bigcommerce/catalyst@1.0.0-alpha.1
chanceaclark Mar 26, 2026
e0d0785
chore: version @bigcommerce/catalyst@1.0.0-alpha.2
chanceaclark Mar 26, 2026
80cadf6
fix(cli): clean up deployment url output (#2960)
matthewvolk Mar 30, 2026
a7c97ad
refactor(cli): rename "trace id" to "correlation id" (#2962)
matthewvolk Mar 30, 2026
a6582db
feat(cli): auto-detect environment variables as deploy secrets (#2965)
jorgemoya Apr 3, 2026
b157739
chore: add changeset for auto-detect deploy secrets (#2972)
jorgemoya Apr 9, 2026
2d4d7f4
chore: version @bigcommerce/catalyst@1.0.0-alpha.3
jorgemoya Apr 9, 2026
717abb6
feat(cli): add Commander.js built-in help text to all commands (#2984)
chanceaclark Apr 14, 2026
10b6618
fix: update catalyst cli with new client id
chanceaclark Apr 27, 2026
b78770d
feat(cli): LTRAC-612 show global options in subcommand help (#2992)
chanceaclark Apr 28, 2026
8b96d68
LTRAC-444: fix(cli) - Read store hash and access token from project.j…
jorgemoya Apr 30, 2026
4752a13
TRAC-137: Add native hosting option in catalyst CLI (#3003)
jordanarldt May 7, 2026
7c497b2
TRAC-614: Add project delete command to catalyst CLI (#3004)
jordanarldt May 7, 2026
eaa1ec3
build(cli): TRAC-668 bump wrangler to 4.90.0 (#3010)
chanceaclark May 12, 2026
98f6ef4
chore: version @bigcommerce/catalyst@1.0.0-alpha.4
chanceaclark May 12, 2026
4b1618d
feat(cli): show deployment hostnames in project list output (#2988)
jorgemoya May 13, 2026
098a38a
feat(cli): add `channel update` command to update channel site url (#…
jorgemoya May 26, 2026
92db844
fix(cli): remove implicit secret detection from deploy (#3025)
jorgemoya May 26, 2026
bbabe00
feat(cli): make catalyst auth login and project create onboarding int…
jorgemoya May 26, 2026
b883cd8
LTRAC-440: fix(cli) - Autoreconnect log stream when API proxy stalls …
jorgemoya May 27, 2026
0c95153
fix(cli): clean dist directory before each build (#3030)
jorgemoya May 28, 2026
0e396d7
LTRAC-440: ref(cli) - Extract pumpUntilRotation from tailLogs (#3029)
jorgemoya May 29, 2026
16513d3
fix(cli): strip @vercel/otel hook in Commerce Hosting setup (#3028)
jorgemoya Jun 1, 2026
41b22ce
LTRAC-808: fix(cli) - Suppress OpenNext IMAGES binding warning in log…
jorgemoya Jun 3, 2026
11449ad
LTRAC-442: feat(cli) - Persist deployment env vars via `catalyst env`…
jorgemoya Jun 3, 2026
ac86ebd
LTRAC-441: fix(cli) - Surface clear re-auth error on expired token (#…
jorgemoya Jun 4, 2026
f17d3db
LTRAC-808: ref(cli) - Remove IMAGES warning suppression (moved to tai…
jorgemoya Jun 4, 2026
0844861
chore: version @bigcommerce/catalyst@1.0.0-alpha.5
jorgemoya Jun 5, 2026
a9c5da3
LTRAC-873: fix(cli) - Derive Wrangler compatibility_date dynamically …
jorgemoya Jun 11, 2026
eb701b6
LTRAC-908: feat(cli) - Add `catalyst channel link` command (#3051)
jorgemoya Jun 22, 2026
8dfd9c7
LTRAC-911: ref(cli) - Standardize interactive prompts on `@inquirer/p…
jorgemoya Jun 22, 2026
b8006ee
chore: version @bigcommerce/catalyst@1.0.0-alpha.6
jorgemoya Jun 24, 2026
8eeea2b
LTRAC-468: feat(cli) - Replace git clone with tarball extraction in c…
jorgemoya Jun 25, 2026
ba722da
feat: TRAC-924 upgrade: utility helpers and per-file merge engine
chanceaclark Jun 26, 2026
0533f3a
feat: TRAC-925 upgrade: whole-tree merge engine and index staging
chanceaclark Jun 26, 2026
b8af097
feat: TRAC-926 upgrade: CLI command, project resolution, download, an…
chanceaclark Jun 26, 2026
ae53970
TRAC-499: feat - implement query logs in catalyst cli (#3068)
parthshahp Jun 29, 2026
474fc09
LTRAC-910: ref(cli) - Reduce create-catalyst to a thin wrapper over `…
jorgemoya Jun 29, 2026
bac563b
LTRAC-988: Add custom domain command (#3070)
jorgemoya Jun 30, 2026
b929531
LTRAC-989: feat(cli) - List custom domains (#3071)
jorgemoya Jun 30, 2026
d077a89
LTRAC-990: feat(cli) - Show custom domain status (#3072)
jorgemoya Jul 1, 2026
e114507
LTRAC-991: feat(cli) - Remove custom domain (#3073)
jorgemoya Jul 1, 2026
91296ee
chore(cli) - Consolidate CLI changesets into single 1.0.0 release note
jorgemoya Jul 1, 2026
3c99632
chore(cli) - Exit changeset pre mode for stable release
jorgemoya Jul 1, 2026
f9e6fff
fix(cli) - Update program-status copy from alpha to beta
jorgemoya Jul 1, 2026
1a8f688
chore(cli) - Collapse subcommands to top-level groups in 1.0.0 changelog
jorgemoya Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .changeset/catalyst-cli-1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
"@bigcommerce/catalyst": major
---

Introducing the Catalyst CLI (`@bigcommerce/catalyst`) — a single command-line tool for scaffolding, building, and deploying your Catalyst storefront to BigCommerce's Native Hosting infrastructure.

### Highlights

- **Scaffold a storefront** — `catalyst create` downloads a clean, standalone project (flattened from `core/`, `workspace:` dependencies resolved to published versions, fresh git repo) via tarball extraction and connects it to your BigCommerce store. The package manager is auto-detected from `npm_config_user_agent`.
- **Browser-based authentication** — Run `catalyst auth login` to authenticate via an OAuth device code flow. Credentials are stored locally in `.bigcommerce/project.json` for use by all subsequent commands. CI/CD environments can use `--store-hash` and `--access-token` flags or environment variables instead.
- **Project & channel management** — Create, link, and list BigCommerce infrastructure projects with `catalyst project`, and connect storefront channels with `catalyst channel`.
- **Build & deploy** — `catalyst build` runs the OpenNext Cloudflare build pipeline (deriving the Wrangler `compatibility_date` dynamically) and generates deployment artifacts. `catalyst deploy` bundles, uploads, and deploys your storefront with real-time progress streaming. Pass runtime secrets with `--secret KEY=VALUE`; environment variables are auto-detected as deploy secrets.
- **Persisted deployment env vars** — Manage deployment environment variables across deploys with `catalyst env` (list and remove; values are masked).
- **Custom domains** — Add, list, check the status of, and remove custom domains for a Native Hosting project with `catalyst domains`.
- **Local preview** — `catalyst start` launches a local Cloudflare Workers preview of your built storefront via the OpenNext adapter.
- **Live & historical logs** — `catalyst logs tail` streams real-time application logs with color-coded levels and auto-reconnect; `catalyst logs query` retrieves historical logs.
- **In-place upgrades** — `catalyst upgrade` upgrades a project to a newer version via a resilient 3-way merge (`git merge-tree`, falling back to per-file `git merge-file`), producing resolvable conflict markers instead of ever aborting.
- **Smart credential resolution** — Configuration is resolved in priority order: CLI flags → `--env-file` → process environment variables → `.bigcommerce/project.json`.
- **Telemetry** — Anonymous usage telemetry with session and correlation IDs for support. Opt out anytime with `catalyst telemetry disable`.

### Commands

| Command | Description |
|---------|-------------|
| `catalyst create` | Scaffold and connect a Catalyst storefront to your BigCommerce store |
| `catalyst auth` | Authenticate, sign out, and verify stored credentials |
| `catalyst project` | Create, link, and list infrastructure projects |
| `catalyst channel` | Connect a storefront channel to your project |
| `catalyst build` | Build your Catalyst project for deployment |
| `catalyst deploy` | Build and deploy to BigCommerce Native Hosting |
| `catalyst env` | Manage persisted deployment environment variables |
| `catalyst domains` | Manage custom domains for a Native Hosting project |
| `catalyst start` | Start a local Cloudflare Workers preview |
| `catalyst logs` | Stream live logs and query historical logs |
| `catalyst upgrade` | Upgrade a project to a newer version via 3-way merge |
| `catalyst version` | Display CLI, Node.js, and platform info |
| `catalyst telemetry` | View or change telemetry collection status |

### Getting started

```bash
cd core
pnpm add @bigcommerce/catalyst@latest @opennextjs/cloudflare@1.17.3
pnpm catalyst auth login
pnpm catalyst project create
pnpm catalyst deploy --secret BIGCOMMERCE_STORE_HASH=<hash> --secret BIGCOMMERCE_STOREFRONT_TOKEN=<token>
```

For full documentation, see the [Native Hosting Overview](https://developer.bigcommerce.com/docs/storefront/catalyst/deployment/native-hosting/overview) and [CLI Reference](https://developer.bigcommerce.com/docs/storefront/catalyst/reference/cli).
3 changes: 1 addition & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"tag": true
},
"baseBranch": "canary",
"updateInternalDependencies": "patch",
"ignore": ["@bigcommerce/catalyst"]
"updateInternalDependencies": "patch"
}
5 changes: 5 additions & 0 deletions .changeset/ltrac-910-create-catalyst-thin-wrapper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": major
---

Reduce `create-catalyst` to a thin wrapper that delegates to `catalyst create`. `pnpm create catalyst` / `npx create-catalyst` still scaffold a project — now by invoking `@bigcommerce/catalyst` under the hood — so the scaffolding UX is unchanged. The standalone `init`, `integration`, and `telemetry` subcommands are removed; use `catalyst channel link` and `catalyst telemetry` from the consolidated CLI instead.
22 changes: 22 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"mode": "exit",
"tag": "alpha",
"initialVersions": {
"@bigcommerce/catalyst": "1.0.0",
"@bigcommerce/catalyst-core": "1.6.2",
"@bigcommerce/catalyst-client": "1.0.1",
"@bigcommerce/create-catalyst": "1.0.2",
"@bigcommerce/eslint-config-catalyst": "1.0.0"
},
"changesets": [
"alpha-release-notes",
"auto-detect-deploy-secrets",
"cli-built-in-help-text",
"cli-dynamic-compat-date",
"cli-show-env-path-in-help",
"cli-strip-instrumentation-hook",
"fix-env-var-names",
"project-list-deployed-url",
"wise-worms-hear"
]
}
3 changes: 3 additions & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ build-config.json
# OpenNext
.open-next
.wrangler

# Catalyst CLI config
.bigcommerce
96 changes: 96 additions & 0 deletions packages/catalyst/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Catalyst CLI (`@bigcommerce/catalyst`)

CLI tool for Catalyst development and deployment — handles build, dev server, and deployment to Cloudflare Workers.

## Directory Structure

```
src/cli/
├── index.ts # Entry point (#!/usr/bin/env node)
├── program.ts # Commander program setup, registers all commands
├── commands/ # CLI command implementations (auth, build, deploy, logs, project, start, telemetry, version)
├── hooks/ # Pre/post action hooks (telemetry)
└── lib/ # Utilities (auth, logger, project config, credentials, wrangler config, telemetry, deployment errors)
templates/ # OpenNext config and public_headers template
tests/mocks/ # MSW handlers and test mocks
dist/cli.js # Bundled output (single ESM file)
```

## CLI Commands

| Command | Description |
|---------|-------------|
| `auth whoami/login/logout` | Manage authentication (device code OAuth flow, credential storage) |
| `build` | Build Catalyst project using OpenNext/Cloudflare adapter |
| `deploy` | Deploy to Cloudflare with bundle upload |
| `logs` | View logs (`tail` default, `query` planned). Supports `--format` (default/json/pretty/short/request) |
| `project create/list/link` | Manage BigCommerce infrastructure projects |
| `start` | Start local preview using OpenNext Cloudflare adapter |
| `telemetry` | Enable/disable/check telemetry |
| `version` | Display version and platform info |

## Development

```bash
pnpm dev # Watch mode (rebuilds dist/cli.js on changes)
pnpm build # Production build via tsup
pnpm test # Run tests (vitest)
pnpm test:watch # Watch mode tests
pnpm typecheck # tsc --noEmit
pnpm lint # eslint with 0 warnings threshold
```

## Testing Changes

To test CLI changes directly without a full publish cycle, build the CLI package first, then run the compiled output from inside the `core/` directory using its absolute path:

```bash
# From packages/catalyst — rebuild the CLI
pnpm build

# From core/ — run the CLI using the absolute path to the built output
pnpm exec <repo-root>/packages/catalyst/dist/cli.js <command>
```

For example: `pnpm exec <repo-root>/packages/catalyst/dist/cli.js project list`.

## Build

- **Bundler**: tsup (`tsup.config.ts`)
- **Entry**: `src/cli/index.ts` → `dist/cli.js` (single ESM bundle with source maps)
- **Environment variables** injected at build time: `CLI_SEGMENT_WRITE_KEY`, `CONSOLA_LEVEL`

## Testing

- **Framework**: Vitest (`vitest.config.ts`)
- **Coverage threshold**: 100% (strict)
- **Mocking**: MSW for BigCommerce API calls; telemetry always disabled in tests (`vitest.setup.ts`)
- **Test files**: co-located as `*.spec.ts` next to source files

## Key Dependencies

- `commander` — CLI framework
- `execa` — process execution (next, pnpm, wrangler)
- `consola` — logging
- `zod` — API response validation
- `conf` — persistent config (`.bigcommerce/project.json`)
- `@segment/analytics-node` — telemetry
- `adm-zip` — bundle zipping for deploy

## After Making Changes

Always run `pnpm typecheck` and `pnpm lint` after making code changes, and fix any errors or warnings before considering the work done. The lint config enforces zero warnings (`--max-warnings 0`). Use `pnpm lint --fix` to auto-fix formatting and fixable lint issues before manually editing.

## Code Style Notes

- **No `let` when avoidable** — prefer `const` with `while (true)` + `break` over mutable flags.
- **No iterators/generators** — eslint `no-restricted-syntax` disallows `for...of` and generator functions. Use `.forEach()`, `.map()`, etc.
- **Consola for logging** — use `consola` (from `../lib/logger`) instead of `console`. Use `colorize` from `consola/utils` for colored output.
- **Shared CLI options** — commands that need `--store-hash`, `--access-token`, `--api-host`, and `--project-uuid` should use the shared option factories from `lib/shared-options.ts`. Chain `.makeOptionMandatory()` inline where needed to preserve commander's extra-typings inference.
- **SSE stream pattern** — the fetch API's `ReadableStreamDefaultReader` doesn't support async iteration, so `while (true)` + `reader.read()` + `break` is the standard pattern. For long-lived streams, implement a TTL-based reconnect to free connection pool resources, and distinguish server-side disconnects (`TypeError: terminated`) from actual failures for retry logic.

## Integration Points

- **BigCommerce Infrastructure API**: `https://api.bigcommerce.com/stores/{storeHash}/v3/infrastructure/`
- **Next.js**: dev/build/start
- **OpenNext + Cloudflare**: serverless build and deploy via Wrangler
89 changes: 89 additions & 0 deletions packages/catalyst/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# @bigcommerce/catalyst

## 1.0.0-alpha.6

### Patch Changes

- [#3061](https://github.com/bigcommerce/catalyst/pull/3061) [`eea1355`](https://github.com/bigcommerce/catalyst/commit/eea135543423dc0d50d6bff68d93f1548e54e096) Thanks [@jorgemoya](https://github.com/jorgemoya)! - `catalyst build` now derives the Cloudflare Workers `compatibility_date` dynamically (current date minus one month) instead of using a pinned date, keeping the build-time runtime semantics aligned with what the deployment service applies at deploy time.

## 1.0.0-alpha.5

### Minor Changes

- [#2988](https://github.com/bigcommerce/catalyst/pull/2988) [`24f35a4`](https://github.com/bigcommerce/catalyst/commit/24f35a4cc60d73036c264a896e816b98aa47bfba) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Show every deployed URL for each project in `catalyst project list` output (the canonical hostname plus any vanity hostnames) so users can recover the hosted storefront URLs without having to redeploy.

### Patch Changes

- [#3028](https://github.com/bigcommerce/catalyst/pull/3028) [`bdc6e0b`](https://github.com/bigcommerce/catalyst/commit/bdc6e0bf055262e1440bcc1ebcc55597256b424a) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Remove `core/instrumentation.ts` and the `@vercel/otel` dependency during Commerce Hosting setup. The hook isn't compatible with the OpenNext + Cloudflare Workers bundling path and caused a "Failed to prepare server" error on every cold start in `catalyst logs tail`. Self-hosted (non-Commerce Hosting) deployments are unaffected.

## 1.0.0-alpha.4

### Patch Changes

- [`de04f42`](https://github.com/bigcommerce/catalyst/commit/de04f42696b30b675bec2625eefa1e825b4a97ba) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Add built-in help text to all CLI commands so `catalyst <command> --help` is the canonical reference.

- [`e740158`](https://github.com/bigcommerce/catalyst/commit/e7401583603aae85d4adef23b4b72eeb96e11907) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Show the global `--env-path` option in every subcommand's `--help` output.

- [`e5b4dee`](https://github.com/bigcommerce/catalyst/commit/e5b4dee1fc108d648b6110707b572c1fc9bc2e7c) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Update the CLI with the new client id.

## 1.0.0-alpha.3

### Minor Changes

- [#2972](https://github.com/bigcommerce/catalyst/pull/2972) [`e681933`](https://github.com/bigcommerce/catalyst/commit/e681933ebbe798198e4c1b8f6f20f67dc4ec36ad) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Auto-detect environment variables as deploy secrets.

## 1.0.0-alpha.2

### Patch Changes

- Fix CLI environment variable resolution for `deploy`, `build`, and `project` commands. The published dist was using stale `BIGCOMMERCE_*` env var names instead of the correct `CATALYST_*` names (`CATALYST_STORE_HASH`, `CATALYST_ACCESS_TOKEN`, `CATALYST_PROJECT_UUID`).

## 1.0.0-alpha.1

### Major Changes

- Introducing the Catalyst CLI (`@bigcommerce/catalyst`) — a command-line tool for building and deploying your Catalyst storefront to BigCommerce's Native Hosting infrastructure.

### Highlights
- **Browser-based authentication** — Run `catalyst auth login` to authenticate via an OAuth device code flow. Credentials are stored locally in `.bigcommerce/project.json` for use by all subsequent commands. CI/CD environments can use `--store-hash` and `--access-token` flags or environment variables instead.
- **Project management** — Create, link, and list BigCommerce infrastructure projects with `catalyst project create`, `catalyst project link`, and `catalyst project list`.
- **Build & deploy** — `catalyst build` runs the OpenNext Cloudflare build pipeline and generates deployment artifacts. `catalyst deploy` bundles, uploads, and deploys your storefront with real-time progress streaming. Pass runtime secrets with `--secret KEY=VALUE`.
- **Local preview** — `catalyst start` launches a local Cloudflare Workers preview of your built storefront via the OpenNext adapter.
- **Live log tailing** — `catalyst logs tail` streams real-time application logs from your deployed storefront with color-coded log levels and multiple output formats.
- **Smart credential resolution** — Configuration is resolved in priority order: CLI flags → `--env-file` → process environment variables → `.bigcommerce/project.json`.
- **Telemetry** — Anonymous usage telemetry with session and correlation IDs for support. Opt out anytime with `catalyst telemetry disable`.

### Commands

| Command | Description |
| ------------------------- | ------------------------------------------------- |
| `catalyst auth login` | Authenticate via browser OAuth flow |
| `catalyst auth logout` | Remove stored credentials |
| `catalyst auth whoami` | Verify credentials and display store/project info |
| `catalyst project create` | Create a new infrastructure project |
| `catalyst project link` | Link to an existing infrastructure project |
| `catalyst project list` | List infrastructure projects for your store |
| `catalyst build` | Build your Catalyst project for deployment |
| `catalyst deploy` | Build and deploy to BigCommerce Native Hosting |
| `catalyst start` | Start a local Cloudflare Workers preview |
| `catalyst logs tail` | Stream live logs from your deployment |
| `catalyst version` | Display CLI, Node.js, and platform info |
| `catalyst telemetry` | View or change telemetry collection status |

### Getting started

```bash
cd core
pnpm add @bigcommerce/catalyst@alpha @opennextjs/cloudflare@1.17.3
pnpm catalyst auth login
pnpm catalyst project create
pnpm catalyst deploy --secret BIGCOMMERCE_STORE_HASH=<hash> --secret BIGCOMMERCE_STOREFRONT_TOKEN=<token>
```

For full documentation, see the [Native Hosting Overview](https://developer.bigcommerce.com/docs/storefront/catalyst/deployment/native-hosting/overview) and [CLI Reference](https://developer.bigcommerce.com/docs/storefront/catalyst/reference/cli).

## 1.0.0-alpha.0

### Major Changes

- [`acee114`](https://github.com/bigcommerce/catalyst/commit/acee114ca0ee7428e33b1db28a5b3b18914cde4b) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Alpha version of the CLI
35 changes: 34 additions & 1 deletion packages/catalyst/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
# @bigcommerce/catalyst

CLI
CLI tool for Catalyst development and deployment.

## Developing the CLI

You'll need two terminal windows:

### Terminal 1 — Watch mode (rebuilds on changes)

```bash
cd packages/catalyst
pnpm dev
```

This runs `tsup --watch` and rebuilds `dist/cli.js` on every source change.

### Terminal 2 — Run the CLI

From the `core/` directory, run the CLI using the absolute path to the built executable:

```bash
cd core
pnpm exec <repo-root>/packages/catalyst/dist/cli.js <command>
```

For example:

```bash
pnpm exec <repo-root>/packages/catalyst/dist/cli.js project list
pnpm exec <repo-root>/packages/catalyst/dist/cli.js logs tail
pnpm exec <repo-root>/packages/catalyst/dist/cli.js logs query --start 2026-06-01T00:00:00Z --end 2026-06-02T00:00:00Z
pnpm exec <repo-root>/packages/catalyst/dist/cli.js deploy
```

Replace `<repo-root>` with the absolute path to your local clone of the `catalyst` repository.
18 changes: 14 additions & 4 deletions packages/catalyst/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bigcommerce/catalyst",
"version": "0.1.0",
"version": "1.0.0-alpha.6",
"type": "module",
"bin": {
"catalyst": "dist/cli.js"
Expand All @@ -9,7 +9,6 @@
"dist",
"templates"
],
"private": true,
"scripts": {
"dev": "tsup --watch",
"typecheck": "tsc --noEmit",
Expand All @@ -23,21 +22,32 @@
"node": "^20.0.0 || ^22.0.0 || ^24.0.0"
},
"dependencies": {
"@commander-js/extra-typings": "^14.0.0",
"@inquirer/prompts": "^7.5.3",
"@segment/analytics-node": "^2.2.1",
"adm-zip": "^0.5.16",
"commander": "^14.0.0",
"conf": "^13.1.0",
"consola": "^3.4.2",
"cross-spawn": "^7.0.6",
"dotenv": "^16.5.0",
"execa": "^9.6.0",
"fs-extra": "^11.3.0",
"lodash.kebabcase": "^4.1.1",
"nypm": "^0.5.4",
"open": "^10.1.0",
"std-env": "^3.9.0",
"tar": "^7.5.7",
"yocto-spinner": "^1.0.0",
"zod": "^4.0.5"
},
"devDependencies": {
"@bigcommerce/eslint-config": "^2.11.0",
"@bigcommerce/eslint-config-catalyst": "workspace:^",
"@commander-js/extra-typings": "^14.0.0",
"@types/adm-zip": "^0.5.7",
"@types/cross-spawn": "^6.0.6",
"@types/fs-extra": "^11.0.4",
"@types/lodash.kebabcase": "^4.1.9",
"@types/node": "^22.15.30",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
Expand All @@ -49,6 +59,6 @@
"vitest": "^3.2.4"
},
"peerDependencies": {
"@opennextjs/cloudflare": "^1.8.0"
"@opennextjs/cloudflare": "1.17.3"
}
}
Loading
Loading