Docs

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 wizard
npx @blackunicorn/bonklm

Detects framework + LLM provider, picks the right connectors, writes a starter config, and installs dependencies. Idempotent — safe to re-run.

doctor
npx @blackunicorn/bonklm doctor

Audits an existing install: missing layers, mis-wired middleware, stale package versions, conflicting sensitivity settings.

audit
npx @blackunicorn/bonklm audit

Static scan of your codebase for inbound LLM call sites not covered by a validator, and outbound writes not covered by a guard.

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.

  1. Scan package.json for framework + provider signals.
  2. Probe tsconfig.json for module + path conventions.
  3. Walk src/ for call-site heuristics.
  4. Resolve connectors, install, write bonklm.config.ts.