hurl-workbench-cli: Command-line interface for hurl-workbench

[ bsd3, library, program, testing, web ] [ Propose Tags ] [ Report a vulnerability ]

A Haskell-powered Hurl workbench for composing, exploring, executing, and testing reusable API workflows without duplicating request templates. . This package provides the hurl-workbench executable (validate, list, render, run, test, matrix, doctor, and shell completions) for recipes, matrices, and integration suites, built on hurl-workbench-core, together with runnable example workspaces.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.20 && <5), bytestring (>=0.11 && <0.13), containers (>=0.6 && <0.8), directory (>=1.3 && <1.4), filepath (>=1.4 && <1.6), generic-lens (>=2.3 && <2.4), githash (>=0.1.7 && <0.2), http-types (>=0.12 && <0.13), hurl-workbench-cli, hurl-workbench-core (>=0.1.0.0 && <0.2), lens (>=5.3 && <5.4), optparse-applicative (>=0.19 && <0.20), temporary (>=1.3 && <1.4), terminal-size (>=0.3.4 && <0.4), text (>=2.1 && <2.2), unix (>=2.8.8 && <2.9), wai (>=3.2.5 && <3.3), warp (>=3.4.16 && <3.5) [details]
License BSD-3-Clause
Copyright (c) 2026 Nadeem Bitar
Author Nadeem Bitar
Maintainer nadeem@gmail.com
Uploaded by shinzui at 2026-11-12T19:04:46Z
Category Web, Testing
Distributions
Executables hurl-workbench-fixture-server, hurl-workbench
Downloads 2 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for hurl-workbench-cli-0.1.0.0

[back to package description]

hurl-workbench

hurl-workbench composes complete Hurl entries into reusable workflows, supplies plain and secret parameters securely, and executes recipes, matrices, and integration suites through the official Hurl binary. Suites can manage several services, generate fresh scenario inputs, read caller-owned body files, and run application-owned executable assertions between Hurl batches. Hurl remains responsible for HTTP, captures, assertions, cookies, retries, and reports.

Suites default to shared application state: parallel Hurl runs require ReadOnly recipes, and shared writes require --jobs 1 --allow-mutating. Independent suites validate caller-provisioned fixture/endpoint assignments through --scenario-inputs; the caller establishes actual isolation. See the integration guide.

Five-minute quick start

Enter the pinned development environment and inspect the interface:

nix develop
cabal run hurl-workbench -- --help
cabal run hurl-workbench -- doctor

The small workspace in examples/quick-start/ defines one health fragment and workflow against the bundled Dhall schema. Its token is a secret parameter sourced from QUICKSTART_TOKEN; no credential is committed. Inspect, validate, and render it:

sed -n '1,240p' examples/quick-start/hurl-workbench.dhall
cabal run hurl-workbench -- --workspace examples/quick-start/hurl-workbench.dhall validate
cabal run hurl-workbench -- --workspace examples/quick-start/hurl-workbench.dhall render workflow health

Start the local fixture API in one terminal:

cabal run hurl-workbench-fixture-server -- --port 18080

Run the workflow from another terminal with an environment-backed fixture secret:

QUICKSTART_TOKEN=fixture-secret cabal run hurl-workbench -- \
  --workspace examples/quick-start/hurl-workbench.dhall \
  test workflow health

The expected result is a passing Hurl test summary. For full workflows, continue with:

Core model

A hurl-workbench.dhall manifest imports schema/package.dhall. Fragments are ordinary .hurl files containing one or more complete entries. A workflow names fragments in order; rendering preserves their bytes and inserts only the line feeds needed between them. Recipes add committed plain bindings and an explicit safety class. Matrices layer named cases over a recipe. Suites execute bounded Hurl batches separated by executable checks or named service Stop/Start/Restart barriers. Services become ready in declaration order and stop in reverse acquisition order before bounded teardown, including on failure and cancellation.

Plain, Secret, and Generated parameters have separate binding rules. Generated values resolve once per prepared Hurl execution; explicit runtime values reproduce a prior run. Use Plain inputs when setup, checks, and several Hurl runs must share an identity. Command environments can inherit ambient variables or explicitly select names through EnvironmentPolicy.Clean.

Execution commands accept --file-root DIR; suites can also name a Plain fileRootParameter. The caller keeps body files alive until execution ends. Keep report and output trees outside an explicit body root. A suite with executable checks requires --report-dir; captured check output stays in private files while the summary records named outcomes and relative paths.

Without --workspace, discovery starts at the current directory and walks upward looking for hurl-workbench.dhall. See the workspace reference, CLI reference, architecture, and security model. The guide index maps tasks to examples, and the OKF capability catalog records implemented contracts, evidence, and limits with stable CAP-N handles. These capabilities are currently unreleased and experimental.

Development

The repository contains hurl-workbench-core and hurl-workbench-cli, targets GHC 9.12.4, and uses a Nix flake for the complete toolchain.

nix develop
just check

just check initializes Cabal's Hackage index, whose solver view is pinned by cabal.project, then runs formatting, builds, tests, local examples, source-distribution checks, and the Nix flake gate. On a Mac with Apple container installed and its system service running, just linux-check runs that same gate in a disposable ARM64 Linux VM. Local examples include multi-service orchestration, file-body byte preservation, generated-input overrides, and matching/failing executable checks. Real application and database lease acceptance uses opt-in caller harnesses documented in the integration guide.

Release source archives use bash scripts/build-sdist.sh; this wrapper preserves executable modes for the declared check helpers. just sdist verifies the unpacked archives and their examples.

License

BSD-3-Clause — © 2026 Nadeem Bitar.