@evlog/cli is a separate package from evlog itself. It never runs in your app: it reads your source on disk, so there is nothing to configure and nothing to deploy.
Its main job is evlog map — a static observability score for your app, in the spirit of Lighthouse. It finds every entry point in your project, checks each one for wide-event coverage, and tells you which three to fix first.
evlog map understands four frameworks today, its rules are still being refined, and both will grow. Expect verdicts and scores to move between releases, and pin the version when you gate CI on the number.pnpm dlx @evlog/cli map
bunx @evlog/cli map
npx @evlog/cli map
Add it as a dev dependency once you gate CI on the score, so every run uses the same version:
pnpm add -D @evlog/cli
bun add -d @evlog/cli
npm install --save-dev @evlog/cli
evlog binary.Commands
Global flags
Every command accepts these:
| Flag | What it does |
|---|---|
--json | Machine-readable JSON on stdout instead of the report |
--debug | Print a debug summary of the run, and emit it as a wide event |
--noHeader | Skip the branded header |
--cwd <dir> | Run against another directory instead of the current one |
--help | Usage for the command |
--version | Print the CLI version and exit |
Human output goes to stderr
The report you read is written to stderr. Stdout is reserved for --json, so a run can be piped into jq without the report getting in the way:
evlog map --json | jq '.map.score'
Without --json, nothing is written to stdout at all. Colour is dropped when stdout is not a TTY or when NO_COLOR is set, and the report lays itself out for the width it is given — set COLUMNS to render at a fixed width.
Exit codes
| Code | Meaning |
|---|---|
0 | The command ran and nothing failed |
1 | A check failed, or --min-score was not met |
2 | Usage error — an unknown flag or an invalid value |
$? with the exit code of the last command in it, so evlog map --min-score 90 \| head always looks successful. Use set -o pipefail when you pipe a gated run.When a check is wrong
Every verdict can be turned off from the code it is about, so a false positive never becomes a reason to stop running the tool:
// evlog-map-disable-next-line wide-event, context -- liveness probe, deliberately silent
export default defineEventHandler(() => ({ ok: true }))
The check becomes n/a with your reason attached — no score cost, no failed gate — and the report counts how many checks the project disabled, so the number stays honest. Full syntax.
Monorepos
Both map and doctor resolve the nearest package.json above the working directory, then treat that package as the project. In a pnpm or npm workspace, running from apps/web scans apps/web — not the repo root.
evlog map scans one app at a time. Running it from a bare workspace root, where there is no framework to detect, is an error rather than an empty report:
cd apps/web && evlog map
# or
evlog map --cwd apps/web
Debugging a run
--debug prints what the command did — the steps it went through, the directory it resolved, and any findings — and emits the same information as an evlog wide event:
evlog map --debug
── debug ────────────────────────────────
command map
env development
cwd /Users/you/apps/web
steps resolveProject → detectFramework → resolveEvlog → scan → writeMapFile → done
──────────────────────────────────────────
full event → --json --debug (stderr)
Add --json to get the whole event instead of the summary. EVLOG_CLI_DEBUG=1 does the same as the flag, which is useful in a CI job you cannot easily edit.
Next
Catalogs
Scale typed error and audit catalogs from a single file to multi-package monorepos. Conventions, npm packaging recipe, composition patterns, and the type-augmentation deep dive.
map
A static observability score for your app, Lighthouse-style. Scans every entry point in a Nuxt, Nitro, Next.js, or TanStack Start project, scores wide-event coverage, and names the entry points to fix first.