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. A few are accepted but unsupported and fail with a clear error: --aws-sigv4, --digest, --ntlm, --negotiate, --http1.0, --http3 and --ssl-no-revoke. See compat.md.
  • 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 like Hurl.
  • 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 (exit 1 when a file is not formatted)
hurlfmt --in-place FILEsonde fmt --write FILE (whitespace and line endings only; no reordering)
(a syntax check)sonde check FILE (exit 2 on a syntax error)
hurlfmt --in curlsonde import curl INPUT -o DIR (options Sonde cannot send yet, such as --digest, are kept with a warning)
hurlfmt --out curl FILEsonde export curl FILE
hurlfmt --out json / --out htmlNot provided
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
HTTP/3when libcurl supports itnot supported

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