Skip to content

Latest commit

 

History

History
173 lines (124 loc) · 3.29 KB

File metadata and controls

173 lines (124 loc) · 3.29 KB

BULLETPROOF Setup Guide

Setting up BULLETPROOF is simple - just run the interactive wizard and you're done!

Quick Setup (Recommended)

# Install from GitHub (npm)
npm install -D git+https://github.com/VapiAI/bulletproof.git

# Or with pnpm
pnpm add -D git+https://github.com/VapiAI/bulletproof.git

# Run the wizard - handles everything automatically
npx bulletproof init

That's it! The wizard will:

  • Detect your project type (Next.js, NestJS, React, Node.js, etc.)
  • Detect your package manager (npm, yarn, pnpm, bun)
  • Install and configure Husky with the pre-push hook
  • Generate bulletproof.config.json with smart defaults
  • Help you set up your Anthropic API key

Non-Interactive Setup (CI/Automation)

npx bulletproof init -y

This accepts all defaults without prompts. Set ANTHROPIC_API_KEY in your environment beforehand.


Prerequisites


What the Wizard Sets Up

Component What It Does
Husky Installs husky and runs husky init
Pre-push Hook Creates .husky/pre-push to run bulletproof before each push
Config File Creates bulletproof.config.json with project-appropriate defaults
API Key Optionally adds ANTHROPIC_API_KEY to .env.local

Alternative: Install with yarn

yarn add -D git+https://github.com/VapiAI/bulletproof.git

Verify Your Setup

After running the wizard, test it:

# Check installation
npx bulletproof --help

# Dry run (checks without pushing)
npx bulletproof run --verbose

Advanced Configuration

The wizard creates sensible defaults, but you can customize bulletproof.config.json:

Adjust Coverage Thresholds

{
  "coverageThresholds": {
    "lines": 70,
    "statements": 70,
    "functions": 65,
    "branches": 60
  }
}

Disable Specific Checks

{
  "checks": {
    "rules": true,
    "typecheck": true,
    "tests": true,
    "coverage": false
  }
}

Custom Commands

{
  "commands": {
    "typecheck": "tsc --noEmit",
    "test": "vitest run",
    "testCoverage": "vitest run --coverage"
  }
}

Use a Different Claude Model

{
  "model": "claude-sonnet-4-20250514"
}

Troubleshooting

"ANTHROPIC_API_KEY is not set"

Set your API key:

export ANTHROPIC_API_KEY="sk-ant-..."

Or re-run the wizard to add it to .env.local:

npx bulletproof init

Hook Doesn't Run

Check that the hook is executable:

chmod +x .husky/pre-push

Re-run Setup

The wizard is idempotent - safe to run again:

npx bulletproof init

It will detect existing setup and offer to update or skip components.


CLI Reference

Command Description
npx bulletproof init Interactive setup wizard
npx bulletproof init -y Non-interactive setup (accept defaults)
npx bulletproof run Run checks and push
npx bulletproof run --verbose Detailed output
npx bulletproof --help Show all options

Getting Help

  • Issues: GitHub Issues
  • Slack: Ask in #engineering or #tasker channels