{"id":21637818,"url":"https://github.com/bayuagpr/gitloom-diff","last_synced_at":"2026-02-18T10:36:27.901Z","repository":{"id":262384355,"uuid":"887056715","full_name":"bayuagpr/gitloom-diff","owner":"bayuagpr","description":"Generate beautiful, searchable, IDE-friendly git diffs in markdown format","archived":false,"fork":false,"pushed_at":"2024-11-15T09:58:22.000Z","size":2195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T16:04:57.072Z","etag":null,"topics":["changelog","code-review","developer-tools","documentation","git","gitdiff","markdown","merge-request","pull-request"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gitloom-diff","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bayuagpr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-11-12T04:57:31.000Z","updated_at":"2024-11-15T09:58:25.000Z","dependencies_parsed_at":"2025-04-11T16:52:52.986Z","dependency_job_id":"b65b4b31-771b-4e3f-a08b-fbf5dc361ced","html_url":"https://github.com/bayuagpr/gitloom-diff","commit_stats":null,"previous_names":["bayuagpr/git-markdown-diff","bayuagpr/gitloom-diff"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bayuagpr/gitloom-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayuagpr%2Fgitloom-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayuagpr%2Fgitloom-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayuagpr%2Fgitloom-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayuagpr%2Fgitloom-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bayuagpr","download_url":"https://codeload.github.com/bayuagpr/gitloom-diff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayuagpr%2Fgitloom-diff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29576634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["changelog","code-review","developer-tools","documentation","git","gitdiff","markdown","merge-request","pull-request"],"created_at":"2024-11-25T04:07:02.176Z","updated_at":"2026-02-18T10:36:22.884Z","avatar_url":"https://github.com/bayuagpr.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/header.jpg\" alt=\"GitLoom Diff Header\" height=\"200\" /\u003e\n\n# GitLoom Diff\n\n[![npm version](https://badge.fury.io/js/gitloom-diff.svg)](https://www.npmjs.com/package/gitloom-diff)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/node/v/gitloom-diff.svg)](https://nodejs.org)\n\n**Stop squinting at those git provider diff views.**\n\u003cbr\u003e\nGenerate beautiful, searchable, IDE-friendly git diffs in markdown format.\n\u003cbr\u003e\n\u003cbr\u003e\n![Demo GIF showing diff generation](docs/demo-gitloom-diff.gif)\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003e ⚠️ **Early Stage Project**: GitLoom Diff is currently in active development and not yet production-ready. Expect frequent breaking changes and major updates as we evolve the tool. Use with caution in production environments.\n\n## Quick Start\n\n```bash\nnpm install -g gitloom-diff\n\n# Basic usage\ngitloom-diff \n\n# Compare branches\ngitloom-diff -s feature/awesome -e main\n```\n\n## Why You'll Love This\n\nGitHub, GitLab, or any other git provider diffs are often overwhelming - endless scrolling, no search, and hard to navigate between files. This tool generates clean markdown diffs that you can:\n\n- 🚀 **Open in Your Favorite IDE/Editor**\n  - Use your IDE's search \u0026 navigation\n  - Navigate diffs with familiar codebase structure (follows original file paths)\n  - Get proper syntax highlighting\n  - Review diffs comfortably\n\n- 🤖 **Feed Directly to AI**\n  - Share diffs directly with any LLM (e.g. ChatGPT, Claude, etc)\n  - Review changes with integrated AI in your preferred editor (No more copy-paste hell)\n  - Let AI help you:\n    - Generate PR summaries instantly\n    - Generate commit messages, changelog, or release notes from changes\n    - Get code review suggestions and explanations\n    - Analyze changes for potential bugs and improvements\n\n- 🧹 **Focus on What Matters**\n  - Auto-skips node_modules, build files, and junk\n  - Shows only relevant changes\n  - Customize exclusion patterns\n\n- 📤 **Share \u0026 Reference**\n  - Share clean diffs with team members and stakeholders\n  - Attach as context in tickets and documentation\n  - Create permanent snapshots of changes for future reference\n  - Use in async discussions and code reviews\n\n## Core Features\n\n- 💡 **Compare Anything**: branches (local or remote), commits, tags\n- 📊 **Rich Statistics**: changes per file, summaries, commit history\n- 📝 **Markdown Output**: readable, searchable, navigable, shareable\n\n## Output Structure\n\n```\n📁 git-diffs/\n├── 📊 DIFF_INDEX.md     # Overview of all changes\n├── src/\n│   ├── 📝 api.js.md    # Per-file diffs with syntax highlighting\n│   └── components/\n│       └── 📝 Button.js.md\n```\n\n### Sample Diff Output\n\n```markdown\n# Changes in `src/components/Button.js`\n\n## File Statistics\n src/components/Button.js | 25 +++++++++++++++++--------\n\n## Changes\n```diff\n- import React from 'react';\n+ import React, { useState } from 'react';\n\n const Button = ({ label }) =\u003e {\n+  const [isHovered, setIsHovered] = useState(false);\n```\n\n## Usage\n\n### Installation\n\n```bash\n# Global installation (accessible everywhere)\nnpm install -g gitloom-diff\n\n# Local installation (project-specific)\nnpm install gitloom-diff\n```\n\nWhen installed locally, you can add it to your package.json scripts for common workflows:\n```json\n{\n  \"scripts\": {\n    \"diff:main\": \"gitloom-diff -s HEAD -e main\",\n    \"diff:staged\": \"gitloom-diff -s HEAD -e --staged\",\n    \"pr:diff\": \"gitloom-diff -s $npm_config_branch -e main\"\n  }\n}\n```\n\nThen run:\n```bash\n# Compare current branch with main\nnpm run diff:main\n\n# Review staged changes\nnpm run diff:staged\n\n# Compare specific branch with main\nnpm run pr:diff --branch=feature/awesome\n```\n\n### Basic Commands\n\n```bash\n# Compare branches (PR mode - default)\ngitloom-diff -s feature/branch -e main\n\n# Compare tags (use tag mode)\ngitloom-diff -s v1.1.0 -e v1.0.0 -m tag\n\n# Compare commits (use commit mode)\ngitloom-diff -s abc123 -e def456 -m commit\n\n# Compare with remote\ngitloom-diff -s origin/main -e main\n\n# Compare staged changes\ngitloom-diff -s HEAD -e --staged\n```\n\n### Configuration\n\n```bash\nOptions:\n  -s, --start-ref \u003cref\u003e      Starting reference (newer state)\n  -e, --end-ref \u003cref\u003e        Ending reference (older state)\n  -o, --output \u003cdir\u003e         Output directory (default: \"git-diffs\")\n  --exclude \u003cpatterns...\u003e    Additional file patterns to exclude\n  -m, --mode \u003cmode\u003e         Comparison mode: pr|commit|tag (default: \"pr\")\n  --light-mode              Use light mode theme\n  -h, --help                Display help\n```\n\n### Advanced Examples\n\n```bash\n# Tag comparison\ngitloom-diff -s v2.0.0 -e v1.0.0 -m tag\n\n# Exclude patterns with commit comparison\ngitloom-diff -s abc123 -e def456 -m commit --exclude \"*.test.js\" \"docs/**\"\n\n# Multiple options\ngitloom-diff \\\n  -s feature/new-ui \\\n  -e develop \\\n  -m pr \\\n  -o ui-changes \\\n  --exclude \"*.test.js\" \"*.snap\" \\\n  --light-mode\n```\n\n## Programmatic Usage\n\n```javascript\nconst GitLoomDiff = require('gitloom-diff');\n\nconst differ = new GitLoomDiff({\n  outputDir: 'custom-dir',\n  exclusions: ['*.log'],\n  darkMode: false,\n  mode: 'pr'\n});\n\nawait differ.run('main', 'feature/branch');\n```\n\n### Integration Examples\n\n```javascript\n// Code Review Tool Integration\nasync function generateReviewDiff(prNumber) {\n  const differ = new GitLoomDiff({\n    outputDir: `pr-${prNumber}-diff`,\n    mode: 'pr'\n  });\n  await differ.run('main', `pr-${prNumber}`);\n}\n\n// Git Hook Integration\nasync function preCommitHook() {\n  const differ = new GitLoomDiff({\n    mode: 'commit'\n  });\n  await differ.run('HEAD', '--staged');\n}\n\n// Tag Release Comparison\nasync function compareReleases(oldTag, newTag) {\n  const differ = new GitLoomDiff({\n    mode: 'tag',\n    exclusions: ['*.lock', 'dist/*']\n  });\n  await differ.run(newTag, oldTag);\n}\n```\n\n## Auto-Excluded Files\n\n- Package manager locks (package-lock.json, yarn.lock)\n- Dependencies (node_modules/, vendor/)\n- Build outputs (dist/, build/, .next/)\n- IDE and OS files (.idea/, .vscode/, .DS_Store)\n- Logs and environment files\n\n## Requirements\n\n- Node.js \u003e= 18\n- Git installed and accessible\n\n## Contributing\n\n1. Fork and clone\n2. `npm install`\n3. Create feature branch\n4. Make changes\n5. Submit PR\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Git Command Fails**\n   - Ensure you're in a git repo\n   - Check git installation\n   - Verify git config\n\n2. **No Output**\n   - Verify changes exist\n   - Check exclusion patterns\n   - Confirm git range\n\n3. **Exclusion Issues**\n   - Use forward slashes\n   - Escape wildcards\n   - Use `dir/**` for directories\n\n## License\n\nMIT\n\n## Acknowledgments\n\nBuilt with:\n- [commander](https://www.npmjs.com/package/commander)\n- [ora](https://www.npmjs.com/package/ora)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayuagpr%2Fgitloom-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbayuagpr%2Fgitloom-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayuagpr%2Fgitloom-diff/lists"}