@pyronaur/nich
v0.1.1
Published
Like which, but unwrap linked Node and Bun package bins to their real entry files.
Readme
nich
nich is which for people who work on linked CLIs.
which tells you the shim on PATH.
nich follows linked Node and Bun package bins to the file you actually edit.
Install
npm install -g @pyronaur/nichUsage
nich <command> [command ...]
nich -a <command> [command ...]Why
When a CLI comes from a linked package, which usually stops at the global bin symlink:
$ which my-cli
/usr/local/bin/my-cliThat path is often just the install shim. nich keeps going:
$ nich my-cli
/path/to/my-cli/dist/bin/my-cli.jsFor ordinary commands, nich stays out of the way:
$ which ls
/bin/ls
$ nich ls
/bin/ls
$ which npm
/usr/local/bin/npm
$ nich npm
/usr/local/bin/npmRules
- Normal executables stay unchanged.
- Package-manager-owned bins such as
npm,node, andbunstay unchanged. - Linked package bins that resolve outside the install prefix unwrap to the real package entry file.
-aprints one resolved path per PATH match.nichonly resolves PATH executables. It does not inspect aliases, functions, or shell builtins.
Use Cases
- Find the real entry file behind
npm link,bun link, or similar linked installs. - Confirm whether a command comes from a local linked repo or from the package manager install.
- Keep
which-style behavior for normal binaries without manually chasing symlinks.
