Skip to content

mschakulat/caddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caddy

A JavaScript tool manager

Use Caddy to install and manage your JavaScript tools

Currently supported tools:

Install Caddy

curl -s https://get.caddy.fetchit.de | bash

Install a tool

caddy install pnpm
caddy install node

Install a specific version of a tool

caddy install [email protected]
caddy install [email protected]

Use a tool

pnpm -v
node -v

If you install node with Caddy, it will automatically add npm and npx to your path.

Use Caddy in a project

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"
    }
}

Pin a tool to a specific version

You also can use the caddy pin command to add a specific version of a tool to your package.json file:

No conflict mode

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"
    }
}

Uninstall Caddy

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