What's New in v0.7.x
Constitution Engine
forcefield init-- scaffold.forcefield/constitution.yamlfor governance (default/strict/permissive templates)- YAML-driven rules for files, commands, tools, and content
Security Scanning
guard.scan_command()-- scan terminal commands for 22 dangerous patternsguard.scan_filename()-- scan filenames for 12 security-sensitive patternsguard.protect_path()/guard.is_protected()-- glob-based protected path management
Reporting & Evaluation
guard.audit_report()-- generate structured JSON or Markdown audit reportsguard.eval()-- run security eval suites (116 built-in attacks or custom YAML)
Distribution
Available on 13 channels: PyPI, npm, VS Code Marketplace, Open VSX, JetBrains Marketplace, GitHub Action, pre-commit, Homebrew, Docker, and more.
Install
pip install forcefield # Core: regex + heuristics, zero deps
pip install forcefield[ml] # + ONNX ML model (95%+ detection, 235KB)
pip install forcefield[all] # Everything (ML + cloud + integrations)Other Install Methods
brew tap datasciencetech/forcefield && brew install forcefield
npx forcefield-ai scan 'test prompt'