pusherg
v0.1.1
Published
Zero-config pre-push CLI tool that runs build/test checks before git push
Maintainers
Readme
pusherg
Zero-config pre-push CLI tool that runs your build and test checks before every git push.
Stop finding out your code is broken from CI 10 minutes after you push.
I hate pushing my code to a branch only to find out it failed to build or there were some tests failing that I didn't check beforehand. So I built this :)
Quick Start
# Install the pre-push hook in your project
npx pusherg@latest init
# That's it! Every git push now runs your checks automatically.What It Does
When you git push, pusherg automatically:
- Detects your
build,test,lint, andtypecheckscripts frompackage.json - Detects your package manager (npm, yarn, or pnpm) from lockfiles
- Runs all detected scripts and shows colored pass/fail results
- If anything fails, prompts you to push anyway or abort
✓ build (1204ms)
✓ lint (340ms)
✗ test (2105ms)
1 check(s) failed.
? Push anyway? (y/N)Commands
pusherg init
Installs a pre-push git hook in the current repository.
npx pusherg initpusherg run
Runs all checks manually (this is what the hook calls).
npx pusherg run
npx pusherg run --force # skip all checksSkip Checks
# Skip for a single push
git push --no-verifyCI / Non-Interactive Environments
In non-TTY environments (CI, IDE git clients, etc.), pusherg automatically aborts the push when checks fail — it never hangs waiting for input.
Supported Scripts
pusherg looks for these scripts in your package.json:
buildtestlinttypecheck/type-check
If none are found, the push goes through with no checks.
Requirements
- Node.js >= 18.19.0
- A git repository with a
package.json
License
MIT
