Documentation
Install, publish, troubleshoot, and contribute packages to bpm.
Installing the CLI
bpm is distributed as an npm package. Install it globally to use the CLI across all your projects.
# Install bpm globally from npm
npm install -g @dakotafabrodev/agent-bpm
# Or use npx for one-off commands without global install
npx @dakotafabrodev/agent-bpm --version
Requirements
- Node.js 18 or later
- npm 9+ (ships with Node 18+)
Verify installation
bpm --version
# should print the installed version, e.g. 0.11.0
Update to latest
npm update -g @dakotafabrodev/agent-bpm
Contributing packages
This is the package authoring path with two Stage 1 setup states: existing package repo or from-scratch package repo.
# Stage 1A - existing package repository
cd /path/to/package-repo
bpm init
# Stage 1B - new package repository
cd ~/your-workspace
bpm init my-bpm-package --from-scratch
cd my-bpm-package
# update package content + manifest
# ensure bpm.json has name, version, type, entry, repository
# keep README.md current for package page rendering
# fill in HUMAN.md: what changes for the person who installs it
# Stage 2 - publish
bpm token set <token>
bpm publish --auth-source=stored
Suggested baseline package repository structure:
my-bpm-package/
|- .git/
|- README.md
|- bpm.json
|- package/
|- convention.md
Installing packages
This is the consumption path. Packages are typically installed into an existing agent workflow workspace to supplement AGENTS.md behavior.
# Typical install context:
# existing project or agent workspace that already uses AGENTS.md
cd /path/to/workspace
bpm init
bpm install learning-mode
# installs package behavior and updates AGENTS.md managed section
# this flow is for consuming packages, not authoring them
Token lifecycle
Create, set, unset, and clear tokens based on local workflow and troubleshooting needs.
# 1) Create token in dashboard
# https://www.usebpm.dev/dashboard
# 2) Store token locally for CLI publish
bpm token set <token>
# 3) Optional: remove env override if auth conflicts appear
unset BPM_AUTH_TOKEN
# 4) Clear stored token when rotating/revoking
bpm token clear
Troubleshooting publish auth
# Unauthorized on publish?
unset BPM_AUTH_TOKEN
bpm publish --auth-source=stored
# verify default registry host
echo "export BPM_REGISTRY_URL='https://www.usebpm.dev'" >> ~/.zshrc
source ~/.zshrc
# reset stored token if needed
bpm token clear
bpm token set <token>
CLI command glossary
Complete command reference for the current CLI.
bpm init
Initializes bpm-lock.json in an existing project directory.
bpm init [project-name] --guided
Asks plain-language questions (what the package does, who it's for, what kind it is, what an agent should do) and writes bpm.json, README.md, HUMAN.md and the entry file from the answers. No JSON editing. Works for all four package types. The same questions are on usebpm.dev/build, which makes the files in a new GitHub repository and publishes them from the browser, no terminal needed.
bpm init [project-name] --skill
Scaffolds a package whose entry is SKILL.md, with frontmatter (name, description, author, version, tags) and sections for an agent skill, so it also installs with npx skills add. token_cost is estimated from SKILL.md. Combine with --guided to fill it from your answers.
bpm init [project-name] --from-scratch
Scaffolds a new package-authoring baseline in an empty directory, or in a new subdirectory when a project name is provided.
bpm init [project-name] --from-scratch --full
Same as --from-scratch, but HUMAN.md starts from the full human-md starter, including the How I think section.
bpm install <source>
Installs a package from registry, GitHub, or local path and updates the AGENTS.md managed section.
bpm publish
Publishes the current package repository to the registry using bpm.json and README content.
bpm publish --auth-source=auto
Tries BPM_AUTH_TOKEN first, then falls back to stored token.
bpm publish --auth-source=env
Publishes using BPM_AUTH_TOKEN only.
bpm publish --auth-source=stored
Publishes using stored local token only.
bpm deprecate <name>@<version> "<message>"
Marks one version as deprecated with a message. It stays installable and latest doesn't change; bpm install prints the message as a warning.
bpm deprecate <name>@<version> --undo
Clears the deprecation on that version.
bpm token set <value>
Stores registry auth token for local publish operations.
bpm token clear
Removes locally stored registry auth token.
bpm remove <name>
Removes an installed package and regenerates AGENTS.md managed section.
bpm compose
Previews what agents load from the installed packages, grouped by scope (global, project, path, session) with when to load each group, each package's headings and rules, conflicts, missing dependencies and token cost, counting the registry's measured cost where there is one. --full prints each package's instructions in full and --json prints the report.
bpm install --frozen
Restores every package in bpm-lock.json exactly as locked: it fetches each package's locked commit, checks the files against the recorded content hash, and reapplies overlays. Nothing is re-resolved. If anything doesn't match, it exits 1 and leaves bpm-lock.json and AGENTS.md unchanged.
bpm install <template> --no-scaffold
Installs a template package without copying the files its scaffold field lists into the project. Without the flag, those files are copied, and existing files are never overwritten.
bpm list
Lists installed packages and aggregate token cost from lockfile. Totals count the registry's measured cost where the lockfile has one, and the author's estimate otherwise.
bpm review
Runs the checks bpm publish and the registry would run on the package in this folder, without publishing: bpm.json and its optional fields, the distributable files, the policy review, and the review of the committed files, read from git archive HEAD the same way the registry reads GitHub's archive. It prints the content digest the registry would store and lists changes that aren't committed, since the registry reviews the commit. Exits 0 when clean, 1 for warnings and 2 when publish would be refused. Add --json for the result as JSON.
bpm audit
Checks each installed package against the registry: newer versions, deprecations, revoked or unavailable versions, review status changes since install, and estimates 1.5x or more off the registry's measured token cost (noted as info). Exits 0 when clean, 1 for warnings and 2 for critical findings. Add --json for a machine-readable report.
bpm goose plan
Shows what registering the servers of the installed extension packages with goose would change, from bpm-lock.json and each package's server field. It reads the goose config only (default ~/.config/goose/config.yaml), and reports an entry bpm didn't write, or one edited since, as a conflict it leaves alone. --env NAME includes an optional environment variable, by name only.
bpm goose apply --config <path>
Writes the plan to a copy of a goose config after a timestamped backup, through a temp file. Servers run from a copy at ~/.bpm/run/<name>@<version>, so the installed package still passes bpm install --frozen. Running it twice changes nothing. In this release it refuses the live config.
bpm goose rollback --config <path>
Restores the config from the last apply's backup, only if its content hasn't changed since.
bpm goose check
Starts each server bpm registered in a goose config (default ~/.config/goose/config.yaml, read only) from its run copy, runs MCP initialize and tools/list, and lists the tools. A server that fails, or doesn't list a tool from its package's exposes.mcp_tools, exits 1. Servers whose required environment isn't set in your shell are skipped, since goose may still find the value in its secret store.
bpm generate
Does not overwrite manual AGENTS.md content. It appends the managed section if missing, then updates only that managed section on future runs.
bpm --help
Shows global CLI help and flow guidance.
bpm publish --help
Shows publish-specific options and auth-source usage.
bpm token --help
Shows token command usage and troubleshooting notes.
bpm --version
Prints installed CLI version.