Skip to content

CLI ​

edgefit <command> [options]
CommandWhat it does
checkScan a project from its entry point
compareShow the reached APIs side by side across targets
diffShow what changed between two check --format json reports
targetsList the supported targets and the data behind each
helpShow the help text

check ​

sh
edgefit check [options]
OptionDescription
--target <name>Target runtime: workerd, bun, deno, deno-deploy. Repeat it for more than one. Default: the config's targets, then workerd
--entry <file>Entry point. Default: the config's entry, then wrangler's main
--built <path>Scan build output instead of source: its entry file or directory. See build output
--root <dir>Project root. Default: the current directory
--config <file>Config file. Default: edgefit.config.{ts,mts,js,mjs} in the root
--format <format>text, json or github. Default: text
--verboseList every finding in full: guarded ones and the unknown warnings that are otherwise folded
--no-colorDisable colors

--entry and --built cannot be combined.

sh
edgefit check
edgefit check --entry src/index.ts --target workerd --target bun
edgefit check --built .output/server
edgefit check --format json > report.json

compare ​

sh
edgefit compare [target...] [options]
OptionDescription
[target...]Targets to compare. Default: workerd, bun, deno
--allInclude APIs that every target supports
--verboseList the packages and findings behind each row
--format <format>text or json. Default: text

--entry, --root, --config and --no-color work as for check. See Comparing targets.

diff ​

sh
edgefit diff <base.json> <head.json> [options]
OptionDescription
--fail-on <when>new-errors, errors or never. Default: new-errors
--format <format>text, json or github. github annotates only the new findings. Default: text
--no-colorDisable colors

Both files must be written by edgefit check --format json with the same edgefit version. See Pull request checks.

targets ​

sh
edgefit targets

Prints every target with its export conditions and data, then every data source with its version and license.

Version ​

sh
edgefit --version   # or -v

Prints the installed version and exits with 0. With pnpm dlx or npx, pin a version (pnpm dlx edgefit@0.2.0 check) when you need to be sure which one runs, since the package manager may reuse a cached copy of latest.

Output formats ​

FormatUse it for
textReading in a terminal
jsonTools and edgefit diff. The shape is versioned, see JSON reports
githubGitHub Actions. Prints ::error and ::warning workflow commands that become annotations

Colors ​

Colors are on when stdout is a terminal. They are off when --no-color is passed or the NO_COLOR environment variable is set to a non-empty value.

Exit codes ​

CodeMeaning
0No error-level findings (for diff: nothing that matches --fail-on)
1Error-level findings (for diff: findings that match --fail-on)
2Invalid arguments or config, or a project that could not be resolved

Released under the MIT License.