zzop turns source into one language-neutral IR, builds the dependency graph and the join between trees over it, runs rules, and writes one JSON reply that says what it found and what it could not see. What it reads and what it judges is yours to inject: a parser or overlay for your stack, your conventions in the config, your own rule packs. Each run names the next gap and how to fill it.
Built-in parsers and rule packs ship on by default — TypeScript/JavaScript, Python, Java, C#, Go and Rust, plus
Prisma and SQL schemas. They are an option, not the product: cargo build -p zzop-cli-bin --no-default-features
builds the kernel alone, which analyzes only what an envelope or overlay hands it.
Same commit in, same findings out. zzop never writes code and makes no network request.
A config is required — zzop judges nothing you did not declare. Put one at the top of your workspace; every tree under it finds it by walking up.
zzop init
at the top of the workspace · declares each git repository under it as a tree · never overwrites a config without --force
zzop analyze ./api
one tree
zzop cross ./api ./web
the join between trees — which calls reach which routes
zzop cross — ./api ./web (2 trees) read 4 of 4 files parsed across 2 trees joined 1 edges, 1 of them between trees (http 1) findings cross-layer 2 (warning 2) warning cross-layer/unconsumed-mutation-endpoint src/server.ts:8 (./api) warning cross-layer/unprovided-mutation-call src/users.ts:7 (./web) ... next zzop endpoint "PUT /api/users/me" ./api ./web — who provides and who calls the first row's key, and why they did or did not join
Read the screen top to bottom: read is what zzop saw, next is one concrete command.
The full reply goes to .zzop/last-<command>.json (to stdout with --json).
--severity, --rule and --limit narrow the list you see; the counts always cover
the whole run.
Zero findings is not a clean bill until warnings and coverageGaps in that reply say the run
was not blind.
zzop analyze-envelope.zzop/rules/ beside the config and it loads with
no key.vocabulary — what your guards, routers and generated files are
called. A key you do not declare is a question zzop does not ask.{
"trees": [
{ "root": "./api", "overlays": ["../zzop/overlays/api-routes.json"] }, // overlay paths resolve against the tree root
{ "root": "./web" }
],
"packs": { "disabled": ["browser"] }, // drop a built-in pack
"vocabulary": {
"skipDirs": ["node_modules", "dist", ".zzop"] // zzop init writes the rest
}
}
Check before you attach — zzop validate-envelope, zzop validate-rule-pack. Once
attached, the screen proves it: every applied overlay and every pack of yours gets an injected line.
injected overlay house-route-kit/1 (./api) 1 files → 1 routes injected pack house 1 rule → 2 findings
zzop coverage <tree> shows the next gap — what was read, per extension and per io channel.
zzop-cli-<platform> (the CLI) or zzop-mcp-<platform> (the MCP server) from GitHub Releases. Each release carries SHA256SUMS.npm i -g @zzop/cli — the same native zzop binary, fetched for your platform./plugin marketplace add eezz4/zzop, then /plugin install zzop@zzop. Restart once and the tools appear.zzop-mcp as a stdio server. It answers through the same handlers as the CLI, so the same path gets the same answer.0.x): pin an exact version. Which surfaces are stable.The binary carries the same contracts: zzop contract lists the embedded documents, zzop --help
every command and flag, zzop explain <rule-id> one rule — no source checkout needed.
Findings come from two kinds of rule: DSL rule packs — JSON files, one matcher per
rule — and Rust native analyses for checks one file cannot answer. The packs and analyses built into
the binary are an option on top of the kernel (Cargo feature builtin-units, on by default), and a pack
you write loads the same way.
Rule ids, pack names and suppress markers are strings you type into a config, so they keep their original spelling.
securityhardcoded-secret · sql-string-concat · weak-password-hash ·
jwt-none-algorithm · cors-credentials-wildcard.dbupdate-delete-no-where · multi-write-no-tx · connection-no-release.reliabilityfetch-no-timeout · async-route-no-catch · sync-fs-in-handler ·
interval-no-clear.sqlnplus1 · delete-no-where · destructive-migration.browserunsafe-html-sink · postmessage-wildcard · vue-v-html.redisflushall-in-code · keys-command-in-code · lock-no-ttl.egresshttp-url-literal · ws-no-auth · get-and-body.httpprotected-path-no-auth-evidence · dev-path-no-guard-hint.cross-layer/* analyses that run only under zzop cross, over two or more trees —
cross-layer/method-mismatch · cross-layer/body-field-drift.Every rule — its severity, matcher and exact subject — is on the catalog page,
and in the binary as zzop contract rule-catalog. Which languages a rule reaches is decided per rule,
by its own file_pattern, not per pack.
Put an <id>.json under a tree's zzop/rules/ and the next run loads it, no config
key needed; any other directory is named by packs.extraDirs in config (packsDir on an
embedder's request). Check it first with zzop validate-rule-pack: does it load, and can every rule fire.
{
"id": "house-rules",
"schema_version": 1,
"rules": [
{
"id": "hardcoded-debug-token",
"severity": "warning",
"message": "X-Debug-Token header set to a string literal — read it from env/config instead.",
"matcher": {
"type": "line-scan",
"file_pattern": "(?i)\\.(ts|tsx)$",
"require_file": "X-Debug-Token",
"skip_comment_lines": true,
"line_pattern": "[\"']X-Debug-Token[\"']\\s*:\\s*[\"'][^\"'`]+[\"']",
"snippet_max": 160
}
}
]
}
those two ids ARE the contract → findings say house-rules/hardcoded-debug-token,
the marker is // zzop-hardcoded-debug-token-ok
Six matchers to choose from — line-scan (one line's shape) · method-scan
(co-occurrence inside one function) · symbol-scan (declared symbols) · io-scan
(IO facts like routes and tables) · call-scan (calls the parser witnessed) ·
literal-scan (a literal's binding name, hash and entropy — never the value itself).
Fields: zzop contract dsl-reference; schema: zzop contract rule-pack-schema.
Several directories merge by pack id: the later directory's pack replaces an earlier one
with the same id whole — that is how you override a bundled pack without forking the engine. A check no
matcher can honestly express (declaration-to-use tracking, a cross-file join, call-graph traversal) belongs to
your own program reading the assembled facts zzop facts prints.
{ "ruleId": "db/float-money-compare", "severity": "info",
"file": "src/billing/invoice.ts", "line": 2,
"message": "[by-id] see messageByIdMeaning", "messageBy": "ruleId" }
a bundled rule's finding carries a pointer, not the prose
$ zzop explain db/float-money-compare
id: db/float-money-compare
pack: db
axis: defect (wrong regardless of house taste)
severity: info
message: A money-named identifier (`price`/`amount`/`balance`/`fee`/`cost`) compared with
`==`/`===`/`!=`/`!==` against a float literal (e.g. `price === 19.99`) — floating-point
rounding error makes strict equality on monetary values unreliable.
WHEN THIS FINDING IS WRONG: the money judgment is a NAME match, so a `rate` or `fee`
that is a multiplier rather than an amount reads the same; and one comparison is exact
even in binary floating point — `=== 0`, where the literal is exactly representable,
is a legitimate test and not the shape this rule is about. Represent money as integer
minor units (cents) or a decimal library.
the highlighted span ships inline, in the same reply, as findings.ruleCaveats
suppress marker: zzop-float-money-compare-ok (in a `//` line comment — also `--` inside a .sql
file, and `#` inside a file whose comment leader is `#` (`.properties`, `.yaml`, `.yml`,
`.toml`, `.ini`, `.conf`, `.cfg`, `.env`, `.py`) — on the finding's own line or the one
directly above it)
disable: Disable via config `rules: { "db/float-money-compare": "off" }` (embedders: `disabledRules`)
matcher: line-scan
… the matcher's own fields follow. Real output, rewrapped for width only
The cause and the fix, the comment that silences this one case, and the config key that turns the rule
off for the run — one zzop explain <ruleId> returns all three (over MCP, the resource
zzop://rule/<id>). A bundled rule's finding carries a messageBy: "ruleId" pointer
instead of that text and keeps only the "when this finding is wrong" span inline, as findings.ruleCaveats.
A finding from a pack you wrote carries its message with the marker and the disable hint appended — so a rule's
message states the cause and the fix, and nothing else.
zzop graph writes the analysis to stdout in a graph format and stops there. zzop has no
pixel-drawing code — you pick the viewer, and the same tables load into Cosmograph, Gephi or any force-graph
library without conversion.
The picture those tables produce — this repository's own import graph — is at the foot of this page.
A viewer strictly needs the links table; the nodes table is for styling. There is one stdout and zzop writes no files, so the format name selects the table.
zzop graph . --domain dep --format cosmograph-links > links.ndjson
the edges · required
zzop graph . --domain dep --format cosmograph-nodes > nodes.ndjson
the points · styling axes
links.ndjson — one line is one import {"endpointsInCycle":false,"source":"src/app.ts","target":"src/db.ts"} nodes.ndjson — one line is one file {"degree":7,"fanIn":6,"fanOut":1,"folder":"src","id":"src/db.ts","inCycle":false,"label":"db.ts","loc":214,"path":"src/db.ts","source":"web"}
source/target/endpointsInCycleid/source/path/label/folder/fanIn/fanOut/degree/inCyclelocauthorCount/changeCount/churn/lastModifiedsource → target is importer → imported.churn: 0 would spell "never changed" in the same bytes as "nobody looked".endpointsInCycledep at 40 nodes by default. Pass --top or --fold to this format and it exits with an error rather than ignoring them; the one narrowing knob is --scope <prefix>. How many of how many were emitted goes to stderr.--domain join--domain dep--domain risk--domain posture--domain cochangedep, and a sample of history. Default cap 30, lower than dep's 40, because every edge carries a weight the reader has to compare.--format takes mermaid (the default), cosmograph-nodes or
cosmograph-links. Mermaid serializes all five domains; the cosmograph tables exist for dep
alone. zzop graph --help owns the cap values, and whatever a cap removes is disclosed inside the
document, as a census line and a note node. This lane is CLI-only.
The far left is what nothing in this repository imports; further right is what everything ends up leaning on. A cycle has no depth, so it collapses into one column, and files with no imports either way — mostly entry points a runner calls — sit in a block past the right edge. That arrangement is the viewer's; none of it is in zzop's output.
The line above is what the command prints on stderr. No node or edge count is written into
this sentence: the viewer counts the loaded table on the spot. The data is written by
scripts/site-graph-data.mjs and CI diffs it against the committed bytes, so this picture is the tree at
this commit; re-running the two commands above on your checkout is the recount.