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.
.hurlfiles run unchanged, andsonde fmtkeeps them valid for Hurl..sondefiles use the same syntax in v1. - Flags. Every Hurl flag has the same name and meaning.
--ssl-no-revokeis 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-headerand--http2-prior-knowledgework 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 readsexpected: 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 theAuthorizationandCookieheaders (--location-trustedkeeps them). - Environment variables.
HURL_*variables work, includingHURL_VARIABLE_nameandHURL_SECRET_name. Each also has aSONDE_*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
130when the run is interrupted with Ctrl-C.
Commands
| Hurl | Sonde |
|---|---|
hurl FILE… | sonde FILE… or sonde run FILE… |
hurl --test FILE… | sonde --test FILE… or sonde test FILE… |
hurlfmt --check FILE | sonde fmt --check FILE (same output; exit 1, not 3, when a file is not formatted) |
hurlfmt --in-place FILE | sonde fmt --write FILE (same layout, section order included) |
| (a syntax check) | sonde check FILE (exit 2 on a syntax error) |
hurlfmt --in curl | sonde import curl INPUT -o DIR |
hurlfmt --out curl FILE | sonde 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 FILE | sonde --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.
| Area | Hurl | Sonde |
|---|---|---|
Default User-Agent | hurl/<version> | sonde/<version> (SONDE_DEFAULT_USER_AGENT replaces it) |
Secrets in --json | printed | redacted (***), as in every other output |
File paths in [Options] (cacert, cert, key, …) | any path | confined to the file root |
| A symbolic link leaving the file root | followed | denied |
Response body without --max-filesize | unlimited | 512 MiB |
--http3 | HTTP/3, racing TCP | QUIC first, then TCP if it cannot connect (never through a proxy) |
Tokens of --digest, --ntlm, --negotiate, --aws-sigv4 | printed in verbose output | redacted |
What Sonde adds
sonde.yamlenvironments. Named sets of variables and secrets files, selected with--env(sonde-yaml.md).- OpenAPI contracts.
--openapi spec.yamlchecks every response against a spec (openapi.md). - Data-driven runs.
--data rows.csvruns a file once per row (data-driven.md). - Importers.
sonde importreads curl commands, Postman collections, OpenCollection files,.httpfiles 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.