CLI

Choose the command for the job, then use only the options that command supports.

Command reference

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.

Zedbee commands
CommandPurposeWrites to your project?
initPreview configuration and pre-commit integration.Only after interactive approval or --yes.
scanAnalyze 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.
checksInspect effective settings, applicability, targets, engines, and network use.Does not run analysis or change project settings.
doctorDiagnose 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.

Scan command flags

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.

scan options
OptionAccepted values / defaultEffect
--base <ref>A locally available Git refUse committed base mode instead of index mode.
--format <format>auto (default), ink, text, json, sarifSelect terminal presentation or a complete explicit export.
--include-sourceFlagAllow ordinary target-snapshot source excerpts. Secret content remains redacted.
--no-sourceFlagSuppress ordinary excerpts. Cannot be combined with --include-source.
--config <path>A .jsonc file inside the repositorySelect a configuration path, resolved from the repository root.
--timeout <duration>Positive whole number with ms, s, m, or hOverride the Git hard timeout for this scan, not a whole-scan deadline.
--no-timeoutFlagRemove the configured Git hard timeout. Takes precedence over --timeout; other limits remain.
--no-colorFlagDisable colors without selecting a different output format.
--no-animationsFlagDisable 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.

Use committed comparisons in CIChoose a complete report format
Repository setup

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.

init options
OptionValuesDefault
--profile <profile>fast, recommended, thoroughrecommended
--checks <ids>Comma-separated enabled check IDsProfile / guided selection
--hook <hook>auto, husky, lefthook, simple-git-hooks, raw, noneauto
--osv-unavailable <policy>block, warnblock
--format <format>text, jsontext
--yesApply the proposal without a promptNot enabled
--no-colorDisable colorsNot enabled
--no-animationsDisable animationsNot enabled

--checks selects enabled check IDs; it is not a way to add an arbitrary analyzer. init does not accept --config or --base.

Walk through initial setup
Managed fixes

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.

Interpret managed-fix outcomes
Preview only · no approval flag
npx zedbee fix --format json
npx zedbee fix lint --format json
Inspection and diagnosis

Check 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.

Control update requests and notices
Inspect without running a scan
npx zedbee checks --format json
npx zedbee doctor --format json
npm ls zedbee --depth=0