Skip to main content

comparo

Validate HTTP behavior and selected semantic differences across environments.

Comparo executes the same logical HTTP input against environments such as development, staging, and production. It evaluates per-environment assertions, compares selected environment pairs under explicit diff profiles, and can reduce those facts into a CI gate verdict.

Install

Requires Python 3.13 or newer. Install the published command with pipx:

pipx install comparo
comparo --help

Alternatively, install into a Python virtual environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install comparo
comparo --help

To update an existing pipx installation, run pipx upgrade comparo. The published version is currently 0.2.0; this branch documents the proposed 0.3.0 release. Its rebuilt commands and configuration become available through that release. To try this branch before publication, use the development setup.

Terminal preview

Comparo Reports workspace with a searchable run archive and selected result details

The upcoming 0.3.0 interface, captured from the running app with example report data.

Status

Comparo is alpha software. The production core, local CLI, and terminal UI have been rebuilt around the comparo/v1alpha1 configuration lineage; the former prototype is quarantined and is not a compatibility target. The canonical TUI is comparo.tui, with Explore, Launch, Reports, Settings, and a component Debug gallery. Dedicated CI integration has not yet been migrated.

The current implementation status records supported surfaces, remaining gaps, and the distinction between this unreleased working tree and the older v0.2.0 release history. The next version is prepared through a PR and released by GitHub Actions after CI and review; it has not been published yet.

The executable subset is deliberately fail-closed: configuration can describe more of the future model than the first production runtime implements, and an execution command rejects unsupported capabilities before resolving values, performing DNS, or opening a network connection. Review the current CLI limitations before using Comparo for a real service. This remains a pre-production release.

CLI

The command graph includes offline schema, validation, planning, diagnostics, and sanitized render journeys; shared production run, diff, and exec journeys; and authenticated artifact/report readers. From a directory containing your comparo.yaml project:

comparo --help
comparo validate --config comparo.yaml
comparo plan --config comparo.yaml --format json
comparo run --config comparo.yaml --env staging
comparo
comparo tui --config comparo.yaml

Local execution defaults to the explicitly permissive trusted-local authority. A project used in CI or obtained from an untrusted source must be paired with an operator-owned policy outside that project:

comparo diff \
  --config comparo.yaml \
  --policy /operator/policies/comparo-ci.yaml \
  --baseline production \
  --candidate staging

See the CLI reference for headless commands, trust semantics, exit codes, persistence, and runtime limits, and the TUI guide for the component-based terminal journey.

Terminal workflow

  • Explore resources and send a selected Request or ExecutionProfile to Launch with c.
  • Configure Target, prepare with Ctrl+R, review Plan, and execute with Ctrl+X.
  • Follow live request status, timing and rule outcomes; explicitly open Analyze after completion.
  • Reopen saved results in Reports using the same Analyze view. Press i to page captures, inspect JSON/SSE, or review a sanitized cURL command.
  • Save a manual target as a new ExecutionProfile after reviewing its YAML.
  • Use Settings for persistent appearance, mouse, startup-workspace and shortcut preferences.

These are default keys; Settings can remap the main workspace, Launch and Analyze commands. See the TUI guide for controls and limits.

Examples

The repository includes three runnable local projects backed by one deterministic loopback demo service. They cover a passing quickstart, deliberate cross-Environment drift, Environment-local values, execution profiles, and a larger two-Matrix TUI showcase. From a repository checkout, start the demo in one terminal:

python examples/support/demo_server.py

Then open the showcase in another terminal:

comparo tui --config examples/tui-showcase/comparo.yaml

See the example project guide for the expected outcomes and suggested Explore, Launch, and Reports journeys.

Architecture

The refactor is built from an immutable, framework-independent domain center. Configuration, networking, persistence, CLI, and TUI concerns are adapters around that core.

The canonical product promise, security boundary, configuration model, HTTP semantics, assertion and diff pipelines, artifact rules, and compatibility policy are recorded in those documents.

Development

Comparo requires Python 3.13 or newer and uses uv for reproducible environments:

uv sync --frozen
uv run --frozen ruff check .
uv run --frozen ruff format --check .
uv run --frozen mypy
uv run --frozen lint-imports
uv run --frozen python -m pytest --cov --cov-report=term-missing

See CONTRIBUTING.md for repository conventions.

License

MIT © Walid Benbihi

Metadata

Release files for comparo 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for comparo 0.3.0
File Size Uploaded Provenance Actions
comparo-0.3.0.tar.gz 880.1 kB With provenance Details for comparo-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for comparo 0.3.0
File Interpreter ABI Platform Actions
comparo-0.3.0-py3-none-any.whl Python 3 none any Details for comparo-0.3.0-py3-none-any.whl

Total release size: 2.0 MB

Release files / comparo-0.3.0.tar.gz

Download URL comparo-0.3.0.tar.gz
Size 880.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5e456a9b59eed42d48a257c8f7e435a00e330fe302670a877c2ba8bf5d1a3d2f
BLAKE2b-256 checksum
How to use checksums
431d74200f1a17f05d12def7eb3172fbe43048ae13b0c3a511f62a4b173d933d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / comparo-0.3.0-py3-none-any.whl

Download URL comparo-0.3.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
238273a0b4c723230df195d46db6562f82dff4eb95ca7882d0b0327705027c82
BLAKE2b-256 checksum
How to use checksums
e09a69d784bf08cd42d761bbb82420f4e2f85ca28f38c18d50a7823472f48826
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for comparo 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for comparo-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page