A TypeScript CLI that automatically detects the package manager (pnpm, bun, npm, yarn, etc.) based on the current directory, and then forwards all CLI args to that package manager.
Note: This was made for my personal use, but should work for others too :)
- Clone this repo
 - Install dependencies
 - Run the build script (it's just 
tsc)npm run buildorbun run buildoryarn run buildorpnpm run buildorpm build😉 - Link the project, 
npm linkdoes the job. 
That's it!
This will install better-auth by using the package manager in your project
pm i better-authPassing any argument that isn't an alias or install command will automatically be treated as a script to be ran,
this will always be called with <pm> run <arguments>
pm buildWill become npm run build, or bun run build, or yarn run build, etc.
As part of this repo, there is an aslias.json, which you can modify and add custom commands to.
By default, there is a ba:docs and possibly more, which is just for my personal use.
When running pm followed by an alias name, it will use the defined alias command prefixed with the package manager.
So something like this:
{
    "ba:docs": "-F docs dev --port 3001"
}ran with:
pm ba:docswill become:
pnpm -F docs dev --port 3001If you just want basic info such as all of your active aliases or the current projects package manager, you can just run:
pmWhich will return something like this:
Package Manager: bun
┌─────────┬───────────────────────────┐
│ (index) │ Values                    │
├─────────┼───────────────────────────┤
│ ba:docs │ '-F docs dev --port 3001' │
└─────────┴───────────────────────────┘