{"id":14537677,"url":"https://github.com/ryanccn/nrr","last_synced_at":"2025-04-08T10:24:32.705Z","repository":{"id":207760830,"uuid":"720018617","full_name":"ryanccn/nrr","owner":"ryanccn","description":"Minimal, blazing fast npm scripts runner","archived":false,"fork":false,"pushed_at":"2025-03-31T11:41:48.000Z","size":364,"stargazers_count":171,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T08:44:39.833Z","etag":null,"topics":["bun","clap","cli","nodejs","npm","npm-script","npm-scripts","npm-scripts-runner","pnpm","rust","rust-cli","yarn"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanccn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"ryancaodev"}},"created_at":"2023-11-17T12:00:42.000Z","updated_at":"2025-03-30T13:18:41.000Z","dependencies_parsed_at":"2023-12-27T06:39:17.382Z","dependency_job_id":"a43a7224-de58-4ee7-a54f-243f58962a4d","html_url":"https://github.com/ryanccn/nrr","commit_stats":{"total_commits":162,"total_committers":6,"mean_commits":27.0,"dds":0.3271604938271605,"last_synced_commit":"a30318ebcd6cd74ee1e87edc3c92772db83dd1d4"},"previous_names":["ryanccn/nrr"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanccn%2Fnrr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanccn%2Fnrr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanccn%2Fnrr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanccn%2Fnrr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanccn","download_url":"https://codeload.github.com/ryanccn/nrr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247821368,"owners_count":21001661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","clap","cli","nodejs","npm","npm-script","npm-scripts","npm-scripts-runner","pnpm","rust","rust-cli","yarn"],"created_at":"2024-09-05T10:01:24.734Z","updated_at":"2025-04-08T10:24:32.686Z","avatar_url":"https://github.com/ryanccn.png","language":"Rust","readme":"# nrr\n\n[![Crates.io Version](https://img.shields.io/crates/v/nrr?style=flat-square\u0026logo=rust)](https://crates.io/crates/nrr) [![Crates.io Total Downloads](https://img.shields.io/crates/d/nrr?style=flat-square\u0026logo=rust)](https://crates.io/crates/nrr) [![GitHub Actions Build Workflow Status](https://img.shields.io/github/actions/workflow/status/ryanccn/nrr/build.yml?branch=main\u0026event=push\u0026style=flat-square\u0026logo=github)](https://github.com/ryanccn/nrr/actions/workflows/build.yml) [![GitHub Actions Test Workflow Status](https://img.shields.io/github/actions/workflow/status/ryanccn/nrr/test.yml?branch=main\u0026event=push\u0026style=flat-square\u0026logo=github\u0026label=test)](https://github.com/ryanccn/nrr/actions/workflows/test.yml) [![GitHub License](https://img.shields.io/github/license/ryanccn/nrr?style=flat-square\u0026color=blue)](https://github.com/ryanccn/nrr/blob/main/LICENSE)\n\n[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)\n\nMinimal, blazing fast npm scripts runner.\n\n[**Features**](#features) • [**Installation**](#installation) • [**Usage**](#usage)\n\n## Features\n\n### Performance\n\nnrr initializes and resolves scripts way faster than other package managers and script runners. It achieves this by providing the largest feature coverage possible while keeping it simple and performant.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eBenchmark of \u003ccode\u003enrr\u003c/code\u003e, \u003ccode\u003enpm\u003c/code\u003e, \u003ccode\u003eyarn\u003c/code\u003e, \u003ccode\u003epnpm\u003c/code\u003e, \u003ccode\u003enode --run\u003c/code\u003e, \u003ccode\u003ebun\u003c/code\u003e, and \u003ccode\u003edum\u003c/code\u003e running a simple \u003ccode\u003etrue\u003c/code\u003e script\u003c/summary\u003e\n\n| Command              |    Mean [ms] | Min [ms] | Max [ms] |       Relative |\n| :------------------- | -----------: | -------: | -------: | -------------: |\n| **`nrr` v0.9.5**     |    1.4 ± 0.1 |      1.2 |      2.8 |           1.00 |\n| `dum` v0.1.19        |    2.0 ± 0.5 |      1.7 |     20.9 |    1.37 ± 0.37 |\n| `bun` v1.1.26        |    4.4 ± 0.8 |      3.6 |     12.6 |    3.06 ± 0.61 |\n| `node --run` v22.7.0 |    5.6 ± 0.3 |      5.1 |      7.3 |    3.90 ± 0.35 |\n| `npm` v10.8.2        |  178.5 ± 7.4 |    168.6 |    191.0 | 123.22 ± 10.42 |\n| `yarn` v4.4.1        |  310.7 ± 5.3 |    301.7 |    319.8 | 214.52 ± 16.21 |\n| `pnpm` v9.9.0        | 520.9 ± 19.0 |    502.3 |    554.8 | 359.61 ± 29.56 |\n\n\u003csmall\u003eBenchmarks run on an AWS EC2 \u003ccode\u003et4g.micro\u003c/code\u003e instance with the command \u003ccode\u003ehyperfine --shell=none --warmup=5 --output=pipe --export-markdown=benchmark.md 'npm run dev' -n 'npm' 'yarn run dev' -n 'yarn' 'pnpm run dev' -n 'pnpm' 'node --run dev' -n 'node --run' 'bun run dev' -n 'bun' 'dum run dev' -n 'dum' 'nrr dev' -n 'nrr'\u003c/code\u003e\u003c/small\u003e\n\n\u003c/details\u003e\n\n### Package and script metadata display\n\nnrr provides a better-looking display of package details and the command being run than most, and also prints this information to `stderr` instead of `stdout` like some of the package managers do (erroneously).\n\n### Command execution\n\nOn top of the standard script runner functionality that runs your scripts in `package.json`, nrr can also execute arbitrary commands in your npm package environments! You can use the `nrr exec` and `nrr x` commands to execute commands, similar to how `npx` or `pnpm exec` works (but faster, of course).\n\nDo note, however, that nrr cannot run commands from remote packages. That feature falls within the purview of package managers, which nrr is not.\n\n\u003e [!TIP]\n\u003e\n\u003e If you create a symlink that has a name of `nrx` (or, on Windows, a hard link that has a name of `nrx.exe`) in your `PATH`, you can execute commands through the `nrx` binary without using a subcommand!\n\n### Script listing\n\nRunning nrr without any arguments or running the `nrr list` subcommand will try to find any packages in the current working directory and its ancestors, and list the scripts available from them, both name and command.\n\n### Tooling compatibility\n\nnrr has compatibility functionality that patches `npm_execpath` so that tools like [`npm-run-all2`](https://github.com/bcomnes/npm-run-all2) use it instead of package managers for running sub-scripts.\n\n\u003e [!WARNING]\n\u003e\n\u003e This may cause unexpected behavior when `npm_execpath` is used for non-script running purposes; open an issue if you encounter any bugs.\n\nWhen running nested scripts with nrr, nrr has specialized behavior that prints nesting depth information while staying minimal and performant:\n\n```\nsveltekit-project@0.0.1\n$ run-s lint format:check\nsveltekit-project@0.0.1 lint\n$$ eslint .\n```\n\n### Completions\n\nnrr provides smart completions for Bash, Elvish, Fish, PowerShell, and Zsh. In addition to basic completions for subcommands and options, nrr also dynamically completes script names when using `nrr` / `nrr run` and executables when using `nrx` / `nrr exec`.\n\n### Spelling suggestions\n\nIf you mistype a script name (e.g. `buils` instead of `build`), nrr will intelligently suggest the right script to run in the error message using the Jaro similarity algorithm from the [`strsim`](https://docs.rs/strsim/latest/strsim/fn.jaro.html) crate.\n\n## Installation\n\n### Nix\n\nAdd the overlay or package from the `github:ryanccn/nrr` flake to your own system flake. Alternatively, install the package declaratively:\n\n```sh\nnix profile install github:ryanccn/nrr\n```\n\nnrr is also available in [Nixpkgs](https://github.com/NixOS/nixpkgs) as `nixpkgs#nrr`.\n\n### Installer\n\nThis installer script works on Linux and macOS and downloads binaries from GitHub Releases, falling back to `cargo install` if a prebuilt binary cannot be found.\n\n```sh\ncurl --proto '=https' --tlsv1.2 https://nrr.ryanccn.dev | sh\n```\n\n### Cargo\n\nnrr supports [cargo-binstall](https://github.com/cargo-bins/cargo-binstall), which downloads a binary if possible from GitHub Releases instead of compiling the crate from source.\n\n```sh\ncargo binstall nrr\n```\n\nIf you do want to compile from source, install the crate with Cargo directly:\n\n```sh\ncargo install nrr\n```\n\n### GitHub Releases\n\nYou can download pre-compiled binaries for Linux, macOS, and Windows from the [latest GitHub Release](https://github.com/ryanccn/nrr/releases/latest). Linux binaries are statically linked to musl; Windows binaries require MSVC.\n\n## Usage\n\n```console\n$ nrr dev\n$ nrr run dev\n```\n\n```console\n$ nrx eslint --version\n$ nrr x eslint --version\n$ nrr exec eslint --version\n```\n\n```console\n$ nrr\n$ nrr list\n```\n\n```bash\n# Bash\necho \"source \u003c(COMPLETE=bash nrr)\" \u003e\u003e ~/.bashrc\n\n# Elvish\necho \"eval (E:COMPLETE=elvish nrr | slurp)\" \u003e\u003e ~/.elvish/rc.elv\n\n# Fish\necho \"source (COMPLETE=fish nrr | psub)\" \u003e\u003e ~/.config/fish/config.fish\n\n# PowerShell\n$env:COMPLETE = \"powershell\"\necho \"nrr | Out-String | Invoke-Expression\" \u003e\u003e $PROFILE\nRemove-Item Env:\\COMPLETE\n\n# Zsh\necho \"source \u003c(COMPLETE=zsh nrr)\" \u003e\u003e ~/.zshrc\n```\n\nThis section only provides an overview of nrr's command-line functionality. For more options and information, run `nrr --help`!\n\n## License\n\nGPLv3\n","funding_links":["https://ko-fi.com/ryancaodev"],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanccn%2Fnrr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanccn%2Fnrr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanccn%2Fnrr/lists"}