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. This branch prepares 0.4.0 on top of the tagged v0.3.0 baseline. Its Explorer changes and init command require the checkout until the next release is published. Follow the development setup, then launch the checkout explicitly:

.venv/bin/comparo tui --config examples/explorer-inspection/comparo.yaml

A bare comparo may select a separately installed pipx version. Restart the TUI after changing Python code; project reload does not reload application modules.

Terminal preview

Explorer Body inspection with nested JSON, a blue boolean and a violet masked secret

The 0.4.0 Body inspector, captured from this checkout. The header still reports package metadata 0.3.0 until automated release versioning. See the 0.4.0 notes and the Reports preview.

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 the 0.4.0 branch changes and the tagged 0.3.0 baseline. 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. Start a project in the current directory:

comparo init

This creates a starter comparo.yaml with two local Environments, a health Request, and assertion and comparison profiles. By default all starter resources are in this one file; comparo init --layout split also creates .comparo/ with separate environment, request, and profile files. Edit the baseUrl values and /health endpoint to match your APIs. Use comparo init my-project to create it in another directory; existing manifests are never overwritten.

Read bundled documentation, enable shell completion, or install the AI authoring skill:

comparo docs quickstart
comparo completion install zsh
comparo skill install

Docs use Rich formatting in an interactive terminal and clean Markdown when redirected. Use --format markdown or --format json for explicit raw output. The skill is installed in the current project's .agents/skills/comparo/; use --user for personal installation. In Codex, ask it to use $comparo to configure comparisons from your API specification or route tests. See the bundled AI authoring guide and completion guide.

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, follow their relationships and return with Escape. Resolve a Value or browse Matrix cases with r without choosing a consumer. Inspect Request Body paths and nested local Schema references. Masked values are violet; JSON booleans are blue.
  • 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 executable local projects backed by one deterministic loopback demo service, plus an Explorer inspection fixture that needs no server. 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:

uv run --frozen python examples/support/demo_server.py

Then open the showcase in another terminal:

.venv/bin/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.4.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.4.0
File Size Uploaded Provenance Actions
comparo-0.4.0.tar.gz 921.2 kB With provenance Details for comparo-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.1 MB

Release files / comparo-0.4.0.tar.gz

Download URL comparo-0.4.0.tar.gz
Size 921.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c4cc503c936c4d9c70f4af13fc6744738c32127207e2e1afcddd1fefed8b4ea3
BLAKE2b-256 checksum
How to use checksums
a1edddf16f962252d738eda7aa59b47f6545e1d366323349a5587f57a8e8e935
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 9, 2026.

Transparency log

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

Download URL comparo-0.4.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e68402275d9c3109c27e90dfabe12f223e794ee5fdf8191b6ee202940ca50ce2
BLAKE2b-256 checksum
How to use checksums
14914115ee083a6a6b7f238c5c201da5e79f0bfd6f9b86fce4ad383d217115cb
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 9, 2026.

Transparency log

Security for comparo 0.4.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.4.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 9, 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