Skip to content

Support two install paths — make the theme-first (direct download) route first-class #6

Description

@Schmandarine

brmbh should support two ways in, and both should be first-class:

  1. Skill-first — user installs the global brmbh skill, asks their agent for a theme, the skill runs brmbh create. (The skills-first install flow is undocumented — nothing tells users how to install the brmbh skill cli#7)
  2. Theme-first — user downloads/clones this theme directly. An agent working inside it should then get the CLI without the user having to know it exists.

Path 2 is the one that needs design work.

What's already true: the theme does not need the Node CLI

Checked every in-theme skill. None of the AGENTS/*.md skills invoke the brmbh Node CLI. They call:

So a direct clone already works end to end. The Node CLI adds convenience wrappers (brmbh dev, brmbh doctor, brmbh add block, brmbh deploy) over the same scripts, plus the --json envelopes that make those operations agent-legible. Valuable, but not load-bearing.

That reframes the requirement: it is not "the theme is broken without the CLI", it is "an agent gets a better, more deterministic interface when the CLI is there."

Recommendation: declare the CLI as a devDependency, don't have agents install it

The obvious implementation — "agent checks for brmbh, runs npm install -g @brmbh/cli if missing" — has real problems. An agent installing software globally on someone's machine without asking is invasive, needs a permission prompt it will often mishandle, and produces a floating version with no relationship to the theme it is operating on.

Better: add @brmbh/cli to this theme's devDependencies.

"devDependencies": {
  "@brmbh/cli": "^0.1.0",
  
}

Consequences, all good:

  • npm install is already step one of theme setup (and brmbh create runs it automatically). The CLI simply exists afterwards — npx brmbh doctor just works.
  • Nothing is installed globally. Nothing is installed without the user's npm install.
  • The CLI version is pinned per project. Two client sites can sit on different CLI versions without conflict, and a scaffold becomes reproducible — which directly feeds No way to pull improved agent skills into an already-scaffolded site cli#3.
  • The "is it present?" check mostly disappears. If node_modules exists, so does the CLI.

No dependency cycle: the CLI fetches this theme over git, this theme depends on the CLI over npm. Different mechanisms, npm sees no loop.

Still needed: a preflight in the agent contract

AGENTS.md should open with a short precondition block so an agent entering a fresh clone knows what to do:

## Before anything else
1. `node_modules/` missing → run `npm install` (this also installs the brmbh CLI)
2. Then `npx brmbh doctor --json` and branch on `class`
3. `wp-cli` missing → say so; deploy/db/scf skills will not work

doctor already reports exactly these checks, so this is wiring, not new logic.

Tasks

  • Add @brmbh/cli to devDependencies (after brmbh/cli is published — blocked on that)
  • Add the preflight block to AGENTS.md
  • Decide whether in-theme skills should prefer npx brmbh <cmd> over calling tools/*.sh directly, or keep calling the scripts and treat the CLI as optional sugar. Worth deciding explicitly — right now it is neither, by accident.
  • README: document both entry paths, so the direct-download route is visibly supported rather than merely possible

Note

This resolves the open question in #3: a direct git clone is a supported path, so the generated .claude/ .cursor/ .windsurf/ wrappers must stay committed, and need a CI guard to stop them drifting from AGENTS/.

Related: #3, #7, brmbh/cli#3, brmbh/cli#7

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions