CLI
Install the CLI as a development dependency in the repository you want to protect.
npm install --save-dev @exevra-dev/cli@0.1.1Initialize a JUnit project
Section titled “Initialize a JUnit project”The npx exevra init --command form supports JUnit XML only. It writes .exevra.yml, runs the test command, and creates the first baseline. It never overwrites an existing configuration.
For v0, init accepts ASCII characters only in the configuration filename, report path, and generated baseline path. The containing workspace directory may use non-ASCII characters.
npx exevra init \ --command "npm test -- --reporter=junit --outputFile=artifacts/junit.xml" \ --report artifacts/junit.xmlgit add .exevra.yml .exevra/baseline.jsongit commit -m "test: record Exevra baseline"If the first test run fails, produces no valid JUnit report, or reports zero executed tests, .exevra.yml remains, but .exevra/baseline.json is not created. Fix the test command, then create the baseline from that configuration.
npx exevra record --config .exevra.ymlRecord or update a baseline
Section titled “Record or update a baseline”record runs the configured command, reads fresh reports, and creates a schema-v1 baseline. It refuses to replace an existing file unless you explicitly pass --write.
npx exevra record --config .exevra.ymlnpx exevra record --config .exevra.yml --writeUse --write only after reviewing an intended execution-contract change. See Baselines for the review workflow.
check runs the command again and compares fresh reports with the committed baseline.
npx exevra check --config .exevra.ymlnpx exevra check --config .exevra.yml --mode advisorynpx exevra check --config .exevra.yml --format jsonnpx exevra check --config .exevra.yml --format github-actions--mode enforce is the default. It returns exit code 1 when at least one error finding exists. --mode advisory returns 0 even for error findings. Warning-only findings remain visible and do not fail enforce mode. record and check return 2 for an invalid invocation or an operational failure, such as unreadable configuration; record also returns 2 if it finishes with findings. Successful commands return 0.
check --base-ref <ref> compares watched paths against that Git ref. Without a base ref, the command reports that changed-file comparison is unavailable.