Skip to content

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.

Terminal window
npx gherkin-cli parse features/**/*.feature

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