A package manager for JavaScript projects. cotton install runs faster than rm -rf node_modules.

10x Faster
100% Compatible
0 Config
$ cargo install --locked --git https://github.com/danielhuang/cotton

Simple

Works with everything you already use. React, Next.js, Vite, TypeScript - just drop it in and go. Zero config needed.

🚀

Speedy

We're not kidding about the speed. cotton install literally finishes before rm -rf node_modules can delete your old ones.

🛡️

Trouble Free

No more "delete node_modules and try again" solutions. Your dependencies stay in sync, every time. Just like they should.

Lightning Fast. Seriously.

Bun's Benchmark

Cotton
0.00s
0.270s
Bun 1.2
0.00s
0.536s
pnpm
0.00s
2.015s
Yarn
0.00s
2.633s
npm
0.00s
4.031s

Create React App

Cotton
0.0s
0.3s
pnpm
0.0s
5.5s
Yarn
0.0s
10.6s
npm
0.0s
13.0s

Ready in 30 Seconds

📥 Install packages

One command installs everything and locks it down. Your team gets the exact same versions, guaranteed.

cotton install

🏃 Run scripts

Skip the install step entirely. Cotton runs your scripts and handles missing packages automatically.

cotton run start

Auto-restart on changes:

cotton run start --watch package.json

🔄 Update packages

Bump everything to the latest versions. Cotton handles the conflicts so you don't have to.

cotton update

⚙️ Configure options

Need Puppeteer or Electron? One config line enables install scripts when you actually need them.

cotton.toml:

[config]
allow_install_scripts = true

Deploy Anywhere

Cotton works with all the platforms you already use:

🌐 Netlify
☁️ Cloudflare Pages
▲ Vercel
🚀 Railway
🔮 Render
🌊 DigitalOcean
📱 Heroku
⚡ AWS Amplify
🔷 Azure