CLI for scaffolding and managing bermooda ecommerce shops.
Package: @bermooda/cli
Command: bermooda
Design document: DESIGN.md (implementation handoff for agents).
npm i -g @bermooda/cli@latestFrom this repo (development):
npm install
npm link
bermooda version --clibermooda install --local --dir ./my-shop -y \
--admin-email admin@example.com \
--admin-password 'TestPass123!' \
--store-name 'Demo Shop'
cd my-shop
bermooda devOffline / local app checkout (skip npm download):
bermooda install --local --source /path/to/bermooda --dir ./my-shop -y \
--admin-email admin@example.com \
--admin-password 'TestPass123!' \
--store-name 'Demo Shop'Fork and clone bermooda/bermooda, then
run setup inside that checkout (installs deps prerequisites, Prisma, and the
default theme via npm run extensions:install):
git clone https://github.com/<you>/bermooda.git
cd bermooda
npm install
npm run setupDo not use bermooda install for platform contribution — that scaffolds a
merchant shop from the published app package.
| Command | Description |
|---|---|
bermooda install [--local|--server] |
Download app, deps, env, DB, admin, store |
bermooda update |
Update shop to latest app version (git ff-only or tarball merge) |
bermooda plugin add|update|remove|list|help |
Manage app/plugins/* |
bermooda theme add|update|remove|list|help |
Manage app/themes/* |
bermooda mcp init |
Write Cursor MCP config for this shop |
bermooda dev |
Dev server (no 1Password op run) |
bermooda start |
Production server (builds if build/ missing) |
bermooda version [--cli|--shop] |
Versions |
bermooda upgrade |
Upgrade this CLI globally |
bermooda help [command] |
Help |
Global flags: --cwd, -y / --yes, --json, --verbose.
| Flag | Description |
|---|---|
--local / --server |
Install profile (SQLite vs PostgreSQL defaults) |
--dir <path> |
Target directory |
--source <path> |
Local bermooda app checkout (skip network) |
--ref <tag|branch> |
App git ref (default: bermooda@latest from npm) |
--admin-email, --admin-password, --store-name |
Bootstrap credentials |
--skip-deps, --skip-db |
Skip npm install or migrate/seed |
--force, --force-env |
Non-empty dir / overwrite .env |
--with-demo |
Include demo catalog on server installs |
Default: install from an npm package name (official @bermooda/* packages and third-party):
bermooda plugin add @bermooda/plugin-subscriptions
bermooda theme add @bermooda/theme-paper
bermooda plugin add @bermooda/plugin-subscriptions 1.2.0Alternate sources:
bermooda plugin add my-plugin --path ./packages/my-plugin
bermooda plugin add my-plugin --git https://github.com/org/plugin.git#v1
bermooda plugin add my-plugin --tarball https://example.com/plugin.tgz
bermooda theme listIf the npm package is not found, the CLI falls back to the bermooda registry
(when configured). Registry URL: BERMOODA_REGISTRY_URL or builtin stub.
plugin add|update and theme add|update install an extension's own
dependencies into app/<plugins|themes>/<folder>/node_modules with
npm install --ignore-scripts, so dependency preinstall / postinstall
scripts don't run third-party code with your environment. Opt in with
BERMOODA_EXTENSION_INSTALL_SCRIPTS: 1 / true / all for every extension,
or a comma list of <kind>/<folder>:
BERMOODA_EXTENSION_INSTALL_SCRIPTS=plugins/resend bermooda plugin add @bermooda/plugin-resendAn extension can't opt itself in. The shop's own npm run build uses the same
variable. peerDependencies and bermooda.dependencies merge into the shop's
package.json and install at the shop root with scripts on, since native addons
belong there.
Plugins and themes must declare a semver range in package.json under the
bermooda object:
{
"bermooda": {
"id": "my-plugin",
"engine": ">=1.0.0"
}
}On plugin add|update and theme add|update, the CLI compares this range
against the shop root package.json version. Incompatible packages are
rejected before install (exit code 1). The shop must declare a valid semver
version field.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | User / project error |
| 2 | Network / download |
| 3 | Dependency install |
| 4 | Database / bootstrap |
| 130 | Interrupted |
- Node.js ≥ 22.22.0 for the CLI. Shops that run on the Remix v3 server (they have a
server.js) need Node.js ≥ 24.3;bermooda devdetects which kind a shop is - Network access to GitHub for remote
install/update(unless--source) gitandtarrecommended- Shop bootstrap uses app
scripts/cli-bootstrap.mjswhen present (admin +shopName+ optional minimal seed)
npm install
npm test # vitest run
npm run test:watch # vitest watch mode
npm run lint # oxlint + oxfmt --check
npm run fmt # oxfmt (write)
npm link
bermooda version --cliUnit tests live under test/ and cover project detection, env generation, registry
resolve, plugin install safety, non-git update merge, bootstrap env wiring, and
command helpers.
Lint/format config matches the app repo (.oxlintrc.json, .oxfmtrc.json).
Releases are automated with
release-please (no local
semantic-release dependencies). Conventional Commits on master drive the
version bump; merging the release PR publishes.
-
Use Conventional Commits in PR commits (or the squash merge subject). Agents must follow AGENTS.md and
.cursor/rules/conventional-commits.mdc. Bump rules:Commit type Release fix:,perf:,revert:patch feat:minor BREAKING CHANGE:/feat!:/ …major chore:,docs:,ci:,test:, …none -
Merge to
master..github/workflows/publish.ymlruns release-please-action, which opens or updates a release PR that bumpspackage.json/package-lock.jsonandCHANGELOG.md. -
Merge the release PR. The same workflow then:
- tags
vX.Y.Zand creates a GitHub Release - runs tests and publishes
@bermooda/clivia npm trusted publishing (OIDC)
- tags
No manual npm version or --follow-tags push. No NPM_TOKEN secret;
provenance is published automatically. You can also run the workflow manually
via Actions → Publish → Run workflow (useful to refresh the release PR).
On the package settings page (npmjs.com/package/@bermooda/cli → Settings → Trusted Publisher):
| Field | Value |
|---|---|
| Organization / user | bermooda |
| Repository | cli |
| Workflow filename | publish.yml |
| Allowed action | npm publish |
Optional: after the first OIDC publish succeeds, set publishing access to Require two-factor authentication and disallow tokens, then revoke any old automation tokens.
- App: https://github.com/bermooda/bermooda
- Product checklist:
docs/cli-specs.mdin the app repo - Design: DESIGN.md
- Full plugin marketplace UI / remote registry with many packages
- Enabling plugins via live HTTP admin API
- Docker/Fly deploy automation
MIT