{"id":24873895,"url":"https://github.com/pavelzw/pixi-diff","last_synced_at":"2025-04-13T09:12:33.723Z","repository":{"id":274125925,"uuid":"921948977","full_name":"pavelzw/pixi-diff","owner":"pavelzw","description":"Generate JSON diffs between pixi lockfiles","archived":false,"fork":false,"pushed_at":"2025-04-01T17:37:14.000Z","size":5203,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T09:12:23.930Z","etag":null,"topics":["conda","pixi"],"latest_commit_sha":null,"homepage":"https://pixi.sh/latest/advanced/lockfile_diffs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pavelzw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-24T23:40:30.000Z","updated_at":"2025-04-01T07:41:02.000Z","dependencies_parsed_at":"2025-01-25T04:22:18.946Z","dependency_job_id":"9c11a13f-d058-4cca-9fc9-261709d934bc","html_url":"https://github.com/pavelzw/pixi-diff","commit_stats":null,"previous_names":["pavelzw/pixi-diff"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelzw%2Fpixi-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelzw%2Fpixi-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelzw%2Fpixi-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelzw%2Fpixi-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pavelzw","download_url":"https://codeload.github.com/pavelzw/pixi-diff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688566,"owners_count":21145766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conda","pixi"],"created_at":"2025-02-01T06:18:57.697Z","updated_at":"2025-04-13T09:12:33.714Z","avatar_url":"https://github.com/pavelzw.png","language":"Rust","funding_links":[],"categories":["Extensions"],"sub_categories":["Example projects"],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![License][license-badge]](LICENSE)\n[![CI Status][ci-badge]][ci]\n[![Conda Platform][conda-badge]][conda-url]\n[![Conda Downloads][conda-downloads-badge]][conda-url]\n[![Project Chat][chat-badge]][chat-url]\n[![Pixi Badge][pixi-badge]][pixi-url]\n\n[license-badge]: https://img.shields.io/github/license/pavelzw/pixi-diff?style=flat-square\n[ci-badge]: https://img.shields.io/github/actions/workflow/status/pavelzw/pixi-diff/ci.yml?style=flat-square\u0026branch=main\n[ci]: https://github.com/pavelzw/pixi-diff/actions/\n[conda-badge]: https://img.shields.io/conda/vn/conda-forge/pixi-diff?style=flat-square\n[conda-downloads-badge]: https://img.shields.io/conda/dn/conda-forge/pixi-diff?style=flat-square\n[conda-url]: https://prefix.dev/channels/conda-forge/packages/pixi-diff\n[chat-badge]: https://img.shields.io/discord/1082332781146800168.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2\u0026style=flat-square\n[chat-url]: https://discord.gg/kKV8ZxyzY4\n[pixi-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json\u0026style=flat-square\n[pixi-url]: https://pixi.sh\n\n\u003c/div\u003e\n\n![pixi-diff demo](.github/assets/demo/demo-light.gif#gh-light-mode-only)\n![pixi-diff demo](.github/assets/demo/demo-dark.gif#gh-dark-mode-only)\n\n# pixi-diff\n\nA simple executable to generate a JSON diff (similar to `pixi update --json`) between two pixi lockfiles.\n\n```text\n$ pixi-diff pixi.lock.old pixi.lock.new\n{\n  \"version\": 1,\n  \"environment\": {\n    \"default\": {\n      \"osx-arm64\": [\n        {\n          \"name\": \"libmpdec\",\n          \"before\": null,\n          \"after\": {\n            \"conda\": \"https://conda.anaconda.org/conda-forge/osx-arm64/libmpdec-4.0.0-h99b78c6_0.conda\",\n            \"sha256\": \"f7917de9117d3a5fe12a39e185c7ce424f8d5010a6f97b4333e8a1dcb2889d16\",\n            \"md5\": \"7476305c35dd9acef48da8f754eedb40\",\n            \"depends\": [\n              \"__osx \u003e=11.0\"\n            ],\n            \"license\": \"BSD-2-Clause\",\n            \"license_family\": \"BSD\",\n            \"size\": 69263,\n            \"timestamp\": 1723817629767\n          },\n          \"type\": \"conda\"\n        },\n// ...\n```\n\n## Install\n\n```bash\npixi global install pixi-diff\n```\n\nYou can also use this tool in a temporary environment using `pixi exec`:\n\n```bash\npixi exec pixi-diff pixi.lock.old pixi.lock.new\n```\n\n## Usage\n\n```text\nGenerate JSON diffs between pixi lockfiles\n\nUsage: pixi-diff [OPTIONS] [BEFORE] [AFTER]\n\nArguments:\n  [BEFORE]  First lockfile to be compared\n  [AFTER]   Second lockfile to be compared\n\nOptions:\n  -b, --before \u003cBEFORE\u003e                First lockfile to be compared\n  -a, --after \u003cAFTER\u003e                  Second lockfile to be compared\n      --manifest-path \u003cMANIFEST_PATH\u003e  Pixi manifest file. Used to determine whether a dependency is explicit\n  -v, --verbose...                     Increase logging verbosity\n  -q, --quiet...                       Decrease logging verbosity\n  -h, --help                           Print help\n  -V, --version                        Print version\n```\n\nYou can either specify both the old and new lockfile via CLI parameters:\n\n```bash\npixi-diff pixi.lock.old pixi.lock.new\n# or equivalently\npixi-diff --before pixi.lock.old --after pixi.lock.new\n```\n\nNamed pipes can be handy for comparing lockfiles from different states in your git history:\n\n```bash\n# bash / zsh\npixi-diff \u003c(git show HEAD~20:pixi.lock) pixi.lock\n# or equivalently\npixi-diff --before \u003c(git show HEAD~20:pixi.lock) --after pixi.lock\n\n# fish\npixi-diff (git show HEAD~20:pixi.lock | psub) pixi.lock\n# or equivalently\npixi-diff --before (git show HEAD~20:pixi.lock | psub) --after pixi.lock\n```\n\nOr specify either the \"before\" or \"after\" lockfile via stdin:\n\n```bash\ngit show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock\n```\n\nYou can specify the manifest path (this tool tries out `pixi.toml` and `pyproject.toml` if not specified) to add `explicit: true/false` to your JSON diff.\nIf no manifest file is found, `explicit: true/false` is not added to the diff.\n\n```bash\npixi-diff pixi.lock.old pixi.lock.new --manifest-path pixi.toml\n```\n\n### pixi-diff-to-markdown\n\nThis tool integrates with [pixi-diff-to-markdown](https://github.com/pavelzw/pixi-diff-to-markdown).\nYou can pass this tool's stdout to `pixi-diff-to-markdown` and generate markdown diffs this way.\n\n```bash\n$ git show HEAD~20:pixi.lock | pixi-diff --after pixi.lock | pixi-diff-to-markdown\n# Explicit dependencies\n...\n```\n\n#### View with md-tui\n\nYou can view this generated markdown file in your terminal using [md-tui](https://github.com/henriklovhaug/md-tui) (available on [conda-forge](https://prefix.dev/channels/conda-forge/packages/md-tui)).\n\n```bash\ngit show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock | pixi-diff-to-markdown \u003e diff.md\nmdt diff.md\n# or using pixi exec\ngit show HEAD~20:pixi.lock | pixi exec pixi-diff --before - --after pixi.lock | pixi exec pixi-diff-to-markdown \u003e diff.md\npixi exec -s md-tui -- mdt diff.md\n```\n\nA couple of issues with this approach:\n\n- md-tui does not support bold and italic links ([henriklovhaug/md-tui #91](https://github.com/henriklovhaug/md-tui/issues/91))\n- md-tui does not support footnotes ([henriklovhaug/md-tui #162](https://github.com/henriklovhaug/md-tui/issues/162))\n- md-tui does not support reading from stdin ([henriklovhaug/md-tui #167](https://github.com/henriklovhaug/md-tui/issues/167))\n- md-tui does not support Windows ([henriklovhaug/md-tui #168](https://github.com/henriklovhaug/md-tui/issues/168))\n- md-tui does not support the `\u003cdetails\u003e` tag ([henriklovhaug/md-tui #169](https://github.com/henriklovhaug/md-tui/issues/169))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavelzw%2Fpixi-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpavelzw%2Fpixi-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavelzw%2Fpixi-diff/lists"}