| Crates.io | curpare |
| lib.rs | curpare |
| version | 0.2.2 |
| created_at | 2025-06-08 18:55:05.125916+00 |
| updated_at | 2025-09-19 20:16:01.448338+00 |
| description | Takes multiple web links and compare their results between eachother |
| homepage | https://github.com/Mclilzee/curpare |
| repository | https://github.com/Mclilzee/curpare |
| max_upload_size | |
| id | 1705170 |
| size | 262,819 |
Curpare is a powerful tool designed to compare the return values, status codes, and bodies of JSON APIs seamlessly. It leverages git-delta to present the output in a clear and user-friendly manner. With Curpare, you can define multiple API endpoints to compare, utilize environment variables, and specify various options for each comparison.

To get started with Curpare, ensure you have git delta installed. Here is a link to the installation page https://dandavison.github.io/delta/installation.html.
If you have cargo you can install it using cargo install curpare
Or you can download one of the already pre-compiled versions if its available to your OS. Otherwise currently you will have to compile it from source using cargo
To use Curpare, run the following command:
curpare [OPTIONS]
<PATH>: Path to the TOML file containing the URL configurations. The configuration should be a map of a list of requests, each with a name and an object containing left and right comparisons.The TOML configuration example with only mandatory fields making two requests comparison:
[[requests]]
name = "Example comparison 1"
[requests.left]
url = "https://pokeapi.co/api/v2/pokemon/ditto"
[requests.right]
url = "https://pokeapi.co/api/v2/pokemon/charizard"
[[requests]]
name = "Example comparison 2"
[requests.left]
url = "https://pokeapi.co/api/v2/pokemon/squirtle"
[requests.right]
url = "https://pokeapi.co/api/v2/pokemon/ivysaur"
More Fields example
ignore_lines = []
[[requests]]
name = "Example comparison 1"
ignore_lines = []
[requests.left]
url = "http://localhost:5000/data"
cached = false
method = "GET"
[requests.left.headers]
Accept = "application/json"
[requests.left.basic_auth]
username = "example"
password = "example1234"
[requests.left.query]
limit = "10"
sort = "desc"
[requests.right]
url = "http://localhost:5000/data"
ignore_lines = []
cached = false
method = "GET"
[requests.right.headers]
Accept = "application/json"
Bearer = "jhdsn3qe2w784yn0n3"
[requests.right.query]
sort = "desc"
You can use environmental variables in your TOML configuration. To do this, wrap the variable in ${}. For example, if you have an environmental variable HOST=https://google.com, you can use it in your TOML as follows:
url: "${HOST}/query"
-c, --clear-cache: Clear old cache for this TOML configuration.-a, --all-cache: Cache all calls for this TOML configuration.-n, --no-cache: Do not use cache for any calls for this TOML configuration.-i, --skip-ignore: Skip all ignore lines during comparison.-h, --help: Print help information.-V, --version: Print the version of Curpare.To compare two APIs, create a TOML configuration file (e.g., config.toml) and run:
curpare config.toml
This will execute the comparisons defined in your JSON file and display the results using git-delta.
Curpare is an essential tool for developers and testers who need to compare API responses efficiently. With its caching system, flexible configuration, and clear output, it simplifies the process of API testing and validation. For more information, check the documentation or explore the source code on GitHub.