gherkin-cli
Parse, validate, and diff Gherkin .feature files as token-efficient agent output.
gherkin-cli is an agent-first CLI for Gherkin .feature files. It wraps the canonical
@cucumber/gherkin parser and projects everything through
the AXI output contract — compact TOON
by default, structured errors, and pre-computed aggregates — so an agent spends the fewest tokens
per interaction.
Three commands
Section titled “Three commands” parse Project .feature files into a compact scenario/tag/count digest.
validate Check .feature well-formedness with a gating exit code.
diff Classify scenario changes against a git ref: added, modified, removed.
Try it
Section titled “Try it”npx gherkin-cli parse features/**/*.featureRun gherkin-cli with no arguments to see the .feature inventory of the current directory —
file names, scenario counts, and tags — in one call.
Prefer to call it in-process? The same three capabilities are pure functions you import — see the
Programmatic API.
See Introduction for what gherkin-cli is and why it
exists, or jump straight to the CLI Reference.