Skip to main content

CLI Reference

This page covers the command forms, arguments, and options exposed by the Hen CLI.

Top-level command

hen [OPTIONS] [PATH] [SELECTOR]
hen run [OPTIONS] [PATH] [SELECTOR]
hen verify [OPTIONS] <PATH>
hen inspect [OPTIONS] <PATH>
hen import <SPEC_PATH> [SELECTOR] --output <OUTPUT_PATH>

The default hen [PATH] [SELECTOR] form behaves like hen run [PATH] [SELECTOR].

Common arguments

ArgumentMeaning
PATHpath to a .hen collection or a directory containing one
SELECTORrequest index or all

hen import

Use hen import to lower an OpenAPI 3.0.x or 3.1.x JSON or YAML spec into an editable .hen collection.

Supported schema lowering in this slice includes plain component aliases, object-shaped allOf, named oneOf(...) and anyOf(...) unions, scalar const(...) tags, and discriminator(...) unions when the source OpenAPI shape is representable in Hen.

Arguments

ArgumentMeaning
SPEC_PATHpath to an OpenAPI JSON or YAML document
SELECTORoptional operation selector: all, index, operationId, METHOD /path, or tag:name

Options

OptionMeaning
--output <OUTPUT_PATH>destination .hen file to write

Example

hen import ./examples/openapi_import.yaml --output ./examples/openapi_imported.hen

hen run

Use hen run to execute a collection or a single request.

Options

OptionMeaning
--env <ENV>select a named collection environment
--input key=valueprovide a prompt value up front
--non-interactivefail instead of prompting for collection or request selection
--output <FORMAT>render output as text, json, ndjson, or junit
--body <MODE>show response bodies in text output for none, selected, failed, or all requests
--parallelexecute independent requests concurrently
--max-concurrency <N>limit concurrency when running with --parallel
--continue-on-errorkeep unaffected dependency branches running after a failure
--benchmark <N>benchmark a request instead of running it once
--exportrender the selected request as a curl command
--verbose, -vinclude more detail in text output and enable debug logging

Examples

hen run ./examples/lorem.hen 0
hen run ./examples/lorem.hen all --non-interactive --output json
hen run ./examples/environment_overrides.hen 0 --env local --input client_id=demo

hen verify

Use hen verify to parse and validate a collection without executing shell substitutions or HTTP requests.

Options

OptionMeaning
--output <FORMAT>render output as text, json, ndjson, or junit

Example

hen verify ./examples/lorem.hen

hen inspect

Use hen inspect when tooling needs collection summaries, declarations, symbols, request metadata, and required inputs without executing the collection.

Options

OptionMeaning
--output <FORMAT>render output as text, json, or ndjson

Example

hen inspect ./examples/lorem.hen --output json

Output formats

FormatSupported by
textrun, verify, inspect
jsonrun, verify, inspect
ndjsonrun, verify, inspect
junitrun, verify