A JavaScript tool manager
Currently supported tools:
curl -s https://get.caddy.fetchit.de | bash
caddy install pnpm
caddy install node
caddy install [email protected]
caddy install [email protected]
pnpm -v
node -v
If you run Caddy in a directory with a package.json
file,
it will automatically install the needed version of node and pnpm.
Therefor you hava to add the following to your package.json
file:
{
"caddy": {
"pnpm": "8.10.0",
"node": "21.2.0"
}
}
You also can use the caddy pin
command to add a specific version of a tool to your package.json
file:
caddy pin [email protected]
caddy pin [email protected]
You are free to change the section identifier which you are using in the package.json
. By default Caddy uses the identifier caddy
:
{
"caddy": {
"pnpm": "8.10.0",
"node": "21.2.0"
}
}
But you can change it to whatever you want:
caddy config id <your-identifier>
After that, pinning or reading a version will respect your configured identifier:
{
"<your-identifier>": {
"pnpm": "8.10.0",
"node": "21.2.0"
}
}
If you want to uninstall Caddy, you can simply delete the Caddy directory:
rm ~/.caddy
After that you have to remove the following lines from your ~/.bashrc
or ~/.zshrc
file:
export CADDY_HOME=~/.caddy
export PATH=$CADDY_HOME/bin:$PATH