{"_id":"@bobfromarcher/gitsweep","_rev":"2-aad307dc2cb28b6be55ed086716ca4e6","name":"@bobfromarcher/gitsweep","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@bobfromarcher/gitsweep","version":"1.0.0","keywords":["git","branch","cleanup","prune","merged","gone","cli","housekeeping","zero-dependency","devtools"],"author":{"name":"bobfromarcher"},"license":"MIT","_id":"@bobfromarcher/gitsweep@1.0.0","maintainers":[{"name":"bobfromarcher","email":"chrisbellth@gmail.com"}],"homepage":"https://github.com/bobfromarcher/gitsweep#readme","bugs":{"url":"https://github.com/bobfromarcher/gitsweep/issues"},"bin":{"gitsweep":"bin/gitsweep.js"},"dist":{"shasum":"12677a7c038b14d7378c1d587c64b0f9903038ed","tarball":"https://registry.npmjs.org/@bobfromarcher/gitsweep/-/gitsweep-1.0.0.tgz","fileCount":4,"integrity":"sha512-RWmodRb84ltD0/fL415BOlcEGJuh3Ok1Jy2kBct53GkXAb8+S0wHBLYu5F0L+8wRgepi+hwg9YazTanf/ksjyQ==","signatures":[{"sig":"MEUCIFg9KZ7MxHYfe7nBXdaBRO+GkwePdy/1njx6OK3fSI4zAiEA/lT5riXoZ36aVIrGMGy9CeKSqlwlj0Kxsu3ialmC0M4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11403},"engines":{"node":">=16"},"gitHead":"51deaac6aa4b518e56a1ce70b3e73cb3d9767810","scripts":{"test":"node test/test.js","start":"node bin/gitsweep.js"},"_npmUser":{"name":"bobfromarcher","email":"chrisbellth@gmail.com"},"repository":{"url":"git+https://github.com/bobfromarcher/gitsweep.git","type":"git"},"_npmVersion":"11.11.0","description":"Safely find and prune stale local git branches — fully-merged or remote-gone, never the ones you care about. Zero dependencies.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/gitsweep_1.0.0_1781946319913_0.22053991640124604","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bobfromarcher/gitsweep","publishConfig":{"access":"public"},"version":"1.0.1","description":"Safely find and prune stale local git branches - fully-merged or remote-gone, never the ones you care about. Zero dependencies.","bin":{"gitsweep":"bin/gitsweep.js"},"scripts":{"test":"node test/test.js","start":"node bin/gitsweep.js"},"keywords":["git","branch","cleanup","prune","merged","gone","cli","housekeeping","zero-dependency","devtools"],"author":{"name":"bobfromarcher"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bobfromarcher/gitsweep.git"},"bugs":{"url":"https://github.com/bobfromarcher/gitsweep/issues"},"homepage":"https://github.com/bobfromarcher/gitsweep#readme","engines":{"node":">=16"},"gitHead":"9c171d0e4155247f018d2b564beecda92c257fe5","_id":"@bobfromarcher/gitsweep@1.0.1","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-cpzC4LfBukQI1sRwxBo6RpINIXjJrrzyCFLwwElmR7BctzF3Cif+CQWzxMGLhPj1uTRAMnnfTNxfM1FSqXocCA==","shasum":"b6c142db3175f75561f1a3cce3698eacead936c1","tarball":"https://registry.npmjs.org/@bobfromarcher/gitsweep/-/gitsweep-1.0.1.tgz","fileCount":4,"unpackedSize":11043,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDp3gX4j6nye2TzagwlQDgojYSCrTML/W+8+Fm1JW7cGQIgVvi+cQXlsHb+HhvWq0k5JnWdIe+gmfPTaOO0HkKOslE="}]},"_npmUser":{"name":"bobfromarcher","email":"chrisbellth@gmail.com"},"directories":{},"maintainers":[{"name":"bobfromarcher","email":"chrisbellth@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gitsweep_1.0.1_1781948642148_0.010741627537417475"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-20T09:05:19.698Z","modified":"2026-06-20T09:44:02.392Z","1.0.0":"2026-06-20T09:05:20.050Z","1.0.1":"2026-06-20T09:44:02.287Z"},"bugs":{"url":"https://github.com/bobfromarcher/gitsweep/issues"},"author":{"name":"bobfromarcher"},"license":"MIT","homepage":"https://github.com/bobfromarcher/gitsweep#readme","keywords":["git","branch","cleanup","prune","merged","gone","cli","housekeeping","zero-dependency","devtools"],"repository":{"type":"git","url":"git+https://github.com/bobfromarcher/gitsweep.git"},"description":"Safely find and prune stale local git branches - fully-merged or remote-gone, never the ones you care about. Zero dependencies.","maintainers":[{"name":"bobfromarcher","email":"chrisbellth@gmail.com"}],"readme":"# gitsweep\n\n[![npm](https://img.shields.io/npm/v/@bobfromarcher/gitsweep?color=cb3837&logo=npm)](https://www.npmjs.com/package/@bobfromarcher/gitsweep)\n[![CI](https://github.com/bobfromarcher/gitsweep/actions/workflows/ci.yml/badge.svg)](https://github.com/bobfromarcher/gitsweep/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/@bobfromarcher/gitsweep?color=blue)](LICENSE)\n[![zero deps](https://img.shields.io/badge/dependencies-0-success)](package.json)\n\nFinds stale local branches and clears them out safely. It only targets branches that are fully merged into your default branch or whose upstream has been deleted on the remote. It never touches your current branch, the default branch, or protected names like `main`, `master` and `develop`. No dependencies, no AI.\n\n<p align=\"center\"><img src=\"demo.svg\" alt=\"gitsweep listing branches it can remove\" width=\"480\"></p>\n\n## Install\n\n```bash\nnpm install -g @bobfromarcher/gitsweep\n# or once:\nnpx @bobfromarcher/gitsweep\n```\n\n## Usage\n\n```bash\ngitsweep [path] [options]\n```\n\n| Option | Description |\n| --- | --- |\n| (none) | Dry run. Show exactly what would be removed |\n| `--prune` | Delete the sweepable branches (asks for confirmation first) |\n| `--force`, `-f` | With `--prune`, skip the prompt and force-delete |\n| `--base <branch>` | Branch to test \"merged\" against (default: your `origin` HEAD) |\n| `--json` | Output JSON, delete nothing |\n| `-h, --help` | Show help |\n| `-v, --version` | Show version |\n\n## Examples\n\n```bash\ngitsweep                 # safe dry run\ngitsweep --prune         # clean up, with a confirmation\ngitsweep --prune -f      # clean up, no prompt\ngitsweep --base develop  # treat develop as the integration branch\ngitsweep --json | jq '.sweep[].name'\n```\n\n## Why it is safe\n\n- Dry run by default. Nothing is deleted unless you pass `--prune`.\n- Merged only. Branches are checked against `git branch --merged`, so anything with unmerged work is kept and listed as `unmerged`.\n- Hard guards. The current branch, base branch and protected names are excluded before anything is considered.\n- Merged branches use a safe `git branch -d`. Only branches whose remote is already gone use `-D`.\n\n## Development\n\n```bash\ngit clone https://github.com/bobfromarcher/gitsweep\ncd gitsweep\nnode test/test.js\n```\n\nCI runs the suite on Node 18, 20 and 22 across Linux, macOS and Windows.\n\n## License\n\nMIT, bobfromarcher.\n","readmeFilename":"README.md"}