Skip to main content

hardpoint init

Initialize a Hardpoint configuration file in your project.

Usage

hardpoint init [flags]

Flags

FlagDescription
--pre-commitAlso install git pre-commit hook
--forceOverwrite existing configuration

Examples

Basic Initialization

hardpoint init
Creates .hardpoint.yaml:
version: 1
scanners:
  - ai
  - git
severity: low
exclude:
  - node_modules/
  - vendor/
  - .venv/
  - dist/
  - build/
# disable_rules:
#   - AI-008  # Example: disable semantic hijacking

Initialize with Pre-Commit Hook

hardpoint init --pre-commit
This also creates .git/hooks/pre-commit:
#!/bin/sh
# Hardpoint pre-commit hook
hardpoint scan --ci --staged

Overwrite Existing Config

hardpoint init --force

Configuration Options

version

Configuration version (currently 1).

scanners

List of scanners to run. Available: ai, git
scanners:
  - ai
  - git

severity

Minimum severity to report: info, low, medium, high, critical
severity: low

exclude

Glob patterns for directories to skip:
exclude:
  - node_modules/
  - vendor/
  - .venv/
  - dist/
  - build/
  - .git/

disable_rules

Specific rules to disable:
disable_rules:
  - AI-004  # Disable encoded instructions check
  - GIT-003 # Disable network access warnings

Config File Locations

Hardpoint looks for configuration in this order:
  1. .hardpoint.yaml
  2. .hardpoint.yml
  3. hardpoint.yaml
  4. hardpoint.yml

Next Steps

After initialization:
# Run a scan
hardpoint scan

# Create trust baseline
hardpoint trust --all