@komatikai/trailhead
v4.1.0
Published
Trailhead CLI — setup wizard and utilities for the Trailhead deployment gate
Maintainers
Readme
Trailhead CLI
Interactive setup wizard for Trailhead. Generates .trailhead.yml and the GitHub Actions workflow YAML with all v3 features configured.
Usage
npx @komatikai/trailhead initNo installation required. The wizard walks you through:
- Sensitivity patterns — which file paths are high/medium risk (auth, payments, migrations)
- Thresholds — risk and warn scores (defaults: 70/55)
- Freeze windows — days and hours when deployments are blocked
- Environments — per-environment threshold overrides (production, staging, etc.)
- Services — monorepo service boundaries with path patterns
- Security gate — whether to include Code Scanning alerts as a risk factor
- Canary tracking — Vercel or generic deploy outcome webhook type
- DORA metrics — whether to compute DORA-5 alongside gate evaluations
- Health checks — URLs to probe before scoring
- Webhooks — Slack/Discord notification URL and trigger events
- OpenTelemetry — OTLP endpoint for evaluation span export
- Evaluation store — URL for persisting evaluations to a trend dashboard
Output
The wizard generates two files:
.trailhead.yml— per-repo configuration (sensitivity, thresholds, freeze windows, environments, services, security, canary).github/workflows/trailhead.yml— GitHub Actions workflow with all selected features
Development
cd cli
npm install
npx tsc
node dist/index.jsThe CLI is a zero-dependency ESM module. Build output goes to cli/dist/ (gitignored — build before npm publish).
Publishing
cd cli
npx tsc
npm publishThe package is published as @komatikai/trailhead on npm, making npx @komatikai/trailhead init work without installation.
