CLI
Choose the command for the job, then use only the options that command supports.
Five commands with different responsibilities
Run commands from inside your Git repository with Zedbee installed locally. These options are verified against the Zedbee 0.1.0 source snapshot. Use npx zedbee <command> --help to check the installed command’s options.
| Command | Purpose | Writes to your project? |
|---|---|---|
init | Preview configuration and pre-commit integration. | Only after interactive approval or --yes. |
scan | Analyze staged changes, or committed changes with --base. | Does not edit or stage project files. Can create temporary reports and caches. |
fix [check] | Preview and apply supported managed fixes. | Approved working-file changes only. Never stages or commits. |
checks | Inspect effective settings, applicability, targets, engines, and network use. | Does not run analysis or change project settings. |
doctor | Diagnose the environment, configuration, hooks, and supported inputs. | Does not run a scan or repair project files. |
npx is the npm runner, not part of Zedbee’s argument parser. Generated hooks use npx --no-install zedbee scan so a commit cannot trigger an unexpected package download. Keep the project-local dependency installed.
The supported integration surface is the CLI. The package’s programmatic API is experimental; a CLI reference should not be interpreted as a stability promise for its JavaScript exports.
Select the comparison and output explicitly
npx zedbee scan compares committed HEAD with the exact staged index. npx zedbee scan --base origin/main compares the unique merge base with committed HEAD; it does not infer a pull-request base or fetch missing history.
| Option | Accepted values / default | Effect |
|---|---|---|
--base <ref> | A locally available Git ref | Use committed base mode instead of index mode. |
--format <format> | auto (default), ink, text, json, sarif | Select terminal presentation or a complete explicit export. |
--include-source | Flag | Allow ordinary target-snapshot source excerpts. Secret content remains redacted. |
--no-source | Flag | Suppress ordinary excerpts. Cannot be combined with --include-source. |
--config <path> | A .jsonc file inside the repository | Select a configuration path, resolved from the repository root. |
--timeout <duration> | Positive whole number with ms, s, m, or h | Override the Git hard timeout for this scan, not a whole-scan deadline. |
--no-timeout | Flag | Remove the configured Git hard timeout. Takes precedence over --timeout; other limits remain. |
--no-color | Flag | Disable colors without selecting a different output format. |
--no-animations | Flag | Disable animations. |
If a Git soft timeout is configured, the effective hard timeout must be greater. Disabling the hard timeout does not disable the soft-timeout notice, output bounds, or analyzer-specific limits.
Repository configuration is read from the selected Git state: staged for ordinary scans and committed HEAD for base mode. An alternate config path does not make a working-tree edit the policy for a committed scan.
Preview setup before allowing writes
npx zedbee init inspects the working copy and proposes .zedbeerc.jsonc plus a supported hook integration. Interactive text output asks for approval. JSON and non-interactive use are preview-only unless --yes is supplied.
| Option | Values | Default |
|---|---|---|
--profile <profile> | fast, recommended, thorough | recommended |
--checks <ids> | Comma-separated enabled check IDs | Profile / guided selection |
--hook <hook> | auto, husky, lefthook, simple-git-hooks, raw, none | auto |
--osv-unavailable <policy> | block, warn | block |
--format <format> | text, json | text |
--yes | Apply the proposal without a prompt | Not enabled |
--no-color | Disable colors | Not enabled |
--no-animations | Disable animations | Not enabled |
--checks selects enabled check IDs; it is not a way to add an arbitrary analyzer. init does not accept --config or --base.
Preview a fresh plan, then review working-file changes
fix supports one optional selector: formatting, lint, or reactCorrectness. Without a selector, it considers all three. Other checks and analyzer suggestions remain manual.
Options are --format auto|text|json (default auto), --config <path>, --yes, --no-color, and --no-animations. Like scan, its config path must identify a .jsonc file inside the repository. There is no fix --base.
Interactive text output previews and requests confirmation. JSON and non-interactive use do not apply without --yes. Each invocation builds a fresh plan; a saved JSON preview is metadata, not a replayable patch.
Exact lint and React fixes must not overlap unstaged work. Selected Prettier formatting processes the whole current working file and can reformat unstaged changes. Review git diff, stage intended edits, and scan again.
npx zedbee fix --format json
npx zedbee fix lint --format jsonCheck settings separately from environment health
checks and doctor each accept --format auto|text|json (default auto), --config <path>, and --no-color. Neither accepts scan-only flags such as --base, --timeout, or --include-source.
checks reads staged configuration and reports effective policies and applicability. doctor inspects the working copy because it diagnoses local setup. Their success does not establish that a scan passes.
Doctor can perform a bounded OSV connectivity diagnostic when applicable. “Without running a scan” does not mean “without any network request.” Interactive commands can also check for update notices; those controls are described in Privacy.
Use npm ls zedbee --depth=0 for the installed package version. This source snapshot does not register a --version flag. --help is available for the CLI and each command.
npx zedbee checks --format json
npx zedbee doctor --format json
npm ls zedbee --depth=0