π½ NY
Universal Node Package Manager
node β’ yarn β’ pnpm
Features
- Universal - Picks the right package manager for you based on the lockfile in your folder. Easy peasy!
- Versatile - Handles the basics like installing all your dependencies, adding new packages, and kicking off scripts.
- Speedy - Crafted in Rust to give you a quick ride. No extra node processes to slow you down!
- TypeScript-Ready - Adding a new dependency? Don't worry! It'll fetch any missing
@types
packages for you if needed.
Usage
ny # installs all dependencies eq. to: yarn install
ny add zod # installs zod package eq. to: yarn add zod
ny add react # installs react package and attempts to automatically install missing typings (@types/react)
ny test # executes package.json's test script eq. to: yarn test
ny vitest # executes node_modules/.bin binary eq. to: yarn vitest
Installation
Tea
Tea is a Homebrew successor and recommended way of installing NY.
tea ny
Brew
brew install krzkaczor/tap/ny
Download binary for Linux / Mac Os X
Get the newest release from releases page.
Dive deeper
Motivation
In the world of JavaScript, there's a fun mix of package managers - npm, yarn, pnpm. Pick your poison. Programmers often switch between projects that use different PMs multiple times a day. Did you just typed yarn
when the project uses npm
? Well too bad -- you've wasted couple of seconds again. With π½NY, there's no guesswork. Just type ny
and it picks the right manager for you. Handy, right?
And here's the kicker: π½NY is snappier! Especially when running package scripts (like when you type yarn test
). It's written in Rust and it zips through tasks about ~200ms faster by skipping spawning node process just to parse package.json. Sweet, huh?
Main sources of inspiration were antfu/ni (but it's written in JS) and egoist/dum (but it's only a task runner).
TypeScript support
If ny
detects that it's running in TypeScript enabled package, it will attempt to install missing typings when adding new packages. Right now this behaviour can't be turned off.
Roadmap & contributing
Have a look at open issues. Feel free to work on any of them but first let us know via a comment to avoid doubling the work. Simply upvote issues to help us with prioritization.
Logo
Logo should depict a statue of liberty (a symbol of New York ;) ) holding tools. Midjourney prompt goes something like: simple mascot, statue of liberty with tools, pixelart style
. Later vectorizer.ai was used to get SVG out of bitmap.
I know it's not perfect and if you figure out a better prompt let me know!
License
Kris Kaczor | MIT