@blackunicorn/bmad-cybersec
v4.7.2
Published
Install BMAD-CYBERSEC operations framework
Downloads
266
Maintainers
Readme
BMAD-CYBERSEC NPX Installer
One-command installation for BMAD-CYBERSEC framework
npx @blackunicorn/bmad-cybersec installOverview
The NPX installer provides a streamlined way to add BMAD-CYBER framework to any existing project without manual file copying or complex setup procedures.
Installation Methods
Quick Install (Recommended)
# Install latest release to current directory
npx @blackunicorn/bmad-cybersec install
# Install to a specific directory
npx @blackunicorn/bmad-cybersec install ./my-project
# Install specific version
npx @blackunicorn/bmad-cybersec install --version v2.0.0From Git (Development)
# Install from main branch
npx @blackunicorn/bmad-cybersec install --from-git
# Install from specific branch
npx @blackunicorn/bmad-cybersec install --from-git --branch developNon-Interactive Mode
# Skip all prompts and use defaults
npx @blackunicorn/bmad-cybersec install --yes
# Force overwrite existing files
npx @blackunicorn/bmad-cybersec install --forceCommand Reference
install Command
Installs BMAD-CYBER framework files to a target directory.
npx @blackunicorn/bmad-cybersec install [target-dir] [options]Arguments:
target-dir- Target directory (defaults to current directory)
Options:
| Option | Description |
|--------|-------------|
| -v, --version <tag> | Install specific version (e.g., v2.0.0) |
| --from-git | Clone from Git instead of downloading release |
| --branch <name> | Git branch to clone (default: main) |
| --force | Overwrite existing files without prompting |
| --yes, -y | Skip confirmation prompts |
| --dry-run | Preview files without installing |
| --with-docs | Include documentation files |
| --with-dev | Include development tools |
| --verbose | Enable verbose logging |
Examples:
# Preview what would be installed
npx @blackunicorn/bmad-cybersec install --dry-run
# Install with documentation
npx @blackunicorn/bmad-cybersec install --with-docs
# CI/CD installation (non-interactive)
npx @blackunicorn/bmad-cybersec install --yes --forceversion Command
Display the installer version.
npx @blackunicorn/bmad-cybersec --versionhelp Command
Display help information.
npx @blackunicorn/bmad-cybersec --help
npx @blackunicorn/bmad-cybersec install --helpWhat Gets Installed
Core Files (Always)
_bmad/- BMAD agent configurations and workflows.claude/- Claude Code MCP configurationsrc/utility/tools/- Framework utility scriptsCLAUDE.md- Project instructions for Claude
Optional Files
Docs/- Documentation (with--with-docs)dev-tools/- Development utilities (with--with-dev)
Excluded Files (Never Installed)
.git/- Git repository datanode_modules/- Dependencies*.test.js,*.spec.js- Test filescoverage/- Code coverage data.github/- GitHub workflows
Package.json Updates
The installer automatically merges BMAD dependencies into your package.json:
Scripts added:
{
"scripts": {
"bmad:setup": "node src/utility/tools/setup-wizard/index.js",
"bmad:modules": "node src/utility/tools/module-selector/index.js",
"bmad:security": "node src/utility/tools/security-config/index.js",
"bmad:llm": "node src/utility/tools/llm-setup/index.js",
"bmad:health": "node src/utility/tools/health-check/index.js"
}
}Dependencies added:
chalk- Terminal stylinginquirer- Interactive promptszod- Schema validationcommander- CLI frameworkora- Terminal spinners
Troubleshooting
Installation Issues
"Release not found" Error
Error: Release v99.99.99 not foundCause: The specified version doesn't exist.
Solution:
- Check available releases: https://github.com/BlackUnicornSecurity/BMAD-CYBERSEC/releases
- Use
latestor omit version flag for latest release - Verify the version tag format (e.g.,
v2.0.0not2.0.0)
"GitHub API rate limit exceeded" Error
Error: GitHub API rate limit exceeded. Set GITHUB_TOKEN or try again later.Cause: Too many requests to GitHub API without authentication.
Solutions:
Wait 1 hour for rate limit reset
Set a GitHub token:
export GITHUB_TOKEN=your_personal_access_token npx @blackunicorn/bmad-cybersec installUse Git clone method instead:
npx @blackunicorn/bmad-cybersec install --from-git
"Checksum verification failed" Error
Error: Checksum verification failed. File may be corrupted.Cause: Downloaded file doesn't match expected checksum.
Solutions:
Retry the installation (network issue):
npx @blackunicorn/bmad-cybersec installClear npm cache and retry:
npm cache clean --force npx @blackunicorn/bmad-cybersec installUse Git clone as fallback:
npx @blackunicorn/bmad-cybersec install --from-git
"Git is not installed" Error
Error: Git is not installed or not in PATH.Cause: Using --from-git without Git installed.
Solutions:
Install Git: https://git-scm.com/downloads
Use release download method (without
--from-git):npx @blackunicorn/bmad-cybersec install
"Download failed: 500" Error
Error: Download failed: 500Cause: GitHub server error.
Solutions:
Wait a few minutes and retry
Check GitHub status: https://www.githubstatus.com/
Use Git clone as fallback:
npx @blackunicorn/bmad-cybersec install --from-git
File Conflict Issues
Existing Files Would Be Overwritten
Found 5 existing files that would be overwritten:
- _bmad/core/config.yaml
- .claude/settings.json
...Options:
- Overwrite all - Replace all existing files
- Skip existing - Only install new files
- Cancel - Abort installation
To avoid prompt:
# Skip existing files automatically
npx @blackunicorn/bmad-cybersec install --yes
# Overwrite all files automatically
npx @blackunicorn/bmad-cybersec install --forcePackage.json Issues
Backup Created But Installation Failed
If you see a backup file like package.json.backup.1706547200000:
Your original
package.jsonis safe in the backupTo restore:
cp package.json.backup.* package.json
Merge Conflicts with Existing Dependencies
The installer preserves your existing dependency versions. If you need BMAD's exact versions:
- Check the diff shown during installation
- Manually update versions in
package.jsonif needed - Run
npm installto update
Network Issues
Slow Download or Timeout
# Increase timeout (default is 2 minutes for git clone)
npx @blackunicorn/bmad-cybersec install --from-git
# Or use release download which has automatic retries
npx @blackunicorn/bmad-cybersec installBehind Corporate Proxy
# Configure npm proxy
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
# Then install
npx @blackunicorn/bmad-cybersec installEnvironment Issues
Node.js Version Too Old
Error: BMAD-CYBER requires Node.js >= 18.0.0Solution: Upgrade Node.js to version 18 or later:
- https://nodejs.org/
- Using nvm:
nvm install 18 && nvm use 18
Permission Denied
Error: EACCES: permission deniedSolutions:
Don't use
sudowith npm/npxFix npm permissions: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
Install to a directory you own:
npx @blackunicorn/bmad-cybersec install ~/my-project
Getting More Information
Enable Verbose Logging
npx @blackunicorn/bmad-cybersec install --verboseThis shows:
- Detailed progress information
- File-by-file extraction
- Network request details
Preview Before Installing
npx @blackunicorn/bmad-cybersec install --dry-runThis shows:
- All files that would be extracted
- Changes to package.json
- No actual modifications made
Security
For Maintainers
NPM Publishing Requirements
Two-Factor Authentication (2FA) is REQUIRED for publishing to npm.
Before publishing any release:
- Enable 2FA on your npm account: https://docs.npmjs.com/configuring-two-factor-authentication
- Use an authentication app (not SMS) for security
- The npm account must have publish 2FA level enabled
# Verify 2FA is enabled before publishing
npm profile get
# Should show:
# two-factor auth: auth-and-writesToken Security
- NPM tokens are stored in GitHub Secrets (never in code)
- Tokens are never logged or displayed in workflow outputs
- Use scoped tokens with minimal permissions
- Rotate tokens periodically (recommended: every 90 days)
Release Signing
All releases include:
- SHA256 checksums for tarball verification
- Provenance attestation via
--provenanceflag - Git tags for version tracking
For Users
Download Verification
The installer automatically verifies downloads:
- Mandatory checksum verification - all downloads are validated against SHA256 checksums
- HTTPS only - all network requests use secure connections
- Trusted hosts only - downloads restricted to github.com domains
Safe Installation Practices
# Always verify the package source
npm view @blackunicorn/bmad-cybersec
# Check package integrity
npm audit
# Review what will be installed before proceeding
npx @blackunicorn/bmad-cybersec install --dry-runReporting Security Issues
For security vulnerabilities, please:
- DO NOT create a public GitHub issue
- Email security concerns to the maintainers directly
- Include reproduction steps and impact assessment
Development
Running Tests
cd tools/npx
npm install
npm testTest Coverage
npm run test:coverageCoverage thresholds: 80% for lines, functions, branches, and statements.
Project Structure
tools/npx/
├── cli.js # CLI entry point
├── index.js # Main export
├── commands/
│ └── install.js # Install command implementation
├── lib/
│ ├── config.js # Configuration constants
│ ├── downloader.js # GitHub release downloader
│ ├── extractor.js # Tarball extraction
│ ├── git-clone.js # Git clone functionality
│ ├── logger.js # Logging utilities
│ ├── package-merger.js # Package.json merging
│ └── utils.js # Helper utilities
├── __tests__/
│ ├── downloader.test.js
│ ├── extractor.test.js
│ ├── git-clone.test.js
│ ├── install.e2e.test.js
│ ├── package-merger.test.js
│ └── fixtures/
├── scripts/
│ └── postinstall.js # Post-installation script
├── package.json
├── vitest.config.js
└── README.mdSupport
For issues with the NPX installer:
- Check this troubleshooting guide
- Search existing issues: https://github.com/BlackUnicornSecurity/BMAD-CYBERSEC/issues
- Create a new issue with:
- Node.js version (
node --version) - npm version (
npm --version) - Operating system
- Full error message
- Command used
- Node.js version (
License
MIT License - See LICENSE for details.
