MCPcopy Index your code
hub / github.com/egoist/dum

github.com/egoist/dum @v0.1.20

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.20 ↗ · + Follow
22 symbols 45 edges 6 files 4 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dum replaces npm run and npx.

Instead of waiting 200ms for your npm client to start, it will start immediately.

💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.

CleanShot 2021-11-20 at 15 23 54@2x


How

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

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

Command Mean [ms] Min [ms] Max [ms] Relative
dum foo 41.7 ± 1.2 39.8 44.6 1.00
npm run foo 333.7 ± 2.0 330.0 336.0 8.01 ± 0.23

Install

Homebrew

brew install egoist/tap/dum

Arch Linux AUR

yay -S dum
# or
paru -S dum

Check https://aur.archlinux.org/packages/dum for version info.

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 the package manager you're currently using:

# 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

We detect the package manager automatically by checking for lock files in the current directory. If no lock file is found, we ask you to select a package manager first.

Limitations

Inspiration

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

Development

cargo run -- <...args to test>

Sponsors

sponsors

License

MIT © EGOIST

Core symbols most depended-on inside this repo

to_string
called by 13
src/install.rs
show_cursor
called by 3
src/prompt.rs
parse_args
called by 3
src/args.rs
run_command
called by 3
src/run.rs
select
called by 2
src/prompt.rs
input
called by 2
src/prompt.rs
get_path_env
called by 2
src/run.rs
find_closest_files
called by 2
src/run.rs

Shape

Function 17
Class 2
Method 2
Enum 1

Languages

Rust100%

Modules by API surface

src/run.rs7 symbols
src/args.rs6 symbols
src/prompt.rs4 symbols
src/install.rs4 symbols
src/main.rs1 symbols

For agents

$ claude mcp add dum \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact