{"id":50182067,"url":"https://github.com/jaydenfyi/diffx","last_synced_at":"2026-05-25T07:05:16.583Z","repository":{"id":337269342,"uuid":"1152357978","full_name":"jaydenfyi/diffx","owner":"jaydenfyi","description":"A CLI utility for easily diffing Git changes across your working tree, local refs, remote refs, GitHub PRs, GitLab MRs, or any Git URLs","archived":false,"fork":false,"pushed_at":"2026-05-08T05:56:06.000Z","size":199,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T07:43:15.762Z","etag":null,"topics":["diff","diffs","git","github","gitlab"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jaydenfyi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-07T18:54:54.000Z","updated_at":"2026-02-08T16:41:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jaydenfyi/diffx","commit_stats":null,"previous_names":["jaydenfyi/diffx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaydenfyi/diffx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenfyi%2Fdiffx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenfyi%2Fdiffx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenfyi%2Fdiffx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenfyi%2Fdiffx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaydenfyi","download_url":"https://codeload.github.com/jaydenfyi/diffx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenfyi%2Fdiffx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33464014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"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":["diff","diffs","git","github","gitlab"],"created_at":"2026-05-25T07:04:48.550Z","updated_at":"2026-05-25T07:05:16.576Z","avatar_url":"https://github.com/jaydenfyi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ediffx\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eA CLI utility for easily diffing Git changes across your working tree, local refs, remote refs, GitHub PRs, GitLab MRs, or any Git URLs.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://www.npmjs.com/package/@jaydenfyi/diffx\"\u003enpm\u003c/a\u003e · \u003ca href=\"https://github.com/jaydenfyi/diffx\"\u003eGitHub\u003c/a\u003e\u003c/p\u003e\n\n## Quick Start\n\n### Install\n\n```bash\n# npm\nnpm install -g @jaydenfyi/diffx\n\n# bun\nbun add -g @jaydenfyi/diffx\n\n# no install\nnpx @jaydenfyi/diffx --help\n```\n\n### Most useful commands\n\n```bash\n# 1) Show all current local changes (tracked + untracked)\ndiffx\n\n# 2) Compare two refs\ndiffx main..feature\n\n# 3) Diff a GitHub PR\ndiffx https://github.com/owner/repo/pull/123\n\n# 4) Generate an apply-able patch\ndiffx main..feature --mode patch\n\n# 5) Quick status view\ndiffx --name-status\n```\n\n## `diffx` vs `git diff`\n\n| Capability                                       | `diffx` | `git diff` |\n| ------------------------------------------------ | ------- | ---------- |\n| Full working tree snapshot (tracked + untracked) | ✅      | ❌         |\n| Direct GitHub PR and GitLab MR diffing           | ✅      | ❌         |\n| Cross-remote and fork comparisons                | ✅      | ❌         |\n| Include/exclude glob filtering                   | ✅      | ❌         |\n| `git diff` compatibility                         | ✅      | ✅         |\n\n## Command\n\n```bash\ndiffx [range-or-url] [options] [-- \u003cpathspec...\u003e]\n```\n\nUse `--index` for strict `git diff` compatibility (index vs worktree behavior).\n\n## Input Formats\n\n### No range argument (default behavior)\n\n```bash\n# Uses current worktree first (tracked + untracked)\ndiffx\n\n# If there are no local changes, falls back to inferred base..HEAD\n```\n\n### Local ranges\n\n```bash\ndiffx main..feature\ndiffx abc123..def456\ndiffx refs/heads/main..refs/tags/v1.0\n```\n\n### Remote shorthand ranges\n\n```bash\ndiffx owner/repo@main..owner/repo@feature\ndiffx owner/repo@main..feature\n```\n\n### Git URL ranges (SSH/HTTPS, any host)\n\n```bash\ndiffx git@github.com:owner/repo.git@main..feature\ndiffx https://github.com/owner/repo.git@v1.0..v2.0\ndiffx git@github.com:owner/repo.git@main..git@gitlab.com:owner/fork.git@feature\n```\n\n### GitHub refs and URLs\n\n```bash\n# GitHub ref shorthand\ndiffx github:owner/repo@main..feature\n\n# PR reference\ndiffx github:owner/repo#123\n\n# PR URL\ndiffx https://github.com/owner/repo/pull/123\n\n# PR vs PR\ndiffx github:owner/repo#123..github:owner/repo#456\n\n# Commit URL\ndiffx https://github.com/owner/repo/commit/abc123\n\n# PR changes URL\ndiffx https://github.com/owner/repo/pull/123/changes/abc123..def456\n\n# Compare URL (same repo or cross-fork)\ndiffx https://github.com/owner/repo/compare/main...feature\ndiffx https://github.com/owner/repo/compare/main...other-owner:other-repo:feature\n```\n\n### GitLab refs\n\n```bash\n# GitLab shorthand range\ndiffx gitlab:owner/repo@main..feature\n\n# Merge request ref\ndiffx gitlab:owner/repo!123\n```\n\n### Two-dot vs three-dot\n\n`diffx` supports both `..` and `...` for ref-to-ref range inputs such as local refs, remote shorthand refs, git URL ranges, and `github:` / `gitlab:` ref ranges.\n\n- `A..B` compares the two tips directly (same as `git diff A B`)\n- `A...B` compares from the merge-base of A and B to B (same as `git diff A...B`)\n\nSome URL-based inputs use a fixed form instead:\n\n- GitHub compare URLs use `...`, e.g. `diffx https://github.com/owner/repo/compare/main...feature`\n- GitHub PR changes URLs use `..`, e.g. `diffx https://github.com/owner/repo/pull/123/changes/abc123..def456`\n- GitHub PR URLs, GitHub commit URLs, and GitLab MR refs are single-resource inputs, e.g. `diffx https://github.com/owner/repo/pull/123`, `diffx https://github.com/owner/repo/commit/abc123`, `diffx gitlab:owner/repo!123`\n- PR-to-PR inputs accept both separators, but currently treat them the same, e.g. `diffx github:owner/repo#123..github:owner/repo#456`\n\n## Output Modes\n\n`diffx` defaults to `diff` mode.\n\n- `diff`: unified diff output.\n- `patch`: patch output (for `git apply` style use).\n- `stat`: per-file histogram + summary line.\n- `numstat`: tab-delimited additions/deletions per file.\n- `shortstat`: one summary line only.\n- `name-only`: changed filenames only.\n- `name-status`: status + filename (e.g. `M`, `A`, `D`, `U`).\n- `summary`: structural summary (`create mode`, `rename`, etc.), equivalent to `git diff --summary`.\n\nExamples:\n\n```bash\ndiffx main..feature --mode patch\ndiffx https://github.com/owner/repo/pull/123 --stat\ndiffx --name-status\n```\n\n## Filtering\n\n```bash\n# Include only TypeScript files\ndiffx main..feature --include \"src/**/*.ts\"\n\n# Exclude tests\ndiffx main..feature --exclude \"**/*.test.ts\"\n\n# Combine include + exclude\ndiffx main..feature --include \"src/**\" --exclude \"**/*.spec.ts\"\n\n# Repeat include/exclude flags (matches any include; excludes any exclude)\ndiffx --include \"*.ts\" --include \"*.tsx\" --exclude \"*.js\" --exclude \"*.jsx\"\n```\n\n## Pager behavior\n\n- Diff/patch output auto-pages on TTY (git-like behavior).\n- Honors `GIT_PAGER`, `core.pager`, `PAGER`.\n- Use `--pager` to force paging.\n- Use `--no-pager` to disable paging.\n\n## Options Reference\n\n| Option                | Short | Description                                                                                                |\n| --------------------- | ----- | ---------------------------------------------------------------------------------------------------------- |\n| `--mode \u003cmode\u003e`       |       | Select output mode: `diff`, `patch`, `stat`, `numstat`, `shortstat`, `name-only`, `name-status`, `summary` |\n| `--stat`              |       | Shortcut for stat output                                                                                   |\n| `--numstat`           |       | Shortcut for numstat output                                                                                |\n| `--summary`           |       | Structural summary (native `git diff --summary`)                                                           |\n| `--shortstat`         |       | Shortcut for shortstat output                                                                              |\n| `--name-only`         |       | Show filenames only                                                                                        |\n| `--name-status`       |       | Show status + filename                                                                                     |\n| `--include \u003cpattern\u003e` | `-i`  | Include only files matching glob (repeatable)                                                              |\n| `--exclude \u003cpattern\u003e` | `-e`  | Exclude files matching glob (repeatable)                                                                   |\n| `--pager`             |       | Force pager                                                                                                |\n| `--no-pager`          |       | Disable pager                                                                                              |\n| `--index`             |       | Strict `git diff` compatibility mode                                                                       |\n| `--help`              | `-h`  | Show help                                                                                                  |\n| `--version`           | `-v`  | Show version                                                                                               |\n\n## Git Pass-through Compatibility\n\n`diffx` forwards unknown/standard `git diff` flags to git when possible, including pathspec support after `--`.\n\n```bash\ndiffx main..feature -U10 --word-diff\n\ndiffx --stat -- src/cli src/utils\n```\n\nThis allows existing `git diff` habits while still using `diffx` input resolution and workflows.\n\n## Exit Codes\n\n| Code | Meaning                                  |\n| ---- | ---------------------------------------- |\n| `0`  | Success                                  |\n| `1`  | No files matched filters                 |\n| `2`  | Invalid input / unsupported range format |\n| `3`  | Git execution/fetch error                |\n\n## Development\n\nThis repository uses `bun`.\n\n```bash\nbun install\nbun run build\nbun run test\nbun run test:e2e\nbun run lint\nbun run typecheck\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaydenfyi%2Fdiffx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaydenfyi%2Fdiffx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaydenfyi%2Fdiffx/lists"}