Thanks to visit codestin.com
Credit goes to github.com

Skip to content

verseles/run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ run

Universal task runner for modern development

CI Release License

 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—
 β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘
 β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
 β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
 β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•β•
 Universal Task Runner

run automatically detects your project's package manager or build tool and executes commands through the appropriate tool. No more remembering if a project uses npm, yarn, pnpm, bun, poetry, cargo, or any other tool!

✨ Features

  • πŸ” Auto-detection - Automatically detects 20+ package managers and build tools
  • πŸ”„ Recursive search - Works from any subdirectory
  • ⚑ Fast - Cold start < 50ms
  • πŸ”§ Zero config - Works out of the box
  • πŸ”„ Auto-update - Keeps itself up to date in the background
  • 🎨 Beautiful output - Colored output with clear status messages
  • 🐚 Shell completions - Bash, Zsh, Fish, and PowerShell support

πŸ“¦ Installation

Quick Install (Recommended)

Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/verseles/run/main/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/verseles/run/main/install.ps1 | iex

Cargo Install

cargo install run-cli

Manual Download

Download the latest release from the Releases page.

🎯 Supported Runners

Ecosystem Tool Detection Command
Node.js Bun bun.lockb / bun.lock bun run <cmd>
PNPM pnpm-lock.yaml pnpm run <cmd>
Yarn yarn.lock yarn run <cmd>
NPM package-lock.json / package.json npm run <cmd>
Python UV uv.lock uv run <cmd>
Poetry poetry.lock poetry run <cmd>
Pipenv Pipfile.lock pipenv run <cmd>
Pip requirements.txt python -m <cmd>
Rust Cargo Cargo.toml cargo <cmd>
PHP Composer composer.lock composer run <cmd>
Go Task Taskfile.yml task <cmd>
Go go.mod go <cmd>
Ruby Bundler Gemfile.lock bundle exec <cmd>
Rake Rakefile rake <cmd>
Java Gradle build.gradle gradle <cmd>
Maven pom.xml mvn <cmd>
.NET dotnet *.csproj / *.sln dotnet <cmd>
Elixir Mix mix.exs mix <cmd>
Swift SPM Package.swift swift run <cmd>
Zig Zig build.zig zig build <cmd>
Generic Make Makefile make <cmd>

πŸ“– Usage

Basic Commands

# Run a script from your project
run test

# Run build
run build

# Run any command
run lint

Passing Arguments

Use -- to pass arguments to the underlying command:

# Pass arguments to the test command
run test -- --coverage --verbose

# Build with specific flags
run build -- --production

Working from Subdirectories

run automatically searches up the directory tree to find your project's configuration:

cd src/components
run test  # Finds package.json in parent directories

Command Options

# Search up to 5 levels (default: 3)
run test --levels=5

# Ignore specific runners
run start --ignore=npm,yarn

# Show detailed detection info
run build --verbose

# Suppress all output except errors
run test --quiet

# Show command without executing (dry run)
run deploy --dry-run

# Force update check
run --update

βš™οΈ Configuration

Global Configuration

Create ~/.config/run/config.toml:

# Maximum levels to search above current directory
max_levels = 5

# Enable auto-update (default: true)
auto_update = true

# Tools to always ignore
ignore_tools = ["npm"]

# Enable verbose output by default
verbose = false

# Enable quiet mode by default
quiet = false

Project Configuration

Create run.toml in your project root:

# Override global settings for this project
max_levels = 2
ignore_tools = ["yarn"]

Configuration Precedence

  1. CLI arguments (highest priority)
  2. Project config (./run.toml)
  3. Global config (~/.config/run/config.toml)
  4. Built-in defaults

🐚 Shell Completions

Generate completions for your shell:

# Bash (add to ~/.bashrc)
mkdir -p ~/.local/share/bash-completion/completions
run completions bash > ~/.local/share/bash-completion/completions/run

# Zsh (add to ~/.zshrc)
mkdir -p ~/.zsh/completion
run completions zsh > ~/.zsh/completion/_run
fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit

# Fish
mkdir -p ~/.config/fish/completions
run completions fish > ~/.config/fish/completions/run.fish

# PowerShell (add to $PROFILE)
if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }
run completions powershell >> $PROFILE

πŸ”„ Auto-Update

run automatically updates itself in the background after each command. Updates are silent and non-blocking.

  • Updates happen after your command finishes
  • Failed updates are silently ignored
  • Disable with RUN_NO_UPDATE=1 or auto_update = false in config

After an update, you'll see a notification on the next run:

⬆ run was updated: v0.1.0 β†’ v0.2.0

Main changes:
- Added support for Zig and Swift
- Improved conflict detection

See full changelog: https://github.com/verseles/run/releases/tag/v0.2.0

πŸ”§ Conflict Resolution

When multiple lockfiles from the same ecosystem are detected:

  1. Only one tool installed: Uses that tool with a warning
  2. Multiple tools installed: Shows an error with suggested actions
  3. No tools installed: Shows installation instructions

Example conflict message:

❌ Detected Node.js with multiple lockfiles (package-lock.json, yarn.lock).
Both tools (npm, yarn) are installed.
Action needed: Remove the outdated lockfile or use --ignore=npm

πŸ“Š Exit Codes

Code Meaning
0 Success (or original command exit code)
1 Generic error
2 Runner not found
3 Lockfile conflict
127 Tool not installed

πŸ› οΈ Development

Building from Source

git clone https://github.com/verseles/run.git
cd run
cargo build --release

Running Tests

cargo test --all-features

Pre-push Checks

./scripts/pre-push.sh

Or install as a git hook:

ln -s ../../scripts/pre-push.sh .git/hooks/pre-push

πŸ—ΊοΈ Roadmap

  • MVP with 20+ runners
  • Auto-update via GitHub Releases
  • Configuration system
  • Shell completions
  • Cache detection results
  • Workspace/monorepo support (Nx, Turborepo)
  • Plugin system for custom runners
  • VS Code extension

πŸ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

See LICENSE for details.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Made with πŸ€– by Verseles