{"id":13769103,"url":"https://github.com/shini4i/argo-compare","last_synced_at":"2025-07-15T17:40:29.571Z","repository":{"id":62865688,"uuid":"537096823","full_name":"shini4i/argo-compare","owner":"shini4i","description":"A comparison tool for displaying the differences between ArgoCD Applications in different Git branches","archived":false,"fork":false,"pushed_at":"2024-07-09T16:00:57.000Z","size":248,"stargazers_count":18,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T17:07:44.982Z","etag":null,"topics":["argocd","argocd-application","diff","gitops"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shini4i.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-15T15:44:47.000Z","updated_at":"2024-07-09T16:00:43.000Z","dependencies_parsed_at":"2024-01-01T18:34:24.314Z","dependency_job_id":"f8fc9f96-59a5-40e7-bf0c-fc64c5335f70","html_url":"https://github.com/shini4i/argo-compare","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fargo-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fargo-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fargo-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fargo-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shini4i","download_url":"https://codeload.github.com/shini4i/argo-compare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223746946,"owners_count":17195810,"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":["argocd","argocd-application","diff","gitops"],"created_at":"2024-08-03T17:00:17.364Z","updated_at":"2024-11-08T20:14:52.840Z","avatar_url":"https://github.com/shini4i.png","language":"Go","funding_links":[],"categories":["Ecosystem Projects"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Argo Compare\n\nA comparison tool for displaying the differences between applications in different Git branches\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/shini4i/argo-compare/run-tests.yml?branch=main)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/shini4i/argo-compare)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/shini4i/argo-compare)\n[![codecov](https://codecov.io/gh/shini4i/argo-compare/branch/main/graph/badge.svg?token=48E1OZHLPY)](https://codecov.io/gh/shini4i/argo-compare)\n[![Go Report Card](https://goreportcard.com/badge/github.com/shini4i/argo-compare)](https://goreportcard.com/report/github.com/shini4i/argo-compare)\n![GitHub](https://img.shields.io/github/license/shini4i/argo-compare)\n\n\u003cimg src=\"https://raw.githubusercontent.com/shini4i/assets/main/src/argo-compare/demo.png\" alt=\"Showcase\" height=\"441\" width=\"620\"\u003e\n\nExample output of `argo-compare` with `diff-so-fancy`\n\u003c/div\u003e\n\n## General information\n\nThis tool will show what would be changed in the manifests rendered by helm after changes to the specific Application\nare merged into the target branch.\n\n### How to install\n\nThe binary can be installed using homebrew:\n\n```bash\nbrew install shini4i/tap/argo-compare\n```\n\n### How to use\n\nThe simplest usage scenario is to compare all changed files in the current branch with the target branch:\n\n```bash\nargo-compare branch \u003ctarget-branch\u003e\n```\n\nIf you want to compare only specific file, you can use the `--file` flag:\n\n```bash\nargo-compare branch \u003ctarget-branch\u003e --file \u003cfile-path\u003e\n```\n\nBy default, argo-compare will print only changed files content, but if this behavior is not desired, you can use one of the following flags:\n```bash\n# In addition to the changed files, it will print all added manifests\nargo-compare branch \u003ctarget-branch\u003e --print-added-manifests\n# In addition to the changed files, it will print all removed manifests\nargo-compare branch \u003ctarget-branch\u003e --print-removed-manifests\n# Print all changed, added and removed manifests\nargo-compare branch \u003ctarget-branch\u003e --full-output\n```\n\nTo use an external diff tool, you can set `EXTERNAL_DIFF_TOOL` environment variable. Each file diff will be passed in a pipe to the external tool.\n```bash\nEXTERNAL_DIFF_TOOL=diff-so-fancy argo-compare branch \u003ctarget-branch\u003e\n```\n\nAdditionally, you can try this tool using docker container:\n```bash\ndocker run -it --mount type=bind,source=\"$(pwd)\",target=/apps --env EXTERNAL_DIFF_TOOL=diff-so-fancy --workdir /apps ghcr.io/shini4i/argo-compare:\u003cversion\u003e branch \u003ctarget-branch\u003e --full-output\n```\n\n#### Password Protected Repositories\nUsing password protected repositories is a bit more challenging. To make it work, we need to expose JSON as an environment variable.\nThe JSON should contain the following fields:\n\n```json\n{\n  \"url\": \"https://charts.example.com\",\n  \"username\": \"username\",\n  \"password\": \"password\"\n}\n```\nHow to properly expose it depends on the specific use case.\n\nA bash example:\n```bash\nexport REPO_CREDS_EXAMPLE={\\\"url\\\":\\\"https://charts.example.com\\\",\\\"username\\\":\\\"username\\\",\\\"password\\\":\\\"password\\\"}\n```\n\nWhere `EXAMPLE` is an identifier that is not used by the application.\n\nArgo Compare will look for all `REPO_CREDS_*` environment variables and use them if `url` will match the `repoURL` from Application manifest.\n\n\n## How it works\n\n1) First, this tool will check which files are changed compared to the files in the target branch.\n2) It will get the content of the changed Application files from the target branch.\n3) It will render manifests using the helm template using source and target branch values.\n4) It will get rid of helm related labels as they are not important for the comparison. (It can be skipped by providing `--preserve-helm-labels` flag)\n5) As the last step, it will compare rendered manifest from the source and destination branches and print the\n   difference.\n\n## Current limitations\n\n- Works only with Applications that are using helm repositories and helm values present in the Application yaml.\n- \u003cs\u003eDoes not support password protected repositories.\u003c/s\u003e\n\n## Roadmap\n\n- [ ] Add support for Application using git as a source of helm chart\n- [x] Add support for providing credentials for password protected helm repositories\n- [ ] Add support for posting diff as a comment to PR (GitHub)/MR(GitLab)\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshini4i%2Fargo-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshini4i%2Fargo-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshini4i%2Fargo-compare/lists"}