agentproof-cli
v0.3.3
Published
Verify code changes before they reach production — CI-friendly checks, secrets, and security regression detection.
Maintainers
Readme
AgentProof
Verify code changes before they reach production.
AgentProof is a local-first verification CLI for Node.js / JavaScript / TypeScript repositories. It reviews a git diff against project context and policy, then reports whether the change is safe to merge.
Install from npm as agentproof-cli. The binary name is agentproof.
Why this exists
Pull requests fail for boring, expensive reasons: broken typechecks, missing tests on sensitive paths, leaked secrets, dependency surprises, and accidental auth regressions.
AgentProof packages those checks into one CI-friendly command with evidence-backed findings and an explicit merge status.
Pipeline
- Detect project tooling (package manager, frameworks, build/test/lint)
- Build the git diff (
--staged,--base, or a revision) - Classify changed files by risk domain
- Run available checks (typecheck, lint, tests, build, dependency review)
- Evaluate security rules with evidence snippets
- Score change risk and production readiness
- Emit
PASS/REVIEW/BLOCKED
Quick start
npm install -D agentproof-clinpx agentproof-cli
npx agentproof-cli --base main --cipnpm add -D agentproof-cli
yarn add -D agentproof-cliNote: the npm package
agentproofis a different product. This project publishesagentproof-cli.
Example output
AgentProof
──────────────────────────────────
Detected: NestJS + TypeScript + pnpm
Change Risk HIGH
Production Readiness 81/100
✓ Typecheck Passed
✓ Build Passed
✓ Tests Passed
✓ Lint Passed
⚠ New dependency 1
✗ Authorization removed 1
MERGE STATUS
BLOCKEDCLI
agentproof --help
agentproof --base main --ci
agentproof --staged
agentproof HEAD~1
agentproof --json
agentproof --sarif
agentproof --html ./agentproof-report.html
agentproof --config agentproof.config.yaml
agentproof --skip-checks| Flag | Purpose |
|------|---------|
| --base <ref> | Compare against a branch or commit |
| --staged | Analyze staged changes only |
| --ci | Exit 1 when blocked |
| --json / --sarif / --html | Alternate report formats |
| --config <path> | Policy file |
| --skip-checks | Run rules without project checks |
Exit codes: 0 pass/review · 1 blocked (with --ci) · 2 error
Coverage
Checks
- Typecheck, lint, tests, build (when detected and required)
- Lint can fail only on issues introduced on changed lines
- Dependency deltas + optional OSV advisories (package name/version only)
Rules
High-signal findings with evidence: secrets, unsafe eval/shell/SQL patterns, redirect and path risks, CORS/TLS/header issues, sensitive logging, and auth/authz removals versus the base branch.
See RULES.md.
Framework detection
Works on any Node/JS/TS git repo. Built-in detection for:
- Backend: Express, Fastify, Hono, NestJS, plain Node
- Apps: React, Vite, Next.js, Remix, Astro, Nuxt, Vue, SvelteKit, Angular
Unsupported frameworks still get checks and rules; they just skip framework-specific detection helpers.
Package managers: npm, pnpm, Yarn, Bun.
Configuration
agentproof.config.yaml (also .yml, .json, .ts, or package.json#agentproof):
extends: security # strict | security | relaxed | ci | ./team-pack.yaml
fail_on: high
protected_areas:
- "src/auth/**"
- "src/payments/**"
- "prisma/migrations/**"
require:
build: true
tests: true
typecheck: true
lint: false
lint:
new_issues_only: true
dependencies:
new_dependency: review
advisories: true
security:
secret_detection: true
auth_regression: true| Pack | Intent |
|------|--------|
| ci | Typical PR gate |
| security | Secrets + auth regression focus |
| strict | Require build/tests/typecheck/lint |
| relaxed | Block only on critical findings |
GitHub Action
- uses: Zardron/[email protected]
with:
base: origin/main
fail-on: highOr:
- run: npm install -D agentproof-cli
- run: npx agentproof --base origin/main --ciProgrammatic API
import { runPipeline, getVersion } from 'agentproof-cli'
const { report, exitCode } = await runPipeline({
cwd: process.cwd(),
base: 'main',
staged: false,
json: true,
sarif: false,
ci: true,
skipChecks: false,
})
console.log(getVersion(), report.mergeStatus)
process.exitCode = exitCodeTypeScript declarations are included.
Privacy
- MIT licensed
- No telemetry by default
- Source is not uploaded
- OSV queries send package name/version only
- Runs on your machine or CI runner
Requirements
- Node.js 20+
- Git repository
- Network only if advisories are enabled
Docs
Maintainer
Maintained by Zardron Pesquera.
