{"_id":"@aakritbhandari/branch-helper","_rev":"3-fa7d8ccc3162c373cc54b9abc8c6ce38","name":"@aakritbhandari/branch-helper","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@aakritbhandari/branch-helper","version":"1.0.0","keywords":["branchhelper","branch","gitbranchhelper"],"author":{"name":"Aakrit Bhandari"},"license":"Fair","_id":"@aakritbhandari/branch-helper@1.0.0","maintainers":[{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"}],"homepage":"https://github.com/Aakrit-Bhandari/BranchHelper#readme","bugs":{"url":"https://github.com/Aakrit-Bhandari/BranchHelper/issues"},"bin":{"branchhelper":"index.js"},"dist":{"shasum":"aef40edff89baa80e9f021baf4d0b2af8dcf6a8c","tarball":"https://registry.npmjs.org/@aakritbhandari/branch-helper/-/branch-helper-1.0.0.tgz","fileCount":2,"integrity":"sha512-dBFZsbPba/BVmnwoE49ZEpfAtYaD0dGAwOsgSjLvqPF96lgQPj5IeQ2x2J3YiFX1HT/R31RXjPe3E2aZdVw7nA==","signatures":[{"sig":"MEQCID1e7oi4Mhj6Q+wFf+bhdYpy5F/1rjYXh+QJ0U2PcP5vAiBVbXNlkTq2nqO2e4QAXTnjIb6+qNFg55p2TpCi68djEg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3134},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"},"repository":{"url":"git+https://github.com/Aakrit-Bhandari/BranchHelper.git","type":"git"},"_npmVersion":"10.9.2","description":"Often after checking out of 4 5 branches we often trend to forget which branch we should have gone this will help us get the recent branches which we have used.","directories":{},"_nodeVersion":"22.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/branch-helper_1.0.0_1775287640445_0.5250575987605617","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aakritbhandari/branch-helper","version":"1.0.2","keywords":["branchhelper","branch","gitbranchhelper"],"author":{"name":"Aakrit Bhandari"},"license":"Fair","_id":"@aakritbhandari/branch-helper@1.0.2","maintainers":[{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"}],"homepage":"https://github.com/Aakrit-Bhandari/BranchHelper#readme","bugs":{"url":"https://github.com/Aakrit-Bhandari/BranchHelper/issues"},"bin":{"branchhelper":"index.js"},"dist":{"shasum":"a26ca99b80753c058aec21a6037a2fe61e827c9e","tarball":"https://registry.npmjs.org/@aakritbhandari/branch-helper/-/branch-helper-1.0.2.tgz","fileCount":3,"integrity":"sha512-ocG1Z4tB2Cj0PZ0rxYOAcDl8srrNYZyffJa1CrYpMRADfhj+KQNbJ5zw2CQN70utJgFGxV2Pr2dxeSCwldmT4w==","signatures":[{"sig":"MEQCIBk8GZwfDRw5XeFKcgCvqYvegLhvd66xCZgo4kerEWKFAiBqyesEf6allRzYd14fAtGl6UJJ7iY0t5KhuhWXvn6/6w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5819},"main":"index.js","gitHead":"a1f02bdf6f270da3814a72704d253a39a22e60f8","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"},"repository":{"url":"git+https://github.com/Aakrit-Bhandari/BranchHelper.git","type":"git"},"_npmVersion":"10.9.7","description":"Often after checking out of 4 5 branches we often trend to forget which branch we should have gone this will help us get the recent branches which we have used.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/branch-helper_1.0.2_1775489513161_0.2714406242461658","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aakritbhandari/branch-helper","version":"1.0.3","description":"Often after checking out of 4 5 branches we often trend to forget which branch we should have gone this will help us get the recent branches which we have used.","main":"index.js","bin":{"branchhelper":"index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Aakrit-Bhandari/BranchHelper.git"},"keywords":["branchhelper","branch","gitbranchhelper"],"author":{"name":"Aakrit Bhandari"},"license":"Fair","bugs":{"url":"https://github.com/Aakrit-Bhandari/BranchHelper/issues"},"homepage":"https://github.com/Aakrit-Bhandari/BranchHelper#readme","_id":"@aakritbhandari/branch-helper@1.0.3","gitHead":"1ae190720bb9c139dc25328af110c0f1602debd3","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-wjr2Bfp/kG1o8dz6ynq+O9zwc7fgyKvMAg/ZL8KKND6p5WaTbBqEDN1DaDzlJ4MXh0fXjuJgpiFHiz9/8TLauA==","shasum":"05a4a19c18be26914ca02ab6fc8f34ca8af3694e","tarball":"https://registry.npmjs.org/@aakritbhandari/branch-helper/-/branch-helper-1.0.3.tgz","fileCount":3,"unpackedSize":5590,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCn5ws3rnguyA734gNcFOGh3pf82EEklj+0A3zOqe0/wAIhALZlJc9BT4nVAdnbvtTjA9HylVJCdpoLL3MYGzdxGdhj"}]},"_npmUser":{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"},"directories":{},"maintainers":[{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/branch-helper_1.0.3_1775553567921_0.3732101516508557"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-04T07:27:20.334Z","modified":"2026-04-07T09:19:28.178Z","1.0.0":"2026-04-04T07:27:20.592Z","1.0.2":"2026-04-06T15:31:53.314Z","1.0.3":"2026-04-07T09:19:28.064Z"},"bugs":{"url":"https://github.com/Aakrit-Bhandari/BranchHelper/issues"},"author":{"name":"Aakrit Bhandari"},"license":"Fair","homepage":"https://github.com/Aakrit-Bhandari/BranchHelper#readme","keywords":["branchhelper","branch","gitbranchhelper"],"repository":{"type":"git","url":"git+https://github.com/Aakrit-Bhandari/BranchHelper.git"},"description":"Often after checking out of 4 5 branches we often trend to forget which branch we should have gone this will help us get the recent branches which we have used.","maintainers":[{"name":"aakritbhandari","email":"aakrit2004bhandari@gmail.com"}],"readme":"# Branch Helper\n\n> Lost in branches? Never forget where you were.\n\nA lightweight CLI tool that digs through your shell history and shows you the git commands you've recently used. No config, no setup — just install and go.\n\n---\n\n## Why?\n\nYou're deep in a project, juggling 5+ branches, and suddenly you can't remember the name of that feature branch you were on 20 minutes ago. Sound familiar?\n\n**Branch Helper** reads your shell history and instantly shows your recent git commands, so you can find that lost branch in seconds.\n\n## Install\n\n```bash\nnpm install -g @aakritbhandari/branch-helper\n```\n\n## Usage\n\n### Show your last `n` git commands\n\n```bash\nbranchhelper <n>\n```\n\n`n` can be any number from **1 to 20**.\n\n```bash\n$ branchhelper 5\nLast 5 git commands:\n  1. git checkout feature/auth\n  2. git pull origin main\n  3. git commit -m \"fix: resolve login bug\"\n  4. git checkout main\n  5. git stash pop\n```\n\n### Filter by prefix\n\n```bash\nbranchhelper <n> <prefix>\n```\n\nThe prefix matches against everything **after `git `** in the command.\n\n```bash\n$ branchhelper 3 checkout\nLast 3 git commands starting with \"checkout\":\n  1. git checkout feature/auth\n  2. git checkout main\n  3. git checkout develop\n```\n\nOr filter by any subcommand:\n\n```bash\n$ branchhelper 5 commit     # recent commits\n$ branchhelper 3 push       # recent pushes\n$ branchhelper 4 stash      # recent stash commands\n```\n\n## Features\n\n- **Zero dependencies** — uses only Node.js built-ins\n- **Cross-platform** — supports zsh, bash, and PowerShell\n- **Deduped & ordered** — shows unique commands, most recent first\n- **Fast** — reads directly from your shell history file\n\n## Supported Shells\n\n| Platform      | Shell      | History File                                          |\n| ------------- | ---------- | ----------------------------------------------------- |\n| Linux / macOS | zsh        | `~/.zsh_history`                                      |\n| Linux / macOS | bash       | `~/.bash_history`                                     |\n| Windows       | PowerShell | `%APPDATA%\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt` |\n\n## License\n\nFair\n\n## Author\n\n**Aakrit Bhandari** — [GitHub](https://github.com/Aakrit-Bhandari)\n\n---\n\nIf this helped you, give it a star on [GitHub](https://github.com/Aakrit-Bhandari/BranchHelper)!\n","readmeFilename":"README.md"}