Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ jobs:
node-version: 22
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run check
- run: npm test
- run: npm publish --provenance --access public --tag next
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,49 +71,48 @@ A code can carry a branch or tag: `-m core-tools#dev,method#dev` installs both f

### Your own modules

`--modules` also takes the folder of a module that is not on the list: anything with a `/` is a source the skills CLI can install from, such as `acme/our-modules/skills/widgets`, `acme/our-modules/skills/widgets#dev`, a git URL or a local path (`./widgets`, made absolute against the folder you run from). It installs whole, like the listed modules, to the agents you pick: `npx bmad-method install -m method,acme/our-modules/skills/widgets`. The folder must hold the module's record and its skills; the `bmad` skill reads the record on its next `bmad setup`. `update` re-adds it from the source and ref the project's `skills-lock.json` recorded for its record, so a module installed with `npx skills add` updates the same way.
`--modules` also takes the folder of a module that is not on the list: anything with a `/` is a source the skills CLI can install from, such as `acme/our-modules/skills/widgets`, `acme/our-modules/skills/widgets#dev`, a git URL or a local path (`./widgets`, made absolute against the folder you run from). It installs whole, like the listed modules, to the agents you pick: `npx bmad-method install -m method,acme/our-modules/skills/widgets`. The folder must hold the module's record and its skills; the BMad Agent reads the record on its next `bmad setup`. `update` re-adds it from the source and ref the project's `skills-lock.json` recorded for its record, so a module installed with `npx skills add` updates the same way.

A 6.12 flag this installer dropped prints one line about it, then exits without installing.

## What the summary tells you

The summary names the project, the modules with their version and the coding agents, and asks you to open your coding agent there and tell it to run `bmad setup`. Setup asks the configuration questions, finishes the install, and shows each module's message about where to start. Configuration and customization belong to the `bmad` skill from then on; this installer never asks those questions. Anything that failed is listed above the summary. Below it are the update command, the command that repeats the install without prompts, and links to the blog, GitHub, Discord, YouTube and bmadcode.com.
The summary names the project, the modules with their version and the coding agents, and asks you to open your coding agent there and tell it to run `bmad setup`. Setup asks the configuration questions, finishes the install, and shows each module's message about where to start. Configuration and customization belong to the BMad Agent from then on; this installer never asks those questions. Anything that failed is listed above the summary. Below it are the update command, the command that repeats the install without prompts, and links to the blog, GitHub, Discord, YouTube and bmadcode.com.

## Updating

Three routes: ask the `bmad` skill, run `npx bmad-method update`, or run `npx skills update`.
Three routes: ask the BMad Agent, run `npx bmad-method update`, or run `npx skills update`.

`npx bmad-method update` re-adds each installed module whole, one `npx skills add <owner/repo/folder> -s '*'` per module, to the agents whose folder in the project already holds BMad. A module installed from a branch or tag stays on it. It then prints the summary and any migrations for the version jump. A module that is not on the list, installed with `--modules <folder>` or `npx skills add`, is re-added from the source and ref the project's `skills-lock.json` recorded for its record. One it cannot place, such as a well-known skill, is named; `npx skills update` covers it, one skill and one clone at a time. A module re-added this way gets back any skill removed from it by hand.

After adding or updating any skill by any route, ask the `bmad` skill to update. Only it reconciles what is installed.
After adding or updating any skill by any route, ask the BMad Agent to update. Only it reconciles what is installed.

## Removing

`npx skills remove` removes skills. This installer has no uninstall command and never removes anything.
Ask the BMad Agent to remove a module (it previews every affected skill folder, lock entry, and `_bmad/<code>/`, and preserves `_bmad/custom/`), or run `npx skills remove` for individual skills. This installer has no uninstall command and never removes anything.

## Installing with the skills CLI directly

If you install with the skills CLI directly, ours or your own, install a module from its folder: `npx skills add bmad-code-org/BMAD-METHOD/skills/method --skill '*'` installs BMad Method, record included. Core tools (`skills/core-tools`) hold the `bmad` skill, so install them first. A module is its record skill plus the skills that record lists. The record is a `bmod-<code>` skill, or, for a module of one skill, that skill itself. A record without its skills, or skills without their record, is a partial install: the `bmad` skill cannot see or run it. `npx bmad-method status` lists missing records and unmet requirements.
If you install with the skills CLI directly, ours or your own, install a module from its folder: `npx skills add bmad-code-org/BMAD-METHOD/skills/method --skill '*'` installs BMad Method, record included. Core tools (`skills/core-tools`) hold the `bmad` skill, so install them first. A module is its record skill plus the skills that record lists. The record is a `bmod-<code>` skill, or, for a module of one skill, that skill itself. A record without its skills, or skills without their record, is a partial install: the BMad Agent cannot see or run it. `npx bmad-method status` lists missing records and unmet requirements.

## Troubleshooting

- `status` and `update` take 5 to 10 seconds. The `bmad` skill's setup script reads each module's record from GitHub on every call.
- `npx skills update` currently skips the `bmad` skill because BMAD-METHOD ships a second `bmad` SKILL.md in a test fixture.
- `status` and `update` take a few seconds. The `bmad` skill's setup script reads each module's record from GitHub in parallel on every call.
- `npx skills update` re-adds skills without the agent list, so it can add agents whose folders happen to be in the project. `npx bmad-method update` passes the agents already holding BMad.
- Symlink errors on Windows: add `--copy`.
- `--debug` prints every child command with its output.

## Telemetry

The installer sends nothing. The skills CLI it runs sends two GET requests to `add-skill.vercel.sh`: an audit call to `https://add-skill.vercel.sh/audit` before an install, carrying the `owner/repo` and the skill names, and an install event to `https://add-skill.vercel.sh/t` after it, carrying the source, the skill names, the agent ids and the CLI version. The install event goes out only for a public GitHub repo. The audit call is not gated on repo visibility: it goes out for a private GitHub repo too. A local path sends neither. No file contents leave the machine. The install event carries the metadata this installer attaches: `{"installer":"bmad-method","version":"<installer version>"}`.
The installer sends nothing. The skills CLI it runs sends two GET requests to `www.skills.sh`: an audit call to `https://www.skills.sh/tele/audit` before an install, carrying the `owner/repo` and the skill names, and an install event to `https://www.skills.sh/tele/t` after it, carrying the source, the skill names, their repository-relative `SKILL.md` paths (`skillFiles`), the agent ids and the CLI version. For a GitHub repository, both requests go out only when GitHub positively confirms it is public (private GitHub repos send neither; non-GitHub remote sources without a GitHub privacy check may still send the install event). A local path sends neither. No file contents leave the machine. The install event carries the metadata this installer attaches: `{"installer":"bmad-method","version":"<installer version>"}`.

`--no-telemetry` sets `DO_NOT_TRACK=1` in every skills CLI process the installer starts. That also removes those installs from the install counts on skills.sh.

`DO_NOT_TRACK` or `DISABLE_TELEMETRY` set in your own environment turns telemetry off for every skills command, including the ones you run yourself.

## Reproducible installs

The skills CLI writes `skills-lock.json` in the project. Commit it. `npx skills experimental_install` restores the skills recorded there.
The skills CLI writes `skills-lock.json` in the project, recording each skill's content hash and (for Git sources) its commit. Commit it. `npx skills install` (or `npx skills experimental_install`) restores the skills recorded there: Git skills restore from the recorded commit, while entries without a commit (local paths, and older locks until `npx skills update` adds one) restore from the current source. Use `--frozen-lockfile` (enabled automatically in CI) when exact content matters: a frozen restore fails on a hash mismatch rather than installing changed content.

## Testing

Expand Down
6 changes: 3 additions & 3 deletions agents.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"skillsVersion": "1.7.0",
"skillsVersion": "1.9.1",
"agents": [
{
"id": "aider-desk",
Expand Down Expand Up @@ -226,7 +226,7 @@
{
"id": "fx",
"name": "fx",
"skillsDir": ".fx/skills",
"skillsDir": ".agents/skills",
"detect": [
"~/.fx"
]
Expand Down Expand Up @@ -430,7 +430,7 @@
{
"id": "pi",
"name": "Pi",
"skillsDir": ".pi/skills",
"skillsDir": ".agents/skills",
"detect": [
"~/.pi/agent"
]
Expand Down
29 changes: 15 additions & 14 deletions messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ directoryConfirm: "Install into {directory}?"

legacyManifest: |-
Found an older BMad install at _bmad/_config/manifest.yaml.
This installer leaves it alone.
This installer leaves it alone. Back up _bmad/ and _bmad-output/
first; bmad setup handles v6 cleanup and migrations.

existingInstallPrompt: "BMad is already installed here. What do you want to do?"

Expand All @@ -89,7 +90,7 @@ modulesRequired: "Also installing {modules}: a module you picked needs it."

modulesKept: |-
Still installed: {modules}. This installer never removes anything.
To remove a module, run npx skills remove with its skills.
Ask the BMad Agent to remove a module, or run npx skills remove.

agentsPrompt: "Which coding agents should get the skills?"

Expand Down Expand Up @@ -165,14 +166,14 @@ summaryModuleGroup: "{names} ({version})"
summaryAgents: "Agents {agents}"

summaryNextSetup: |-
Next: open your coding agent in this project and ask it to run
bmad setup, which finishes the install. Then, if you are unsure
what BMad and your installed modules can do, ask the bmad skill
what to do next.
Next: open your coding agent in this project and ask the BMad Agent
to run bmad setup, which finishes the install. Then, if you are
unsure what BMad and your installed modules can do, ask the BMad
Agent for a tour or what to do next.

summaryNextCurrent: |-
Next: if you are unsure what BMad and your installed modules can do,
ask the bmad skill in your coding agent what to do next.
ask the BMad Agent in your coding agent for a tour or what to do next.

summaryNextOther: "Next: {next}"

Expand All @@ -197,12 +198,12 @@ cancelled: "Cancelled. Anything already installed is still there."

droppedFlags:
custom-source: "--custom-source is gone. Install those with npx skills add <source>."
set: "--set is gone. The bmad setup skill asks these questions."
list-options: "--list-options is gone. The bmad setup skill asks these questions."
user-name: "--user-name is gone. The bmad setup skill asks these questions."
communication-language: "--communication-language is gone. The bmad setup skill asks these questions."
document-output-language: "--document-output-language is gone. The bmad setup skill asks these questions."
output-folder: "--output-folder is gone. The bmad setup skill asks these questions."
set: "--set is gone. The BMad Agent asks these questions during bmad setup."
list-options: "--list-options is gone. The BMad Agent asks these questions during bmad setup."
user-name: "--user-name is gone. The BMad Agent asks these questions during bmad setup."
communication-language: "--communication-language is gone. The BMad Agent asks these questions during bmad setup."
document-output-language: "--document-output-language is gone. The BMad Agent asks these questions during bmad setup."
output-folder: "--output-folder is gone. The BMad Agent asks these questions during bmad setup."
channel: "--channel is gone. Modules install from each repo's main branch."
all-stable: "--all-stable is gone. Modules install from each repo's main branch."
all-next: "--all-next is gone. Modules install from each repo's main branch."
Expand All @@ -213,4 +214,4 @@ droppedFlags:

droppedUninstall: |-
This installer does not remove anything.
Remove skills with npx skills remove.
Ask the BMad Agent to remove a module, or run npx skills remove.
67 changes: 39 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"agents": "node tools/generate-agents.js"
},
"dependencies": {
"@clack/prompts": "^1.8.1",
"cross-spawn": "^7.0.6",
"@clack/prompts": "^1.9.0",
"cross-spawn": "^7.1.0",
"yaml": "^2.9.1",
"@vercel/detect-agent": "^1.2.5",
"skills": "1.7.0"
"@vercel/detect-agent": "^1.2.7",
"skills": "1.9.1"
},
"devDependencies": {
"typescript": "^5.9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Commands

Flags
-d, --directory <path> Project directory, default the current one
-m, --modules <codes> Modules to install, e.g. method,cis, method#dev or acme/repo/folder
-m, --modules <codes> Modules to install, e.g. method,creative, method#dev or acme/repo/folder
-t, --tools <ids> Comma-separated coding agent ids to install to
--list-tools List the coding agent ids --tools takes
-y, --yes Take the defaults and ask nothing
Expand Down
5 changes: 3 additions & 2 deletions src/installed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { access } from 'node:fs/promises'
import { join } from 'node:path'
import { isInstalledListedSkill } from './skills-cli.js'

/** @typedef {import('./skills-cli.js').ListedSkill} ListedSkill */
/** @typedef {import('./modules.js').ModuleDefinition} ModuleDefinition */
Expand All @@ -15,7 +16,7 @@ const LEGACY_MANIFEST = ['_bmad', '_config', 'manifest.yaml']
* @returns {Promise<InstalledState>}
*/
export async function inspectInstall(dir, skillsCli) {
const skills = await skillsCli.list({ cwd: dir })
const skills = (await skillsCli.list({ cwd: dir })).filter(isInstalledListedSkill)
const bmad = skills.find((skill) => skill.name === BMAD_SKILL)
return {
skills,
Expand All @@ -32,7 +33,7 @@ export async function inspectInstall(dir, skillsCli) {
* @returns {string[]}
*/
export function installedModuleCodes(state, modules) {
const installed = new Set(state.skills.map((skill) => skill.name))
const installed = new Set(state.skills.filter(isInstalledListedSkill).map((skill) => skill.name))
return modules.filter((module) => installed.has(module.record)).map((module) => module.code)
}

Expand Down
Loading
Loading