Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (badlang) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
badlang
Cross-platform npm wrapper for the BAD runtime.
On install, this package detects your OS/CPU and downloads the matching BAD binary from GitHub releases.
If download is skipped during install (for example in CI), the bad command will auto-download the correct binary on first run.
Install
npm install -g badlangThen run:
bad --help
bad ./examples/01-basics/quick_start_demo.badHow It Works
postinstallresolves your platform (darwin,linux,win32) and arch (x64,arm64).- It builds a GitHub release URL for the right asset.
- It downloads the binary into
vendor/bin/inside this package. - The
badbin script forwards your CLI args to that binary. - If the binary is missing at runtime, it is fetched automatically before executing your file.
Expected Release Asset Names
bad-darwin-x64bad-darwin-arm64bad-linux-x64bad-linux-arm64bad-win32-x64.exebad-win32-arm64.exe
Environment Variables
BAD_GITHUB_OWNER(default:clixiya)BAD_GITHUB_REPO(default:badlang)BAD_GITHUB_TAG(default:latest)BAD_DOWNLOAD_BASE_URL(optional)- If set, installer uses
<base-url>/<asset-name>directly.
- If set, installer uses
BAD_GITHUB_TOKEN(optional)- Added as
Authorization: Bearer <token>for private/rate-limited downloads.
- Added as
BAD_SKIP_DOWNLOAD=1- Skips postinstall download.
BAD_FORCE_DOWNLOAD=1- Re-downloads even if binary already exists.
BAD_BIN_PATH(runtime override)- Use a custom local binary path when running
bad.
- Use a custom local binary path when running
Development
npm test
npm run clean