curl vs httpie
curl's C protocol engine vs HTTPie's Python human-first CLI — same problem, opposite philosophies.
| curl/curl | httpie/cli | |
|---|---|---|
| Files scanned | 4000 | 262 |
| Size | 14.1 MB | 969 KB |
| Primary source root | lib/ | httpie/ |
| Top language | C (1043 files) | Python (133 files) |
| Package | — | — |
| Structural health | 10/10 avg, 0 hotspots | 8.1/10 avg, 7 hotspots |
| Test signal | missing | missing |
Architectures
curl
This is the curl project at 8.23.0-DEV: a C89-portable transfer library (libcurl, `lib/`, ~393 files) plus the `curl` command-line tool (`src/`, ~96 files) that is a thin client of that library. libcurl speaks ~25 URI schemes (HTTP/1-2-3, FTP(S), SMTP/IMAP/POP3, SCP/SFTP, LDAP, MQTT, RTSP, TFTP, DICT, Gopher, Telnet, WS(S), file) through a scheme registry of `struct Curl_scheme` records, and layers transport concerns (happy-eyeballs, SOCKS, HTTP proxy, HAProxy, TLS, QUIC, HTTP/2) as a stackable chain of connection filters rather than protocol-specific socket code. What is distinctive is the amount of pluggability compiled in: six TLS backends, two QUIC backends, two SSH backends, three DNS resolver strategies, ~50 `CURL_DISABLE_*` build knobs, and a ~2,100-case integration test suite driven by in-tree protocol servers. The audience is everyone from distro maintainers embedding libcurl to contributors adding a protocol or a command-line option.
httpie
HTTPie CLI is a Python-implemented, human-friendly command-line HTTP client that ships three console entry points -- `http`, `https`, and the `httpie` management interface -- all wired through `httpie.core.raw_main` (setup.cfg:70-74, httpie/core.py:32). Its distinguishing trait is a request-item mini-language (`Name:Value`, `name==value`, `field=value`, `field:=json`, `field@file`) that argparse parses into headers/params/data/files before delegating the actual transport to `requests` with HTTPie-specific adapters layered on top (httpie/cli/constants.py:15-27, httpie/client.py:43). Around that core sit a colorized/prettified output pipeline built on Pygments and Rich, JSON-file-backed sessions and config, a pip-driven plugin installer, and a detached background updater daemon. It targets API developers and shell scripters on Python 3.7-3.12 across Linux, macOS, and Windows, and is packaged for PyPI, Homebrew, Snap, Chocolatey, Fedora, and as a standalone PyInstaller binary.
System maps
curl
Two build artefacts share one repo: `lib/` builds libcurl, `src/` builds the `curl` tool on top of the public headers in `include/curl/`. The tool owns argv parsing, output files, globbing and retries; libcurl owns URL parsing, connection reuse, the multi state machine, and the filter chain that actually moves bytes. Backends live in `lib/vtls` (TLS), `lib/vquic` (QUIC/HTTP3), `lib/vssh` (SCP/SFTP), `lib/vauth` (SASL/NTLM/Kerberos), `lib/vdns` (resolvers + DoH), with `lib/curlx/` as the portability/utility layer shared by both. There is no database — persistence is flat files (cookie jar, HSTS, alt-svc, TLS session cache) plus whatever the user redirects output to. Two parallel build systems (autotools via `configure.ac`/`Makefile.am` and CMake via a 93KB `CMakeLists.txt`) are both first-class and CI-verified against each other.
httpie
Three console_scripts entry points converge on a single error-handling shell: `http`/`https` map to `httpie.__main__:main` and `httpie` maps to `httpie.manager.__main__:main`, both of which call `httpie.core.raw_main` with a different parser and main_program. The package splits into `cli/` (argparse spec, request-item parsing, nested-JSON), `client.py` (requests glue), `output/` (streams, formatters, Rich UI), `sessions.py`/`config.py` (JSON persistence under the config dir), `plugins/` (entry-point registry), `manager/` (the `httpie` admin subcommands), and `internal/` (background update daemon). There is no database -- all state is JSON files under `$HTTPIE_CONFIG_DIR` or the XDG config dir. External integrations are the `requests`/`urllib3` stack, Pygments, Rich, defusedxml, requests-toolbelt, and `pip` shelled out for plugin installation. Build/test is Makefile-driven (`make install`, `make test`, `make codestyle`) with GitHub Actions running a 3-OS x 6-Python x pyopenssl matrix.
Repository structure
curl
tests/— 2178 filesdocs/— 1070 fileslib/— 393 filessrc/— 96 filesprojects/— 74 files.github/— 53 filesscripts/— 40 filesCMake/— 31 files
httpie
tests/— 102 fileshttpie/— 78 filesdocs/— 31 files.github/— 19 filesextras/— 16 files