antra query
Query the local SQLite analysis database.
Read-only SQL over the findings database that scans record into.
Usage
antra query [sql] [path]
Omit sql and the command prints the database schema and a few example
queries. That is the fastest way to learn the shape of the data.
antra query
antra query "select ruleId, count(*) from findings group by ruleId"
antra query "select * from findings limit 20" --format csv
Flags
What is in there
.antra/antra-findings.sqlite holds the findings that
antra scan recorded. A scan is stored unless you pass
--no-store, so the database is a history of what the analysis has seen, not
just its latest state.
antra query is the escape hatch for questions the other commands do not
answer: which rules fire most, whether a file is getting better or worse across
recent scans, what the largest trace is.
The statement is read-only by intent. Reach for the SQLite file directly if
you need to inspect or reset it. query is for reading.