{"id":20656478,"url":"https://github.com/shinniuwu/githealth","last_synced_at":"2026-04-18T22:32:21.867Z","repository":{"id":238373508,"uuid":"796420451","full_name":"ShinniUwU/GitHealth","owner":"ShinniUwU","description":"A script that performs health checks on Git repositories. It identifies large files, outdated dependencies in Node.js and Python projects, and unoptimized images. Enhance your repo's performance and maintainability with this handy tool. ","archived":false,"fork":false,"pushed_at":"2024-05-14T19:45:04.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T11:24:22.727Z","etag":null,"topics":["git","githealth"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/ShinniUwU.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":"2024-05-05T21:53:08.000Z","updated_at":"2024-08-20T15:31:40.000Z","dependencies_parsed_at":"2025-01-17T11:34:02.006Z","dependency_job_id":null,"html_url":"https://github.com/ShinniUwU/GitHealth","commit_stats":null,"previous_names":["shinniuwu/githealth"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinniUwU%2FGitHealth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinniUwU%2FGitHealth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinniUwU%2FGitHealth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinniUwU%2FGitHealth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShinniUwU","download_url":"https://codeload.github.com/ShinniUwU/GitHealth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242762737,"owners_count":20181267,"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":["git","githealth"],"created_at":"2024-11-16T18:15:34.690Z","updated_at":"2026-04-18T22:32:21.849Z","avatar_url":"https://github.com/ShinniUwU.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHealth\n\n**Version: 0.0.3**\n\nA Bash script to perform essential health checks on your Git repositories. `githealth` helps you identify potential issues like large files, outdated dependencies in Node.js (npm/Bun) and Python projects, and potentially unoptimized images. Running these checks can help improve repository performance, reduce clone times, enhance security, and maintain overall code health.\n\n## Why GitHealth?\n\n* **Performance:** Large files bloat repository size, slowing down clones and fetches.\n* **Maintainability:** Keeping dependencies updated is crucial for security and leveraging the latest features.\n* **Storage:** Unoptimized images can consume unnecessary space.\n* **Best Practices:** Encourages good repository hygiene.\n  \n## Features\n\n* **Large Files Check:** Identifies files committed to the Git history larger than a specified size threshold. (Default: 500 KB)\n* **Outdated Dependencies Check:** Detects outdated dependencies in projects using Node.js (`package.json` with `npm`) and Python (`requirements.txt` with `pip`).\n* **Unoptimized Images Check:** Finds image files (`.png`, `.jpg`, `.jpeg`) with quality potentially higher than necessary (suggesting they could be optimized further). Requires ImageMagick. (Default quality threshold: 80)\n\n## Prerequisites\n\nBefore running `githealth`, ensure you have the following installed:\n\n* **Bash:** The script is written for Bash.\n* **Git:** Essential for interacting with the repository.\n* **awk:** Used for text processing (usually standard on Linux/macOS).\n* **(Optional) Bun:** Required for checking Bun dependencies (`bun outdated`).\n* **(Optional) Node.js \u0026 npm:** Required for checking Node.js dependencies if not using Bun (`npm outdated`).\n* **(Optional) Python \u0026 pip:** Required for checking Python dependencies (`pip list --outdated`).\n* **(Optional) ImageMagick:** Required for the unoptimized image check (`identify` command).\n    * *Installation (examples):*\n        * Debian/Ubuntu: `sudo apt update \u0026\u0026 sudo apt install imagemagick`\n        * macOS (Homebrew): `brew install imagemagick`\n        * Bun: See official Bun installation instructions.\n\n## Configuration\n\nYou can configure the thresholds by:\n\n1.  **Editing the script:** Modify the default values for the following variables near the top of `githealth.sh`:\n    * `DEFAULT_LARGE_FILE_THRESHOLD_KB`: Size threshold in KB for large files (Default: 500).\n    * `DEFAULT_IMAGE_QUALITY_THRESHOLD`: Quality threshold for images (Default: 80). Images *above* this quality will be flagged.\n2.  **Using Environment Variables:** Override the defaults by setting environment variables before running the script:\n    ```bash\n    export LARGE_FILE_THRESHOLD_KB=1000 # Set large file threshold to 1MB\n    export IMAGE_QUALITY_THRESHOLD=85  # Set image quality threshold to 85\n    ./githealth.sh\n    ```\n    Or inline:\n    ```bash\n    LARGE_FILE_THRESHOLD_KB=1000 IMAGE_QUALITY_THRESHOLD=85 ./githealth.sh\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinniuwu%2Fgithealth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinniuwu%2Fgithealth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinniuwu%2Fgithealth/lists"}