Select & Run Your Scripts Across Any PM, Instantly.
rundo is a CLI tool that scans your monorepo/workspace for all package.json files, collects their scripts, and lets you select and run them interactively with fuzzy search. It automatically detects your package manager (bun, pnpm, yarn, or npm) and executes the script in the correct directory.
- π Auto-discovery: Recursively scans for all
package.jsonfiles in your monorepo - π― Smart filtering: Automatically excludes
node_modulesand other build directories - π§ Package manager detection: Auto-detects bun β pnpm β yarn β npm
- π Fuzzy search: Interactive search with autocomplete
- π Instant execution: Runs scripts in their correct directories
- π Smart history: Remembers frequently used scripts and prioritizes them
- π History browser: Interactive history with search and re-execution
- β Help system: Built-in help with
--helpflag - ποΈ XDG compliant: Follows XDG Base Directory Specification for data storage
- βοΈ Configurable: Supports configuration files for custom behavior
# Using npm
npm install -g rundo
# Using pnpm
pnpm add -g rundo
# Using yarn
yarn global add rundonpx rundorundoThe tool will:
- Scan for all
package.jsonfiles in the current directory and subdirectories - Detect your package manager
- Show an interactive list of all available scripts (with history-based prioritization)
- Execute the selected script in the correct directory
- Save the executed script to history for future prioritization
rundo historyInteractive history browser that allows you to:
- Browse previously executed scripts
- Search through history with fuzzy search
- Select and re-run scripts instantly
- See execution time and directory context
rundo cleanRemoves all saved script execution history.
rundo --help
# or
rundo -hShows usage information, available commands, and features.
$ rundo
β
Found 16 scripts using pnpm
? π Search script: (Use arrow keys or type to search)
β― root:build # β Recently used scripts appear first
root:dev
apps/web:start
apps/api:test
packages/ui:build
packages/shared:lint$ rundo history
π Command History (3 entries):
? π Search history: (Use arrow keys or type to search)
β― root:build (~/) - 5m ago
apps/web:start (~/apps/web) - 2h ago
packages/ui:test (~/packages/ui) - 1d ago$ rundo --help
π Rundo - Interactive npm script runner
Usage:
rundo Run interactive script selector
rundo history Browse and run from command history
rundo clean Clear command history
Options:
-h, --help Show this help message
Features:
β’ Auto-detects package manager (bun β pnpm β yarn β npm)
β’ Fuzzy search for scripts across monorepo/workspace
β’ Command history with search and quick re-execution
β’ Respects .rdrc, .rundorc, and rundo.config.json files
Repository: https://github.com/myzkey/rundoRundo automatically saves your script execution history to prioritize frequently used scripts. The history is stored following XDG Base Directory Specification:
- History file:
~/.local/share/rundo/history.json - Custom location: Set
$XDG_DATA_HOMEenvironment variable to override
- Smart prioritization: Recently used scripts appear at the top
- Automatic cleanup: Maintains only the last 50 executed scripts
- Duplicate handling: Updates timestamp instead of creating duplicates
- Privacy-friendly: Only successful executions are saved
Rundo supports configuration files for customizing scan behavior:
.rundorcor.rundorc.jsonrundo.config.json
{
"maxDepth": 3,
"ignore": ["node_modules", "dist", "build"],
"include": ["apps/*", "packages/*"]
}| Option | Type | Default | Description |
|---|---|---|---|
maxDepth |
number | 10 |
Maximum directory depth to scan |
ignore |
string[] | ["node_modules", "dist", ...] |
Directories to ignore |
include |
string[] | [] |
Specific patterns to include |
Q: Scripts not found in my monorepo
A: Check that your package.json files contain a scripts section and ensure they're not in ignored directories.
Q: Wrong package manager detected A: Rundo detects package managers in order: bun β pnpm β yarn β npm. Make sure your preferred package manager is installed globally.
Q: History not working
A: Ensure you have write permissions to ~/.local/share/rundo/ or set $XDG_DATA_HOME to a writable directory.
Q: Performance issues in large repositories A: Use configuration file to limit scan depth or specify include patterns to reduce scan scope.
For debugging, you can check the history file location:
# Default location
ls ~/.local/share/rundo/history.json
# Custom XDG location
ls $XDG_DATA_HOME/rundo/history.json- Node.js 20+
- Any package manager (npm, yarn, pnpm, bun)
Perfect for large monorepos with multiple apps and packages:
my-monorepo/
βββ apps/
β βββ web/package.json # build, dev, test
β βββ api/package.json # start, test, migrate
βββ packages/
β βββ ui/package.json # build, storybook
β βββ shared/package.json # build, test
βββ package.json # build:all, test:all
Quickly switch between different project contexts without memorizing paths and script names.
Use in CI environments to run specific scripts across workspace packages.
- Fast scanning: Optimized directory traversal with smart ignore patterns
- Minimal memory usage: Streams directory contents instead of loading everything into memory
- Instant search: Fuzzy search with sub-millisecond response times
- Efficient history: Only stores essential information with automatic cleanup
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Run the test suite (
pnpm test) - Run linting (
pnpm lint) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone the repository
git clone https://github.com/myzkey/rundo.git
cd rundo
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Run tests
pnpm test
# Build for production
pnpm buildMIT