Antra
How it worksStar1Get Started
Star1
Antra
How it worksStar1Get Started
Star1
Documentation
  • Introduction
  • Installation
  • Quick start
  • Configuration basics
  • Monorepos
  • Trust boundaries
  • Findings and severity
  • Schema providers
  • Suppressions and baselines
  • antra init
  • antra scan
  • antra sync
  • antra doctor
  • antra baseline
  • antra trace
  • antra watch
  • antra fix
  • antra query
  • antra studio
  • Studio
  • Launching Studio
  • Reading the graph
  • Configuration reference
  • BG-001: Server-to-client leak
  • BG-002: Unvalidated input
  • BG-003: Opaque object pass
  • BG-004: Secret in markup
  • GitHub Actions
  • Introduction
  • Installation
  • Quick start
  • Configuration basics
  • Monorepos
  • Trust boundaries
  • Findings and severity
  • Schema providers
  • Suppressions and baselines
  • antra init
  • antra scan
  • antra sync
  • antra doctor
  • antra baseline
  • antra trace
  • antra watch
  • antra fix
  • antra query
  • antra studio
  • Studio
  • Launching Studio
  • Reading the graph
  • Configuration reference
  • BG-001: Server-to-client leak
  • BG-002: Unvalidated input
  • BG-003: Opaque object pass
  • BG-004: Secret in markup
  • GitHub Actions

antra watch

Run continuous analysis on local file changes.

Re-analyzes as you edit, so a crossing shows up while the file is still open.

Usage

antra watch [path]

path is the Next.js app root and defaults to ..

antra watch
antra watch --rule BG-001
antra watch --full

Flags

FlagDefaultWhat it does
--fulloffRescans the whole project on every change.
--rule <ruleId>every ruleRuns a single rule, for example BG-001.

Incremental by default

watch re-analyzes what changed. --full throws that away and rescans everything on each edit. It is slower, and worth it only when you suspect the incremental result is stale, for example after a schema snapshot changed under it.

When to prefer a one-shot scan

watch holds a process open. In an editor you can run instead:

antra scan --staged

which is bounded, finishes, and can be wired into a pre-commit hook.

Previous
antra trace
Next
antra fix
On this page
  • Usage
  • Flags
  • Incremental by default
  • When to prefer a one-shot scan