If you work daily on JavaScript projects with various package manager configurations (npm, yarn, pnpm …) and you use a ZSH shell (with or without Oh my ZSH), I just released a ZSH plugin to switch the package manager.

This module allows you to automatically load the right package manager by opening your project

The plugin is installed as follows:

git clone <https://github.com/drouian-m/zsh-pkgmanager-switcher> ~/.zsh/zsh-pkgmanager-switcher

Then declare t in your .zshrc file :

source ~/.zsh/zsh-pkgmanager-switcher/zsh-pkgmanager-switcher.zsh

The complete installation documentation is available here : https://github.com/drouian-m/zsh-pkgmanager-switcher/blob/main/INSTALL.md

Demo

asciicast

https://github.com/drouian-m/zsh-pkgmanager-switcher