parse
parse <files…> reads one or more .feature files and emits a compact manifest an agent can
reason over cheaply: per file the feature tags, scenario count, and section-comment count; per
scenario the name, keyword, and tags. Detail (step text, step/example counts) is opt-in via
--full.
gherkin-cli parse features/login.feature --tag @smoke| Flag | Description |
|---|---|
--full | Include stepCount, exampleRows, and steps per scenario. |
--tag <name> | Keep only scenarios carrying this tag. |
--ast | Dump the raw cucumber GherkinDocument JSON (ignores projection). |
--format <fmt> | Output format: toon (default) or json. |
Behavior
Section titled “Behavior”- Default projection carries
name, keyword, tagsper scenario — a minimal schema so an agent spends few tokens on a suite it only needs to enumerate. - A file that fails to parse yields an
error {code, line, message}entry and does not fail the run — the batch still succeeds (exit0). A missing file fails loud (ENOENT, exit1). - The result carries a
summaryaggregate (files, scenarios) so no follow-up call is needed to count.
See also
Section titled “See also”- validate — check well-formedness with a gating exit code.
- diff — classify scenario changes against a git ref.
- parse — the same projection as an imported function.
- AXI output contract — the shared conventions behind this output.