hen 0.19.0

Run protocol-aware API request collections from the command line or through MCP.
Documentation
---
title: Run Hen from the CLI
description: Use run, verify, and inspect from the terminal for local workflows and automation.
---

Hen has three primary commands:

- `hen run` executes a collection or request
- `hen verify` parses and validates a collection without making requests
- `hen inspect` exposes machine-readable authoring structure for editor tooling and automation

## Pick the right command

| Command | Use it when you want to... |
| --- | --- |
| `hen run` | execute a collection or one request |
| `hen verify` | validate structure before anything runs |
| `hen inspect` | expose authoring data to editors or scripts |

## Common flows

```bash
hen verify ./examples/lorem.hen
hen run ./examples/lorem.hen 0
hen run ./examples/lorem.hen all --non-interactive
hen inspect ./examples/lorem.hen --output json
```

## Selection and prompts

- If a directory contains one `.hen` file, Hen selects it automatically.
- If a collection contains multiple requests, provide an index or `all` to bypass the picker.
- The text CLI prompts for unresolved `[[ prompt ]]` placeholders.
- `--non-interactive` disables selection prompts and fails when required prompt values are
  missing.
- Use repeated `--input key=value` flags to provide prompt values up front.
- Use `--env <name>` to apply a named collection environment before request execution.

## Output formats

Choose the output format that matches the workflow:

| Format | Best for |
| --- | --- |
| `text` | terminal-first use |
| `json` | structured automation |
| `ndjson` | streaming machine-readable logs |
| `junit` | CI test reporting |

```bash
hen run ./examples/lorem.hen all --non-interactive --output json
hen inspect ./examples/lorem.hen --output json
```

## Useful options

- `--body none|selected|failed|all`
- `--parallel`
- `--max-concurrency N`
- `--continue-on-error`
- `--benchmark N`
- `--export`
- `--verbose`

For the full command surface, argument list, and option descriptions, see the
[CLI Reference](./reference.md).