A diff tool for checking the Yaml, Json files while developing cloud based applications
Project description
cloud-diff
yaml-json-diff - YAML & JSON Diff Tool with AI Explanations
yaml-json-diff is a Python CLI tool and library based on DeepDiff for computing the difference between YAML and JSON files.
It also offers optional AI-powered explanations of the diffs using local language models via Ollama.
Features
- Compare two
.yaml,.yml, or.jsonfiles - Human-readable or JSON-formatted diff outputs
- Optional AI-generated summary of changes (
--explain) using LLMs like Mistral, LLaMA via Ollama - Clean CLI interface via Typer
- Docker support
Installation
From PyPI
pip install yaml-json-diff
From GitHub (latest)
pip install git+https://github.com/pooya-rostami/yaml-json-diff.git
Poetry (local dev)
git clone https://github.com/pooya-rostami/yaml-json-diff.git
cd yaml-json-diff
poetry install --only main
Usage
CLI
yaml-json-diff FILE1 FILE2 [OPTIONS]
Options:
| Option | Description |
|---|---|
--explain, -e |
Generate an AI explanation of the diff using a local LLM (via Ollama) |
--model, -m |
Model to use for explanation (default: mistral) |
Examples
Basic diff:
yaml-json-diff config-v1.yaml config-v2.json
With AI Explanation:
yaml-json-diff config-old.json config-new.json --explain
Using a Custom Ollama Model:
yaml-json-diff file1.yaml file2.yaml --explain --model llama3
AI Support via Ollama
To use the --explain feature:
-
Install Ollama from https://ollama.com
-
Ensure Ollama is running:
ollama run mistral
- Use the
--explainflag in the CLI
By default, the tool uses the mistral model. You can switch to another model like llama3, codellama, etc.
Contributions
Contributions are very welcome! Feel free to report bugs or suggest new features using GitHub issues and/or pull requests.
License
This tool is distributed under GNU Lesser General Public License v3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloud_diff-0.1.0.tar.gz.
File metadata
- Download URL: cloud_diff-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.4 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a011e3f4ced671f33c4649375072f2d05850ec5815ff57a7ec69276f592be5c3
|
|
| MD5 |
7605199a487b710a608b67bf38548fb5
|
|
| BLAKE2b-256 |
d996fa3779a8c23ab1aca764ee30a063ca06eb0c0d7bc9577e390f7b59e2043d
|
File details
Details for the file cloud_diff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cloud_diff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.4 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b002f11f9ca7471447c1d934c0ce284b30ff79d559423c21f2f2f4963aad782
|
|
| MD5 |
d5a3d65521956ef8f1a63d05eadf96ce
|
|
| BLAKE2b-256 |
8aa505617159390617481f1cf040e14bf0c51fd829471d26bc34ba564ce1c740
|