Expand description
nrs - npm Run Scripts
A fast, interactive terminal user interface (TUI) for discovering
and executing npm/yarn/pnpm/bun scripts defined in package.json files.
§Features
- Fast: Sub-50ms startup time (Rust native binary)
- Intuitive: Number keys for quick execution, fuzzy search, visual grid
- Smart: Auto-detect package manager, remember history, show descriptions
- Cross-platform: Linux and macOS support
- Zero-config: Works out of the box, optional configuration for power users
§Modules
cli- Command-line interface argument parsingconfig- Configuration file loading and typeserror- Error types and result helpersfilter- Fuzzy filtering for scriptshistory- Script execution history trackingpackage- Package.json parsing and package manager detectionrunner- Script executiontui- Terminal user interfaceutils- Path and terminal utilities
§Example
use npm_run_scripts::package::{parse_scripts, detect_runner, Runner};
use std::path::Path;
// Parse scripts from a project
let project_dir = Path::new("./my-project");
let scripts = parse_scripts(project_dir).expect("Failed to parse scripts");
// Detect the package manager
let runner = detect_runner(project_dir);
// Get the command for a script
let cmd = runner.run_command("dev");
println!("Command: {:?}", cmd);Re-exports§
pub use cli::Cli;pub use config::Config;pub use error::NrsError;pub use error::Result;pub use package::Runner;pub use package::Script;pub use package::Scripts;
Modules§
- cli
- CLI argument definitions. CLI argument definitions for nrs.
- config
- Configuration system for loading and merging settings. Configuration module for nrs.
- error
- Error types and result helpers. Custom error types for nrs.
- filter
- Fuzzy filtering for scripts. Filter module for nrs.
- history
- Script execution history tracking. History module for nrs.
- package
- Package.json parsing and package manager detection. Package module for nrs.
- runner
- Script execution. Runner module for nrs.
- tui
- Terminal user interface. TUI module for nrs.
- utils
- Path and terminal utilities. Utility module for nrs.