# Extension points — httpie/cli

> Canonical page: https://codevetter.com/unpack/httpie/extension-points

# Extension points — httpie/cli

Scanned commit 5b604c37c6c67e18e7c3e9aee6c88a8c22b98345 (2024-12-17). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Extension is designed around four setuptools entry-point groups consumed by a single `PluginManager`, which is itself just a `list` subclass with typed filters. Built-in behaviour is registered through the same mechanism, so formatters and auth methods are not special-cased. Beyond plugins, the CLI itself is data: `ParserSpec`/`Group`/`Argument` describe the interface declaratively, the manager's COMMANDS dict describes subcommands, and `CLI_TASKS` and `DAEMONIZED_TASKS` are plain dict dispatch tables. Adding output behaviour means either a FormatterPlugin or a new `BaseStream` subclass selected in `get_stream_type_and_kwargs`.
- The four plugin entry-point groups are `httpie.plugins.auth.v1`, `httpie.plugins.converter.v1`, `httpie.plugins.formatter.v1` and `httpie.plugins.transport.v1`, mapped to their base classes in `ENTRY_POINT_CLASSES`; adding a fifth category means editing that dict. — [httpie/plugins/manager.py#L18-24](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/manager.py#L18-L24) [httpie/plugins/base.py#L16-165](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/base.py#L16-L165)
- `plugin_manager` is a module-level singleton in httpie/plugins/registry.py where all builtins are registered (BasicAuthPlugin, DigestAuthPlugin, BearerAuthPlugin, HeadersFormatter, JSONFormatter, XMLFormatter, ColorFormatter) -- the canonical place to add a new builtin. — [httpie/plugins/registry.py#L9-21](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/registry.py#L9-L21)
- `PluginManager` exposes `register`/`unregister`/`filter` plus typed accessors (`get_auth_plugins`, `get_auth_plugin_mapping`, `get_formatters_grouped`, `get_converters`, `get_transport_plugins`), making runtime registration in tests a two-line operation. — [httpie/plugins/manager.py#L48-111](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/manager.py#L48-L111) [tests/test_transport_plugin.py#L37-47](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/tests/test_transport_plugin.py#L37-L47)
- A new `AuthPlugin` needs only `auth_type` plus `get_auth()`, and can tune behaviour through the class-level switches `auth_require`, `auth_parse`, `netrc_parse`, and `prompt_password` -- all of which `_process_auth` consults. — [httpie/plugins/base.py#L16-69](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/base.py#L16-L69) [httpie/cli/argparser.py#L301-351](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/argparser.py#L301-L351)
- `TransportPlugin` extension is prefix-based: `build_requests_session` mounts `plugin.get_adapter()` at `plugin.prefix`, which is how httpie-unixsocket-style schemes (e.g. `http+unix://`) plug in. — [httpie/plugins/base.py#L72-93](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/base.py#L72-L93) [httpie/client.py#L176-182](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/client.py#L176-L182)
- `FormatterPlugin` subclasses declare a `group_name` ('format' by default, 'colors' for ColorFormatter) and are collected by `get_formatters_grouped`; `Formatting.__init__` then instantiates only the groups named by `--pretty` and keeps those whose `self.enabled` is true. — [httpie/plugins/base.py#L124-141](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/base.py#L124-L141) [httpie/output/formatters/colors.py#L47](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/formatters/colors.py#L47) [httpie/output/processing.py#L26-42](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/processing.py#L26-L42)
- `ConverterPlugin` is the hook for binary payloads: `Conversion.get_converter(mime)` asks each registered converter's `supports(mime)` classmethod, and PrettyStream/BufferedPrettyStream call it when they hit a NUL byte, turning what would be a 'binary suppressed' notice into rendered text. — [httpie/plugins/base.py#L96-121](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/plugins/base.py#L96-L121) [httpie/output/processing.py#L16-23](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/processing.py#L16-L23) [httpie/output/streams.py#L198-253](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/streams.py#L198-L253)
- New CLI flags are added declaratively to a `Group` in httpie/cli/definition.py (with `short_help`, `help`, and optional `nested_options`), never by touching argparse directly -- `to_argparse` strips the HTTPie-only keys listed in `ARGPARSE_IGNORE_KEYS` before delegating. — [httpie/cli/definition.py#L49-56](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/definition.py#L49-L56) [httpie/cli/options.py#L83-96](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/options.py#L83-L96) [httpie/cli/options.py#L184-219](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/options.py#L184-L219)
- Dynamically computed choice lists use the custom `lazy_choices` argparse action registered in `to_argparse`, so expensive enumerations (available Pygments styles, auth types, SSL versions) are only materialized when help or export-args is requested. — [httpie/cli/options.py#L118-129](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/options.py#L118-L129) [httpie/cli/options.py#L203-204](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/options.py#L203-L204) [httpie/cli/utils.py](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/utils.py)
- New manager subcommands plug into two places: the nested `COMMANDS` dict in httpie/manager/cli.py (which `generate_subparsers` walks recursively) and the `CLI_TASKS` dispatch dict in httpie/manager/tasks/__init__.py keyed by action name. — [httpie/manager/cli.py#L15-92](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/manager/cli.py#L15-L92) [httpie/manager/tasks/__init__.py#L6-11](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/manager/tasks/__init__.py#L6-L11) [httpie/manager/core.py#L26-42](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/manager/core.py#L26-L42)
- Background work plugs into `DAEMONIZED_TASKS`, a name->callable dict in daemon_runner.py; `_check_status` is an example entry that exists purely so tests can assert the spawn path works without touching the network. — [httpie/internal/daemon_runner.py#L12-27](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/internal/daemon_runner.py#L12-L27) [tests/test_update_warnings.py#L33](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/tests/test_update_warnings.py#L33)
- New session-format migrations plug into `FIXERS_TO_VERSIONS`, a version-string -> `fix_layout` callable mapping consulted by `upgrade_session` via `is_version_greater`. — [httpie/manager/tasks/sessions.py#L11-14](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/manager/tasks/sessions.py#L11-L14) [httpie/manager/tasks/sessions.py#L44-58](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/manager/tasks/sessions.py#L44-L58) [httpie/utils.py#L293-309](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/utils.py#L293-L309)
- New request-item separators plug into the `rules` dict inside `RequestItems.from_args`, which maps each separator constant to a (processor_func, target_dict) tuple -- plus membership in the relevant frozenset in cli/constants.py. — [httpie/cli/requestitems.py#L43-119](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/requestitems.py#L43-L119) [httpie/cli/constants.py#L29-72](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/cli/constants.py#L29-L72)
- New output stream behaviour plugs into `get_stream_type_and_kwargs`, the single factory that maps (isatty, prettify groups, stream flag, message type) onto RawStream / EncodedStream / PrettyStream / BufferedPrettyStream and their kwargs. — [httpie/output/writer.py#L153-203](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/writer.py#L153-L203) [httpie/output/streams.py#L88-236](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/streams.py#L88-L236)
- Colour themes plug in via `make_styles()`, which generates one header style and one body style per entry in `SHADE_TO_PIE_STYLE` and merges the resulting names into `BUNDLED_STYLES` that `--style` offers. — [httpie/output/formatters/colors.py#L360-388](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/formatters/colors.py#L360-L388) [httpie/output/ui/palette.py](https://github.com/httpie/cli/blob/5b604c37c6c67e18e7c3e9aee6c88a8c22b98345/httpie/output/ui/palette.py)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
