Sonde
Guides

Migrating from Hurl

Switching from Hurl: commands, flags, differences, what Sonde adds

Sonde runs Hurl 8.0.1 files as they are and accepts Hurl's command line, so most projects switch by replacing the command name. This guide lists what stays the same, what maps to something else, and what Sonde adds. Every known difference is in compat.md.

What stays the same

  • Files. .hurl files run unchanged, and sonde fmt keeps them valid for Hurl. .sonde files use the same syntax in v1.
  • Flags. Every Hurl flag has the same name and meaning. --ssl-no-revoke is accepted and has no effect (sonde checks no certificate revocation). See compat.md.
  • Options from Hurl 8.1.0. --fail-with-body, --no-header, --no-jsonpath-coercion, --proxy-header and --http2-prior-knowledge work as flags, [Options] keys, HURL_* variables and config file keys, wherever Hurl has them. Sonde also follows 8.1.0's messages: a failed != assert reads expected: not <value>, and a JSON body nested deeper than 128 levels is a parse error. As in 8.1.0, a redirect to another host drops the [Cookies] cookies, like the Authorization and Cookie headers (--location-trusted keeps them).
  • Environment variables. HURL_* variables work, including HURL_VARIABLE_name and HURL_SECRET_name. Each also has a SONDE_* form, which wins when both are set.
  • Config file. Sonde reads $XDG_CONFIG_HOME/hurl/config (or ~/.config/hurl/config) with every key of the reference implementation, and so does the desktop app. See compat.md.
  • Exit codes. They are the same, plus 130 when the run is interrupted with Ctrl-C.

Commands

HurlSonde
hurl FILE…sonde FILE… or sonde run FILE…
hurl --test FILE…sonde --test FILE… or sonde test FILE…
hurlfmt --check FILEsonde fmt --check FILE (same output; exit 1, not 3, when a file is not formatted)
hurlfmt --in-place FILEsonde fmt --write FILE (same layout, section order included)
(a syntax check)sonde check FILE (exit 2 on a syntax error)
hurlfmt --in curlsonde import curl INPUT -o DIR
hurlfmt --out curl FILEsonde export curl FILE
hurlfmt --out json / --out html [--standalone]sonde export json FILE / sonde export html [--standalone] FILE (same output, see compat.md)
hurl --curl FILEsonde --curl FILE (same format; secrets redacted)

What behaves differently

The table below lists the differences you are most likely to notice. compat.md has the full list.

AreaHurlSonde
Default User-Agenthurl/<version>sonde/<version> (SONDE_DEFAULT_USER_AGENT replaces it)
Secrets in --jsonprintedredacted (***), as in every other output
File paths in [Options] (cacert, cert, key, …)any pathconfined to the file root
A symbolic link leaving the file rootfolloweddenied
Response body without --max-filesizeunlimited512 MiB
--http3HTTP/3, racing TCPQUIC first, then TCP if it cannot connect (never through a proxy)
Tokens of --digest, --ntlm, --negotiate, --aws-sigv4printed in verbose outputredacted

What Sonde adds

  • sonde.yaml environments. Named sets of variables and secrets files, selected with --env (sonde-yaml.md).
  • OpenAPI contracts. --openapi spec.yaml checks every response against a spec (openapi.md).
  • Data-driven runs. --data rows.csv runs a file once per row (data-driven.md).
  • Importers. sonde import reads curl commands, Postman collections, OpenCollection files, .http files and OpenAPI specs (import-export.md).

Running both side by side

The conformance harness runs Hurl's own test scripts with a hurl wrapper that calls Sonde (conformance.md). You can do the same to check a project before switching. Put a script named hurl first on PATH that runs exec sonde "$@", then run your existing CI script.

Edit on GitHubLast updated