Home

Awesome

<br><br><br>

<p align="center"> <img src="https://mystickermania.com/cdn/stickers/games/among-us-lime-character-dum.svg" width="200"> <br><br> <strong>dum</strong> replaces <code>npm run</code> and <code>npx</code>. <br>Instead of waiting 200ms for your npm client to start, it will start immediately. <br> <strong>💛 You can help the author become a full-time open-source maintainer by <a href="https://github.com/sponsors/egoist">sponsoring him on GitHub</a>.</strong> </p> <br> <p align="center"> <img width="500" alt="CleanShot 2021-11-20 at 15 23 54@2x" src="https://user-images.githubusercontent.com/8784712/142718353-6e6f8327-c27e-404a-866e-6d5af3567cbc.png"></p> <br>
<br>

How

This is written in Rust! (Or any compile-to-native language).

Benchmark (hyperfine "dum foo" "npm run foo" --warmup 10):

CommandMean [ms]Min [ms]Max [ms]Relative
dum foo41.7 ± 1.239.844.61.00
npm run foo333.7 ± 2.0330.0336.08.01 ± 0.23

Install

Homebrew

brew install egoist/tap/dum

Shell

curl -sSL https://bina.egoist.dev/egoist/dum | sh

Cargo

cargo install dum

Scoop

scoop install dum

GitHub Releases

Download a release manually and move it to /usr/local/bin manually.

Usage

dum <npm_script|bin_script> [...args_to_forward]: Run npm scripts or scripts in node_modules/.bin, like yarn run, npm run, npx.

If you want to pass flags to dum itself, like the -c flag to change directory, you should put it before the script name, like dum -c another/directory script_name --forward some_flag.

Examples:

dum some-npm-script

dum some-npm-script --flags will --be forwarded
# Like npx, but mush faster
dum some-npm-package-cli-name --flags will --be forwarded

# Change working directory
dum -c packages/sub-package build

# More
dum --help

Install Packages

Dum is not a package manager yet, but we forward install, add, remove commands to npm, pnpm and yarn automatically:

# Run `npm i` or `yarn` or `pnpm i` depending on the project
dum install # or `dum i`
# Like above but add packages
dum add react vue -D

dum remove react vue

Limitations

Inspiration

I want to try and learn Rust so I made this. Inspired by bun.

Sponsors

sponsors

License

MIT © EGOIST