CLI
BonkLM ships a small CLI for install, health, and coverage. Everything is opt-in — the library works fine without it once configured.
Commands
install wizardnpx @blackunicorn/bonklmDetects framework + LLM provider, picks the right connectors, writes a starter config, and installs dependencies. Idempotent — safe to re-run.
connector addnpx @blackunicorn/bonklm connector add <slug>Adds a connector by slug, installs the package, and patches the BonkLM config file to register it. Run with `--dry-run` to preview the diff.
connector removenpx @blackunicorn/bonklm connector remove <slug>Removes a previously-added connector — uninstalls the package and unregisters it from the config. Safe on an unregistered slug (no-op).
connector testnpx @blackunicorn/bonklm connector test <slug>Runs the connector’s wire-up smoke test against the local config. Fails fast on missing peer deps, version skew, or unreachable runtime hooks.
statusnpx @blackunicorn/bonklm statusPrints the current install: registered connectors, validator/guard chain, sensitivity + action defaults, edge-runtime bindings.
doctornpx @blackunicorn/bonklm doctorAudits an existing install: missing layers, mis-wired middleware, stale package versions, conflicting sensitivity settings, pre-commit hook integrity (Sprint 50+).
Wizard flow
The wizard is a chain of detectors, not a single monolith. Each detector returns a confidence score; the wizard composes the highest-scoring stack and asks for confirmation before writing files.
- Scan
package.jsonfor framework + provider signals. - Probe
tsconfig.jsonfor module + path conventions. - Walk
src/for call-site heuristics. - Resolve connectors, install, write
bonklm.config.ts.