Documentation
prun-0.0.3 has been yanked.

🍺 Run

Run is a command-line tool designed to execute a specified command in all directories that match a certain pattern within a given root directory. It provides flexibility and efficiency in running commands across multiple directories with customizable patterns.

Benchmark

Installation

cargo install prun

Usage

Run .git git fetch upstream

This command will fetch from upstream for all the .git repositories inside the current directory. Basically, it replaces the following command:

find -iname .git -type d -execdir git fetch upstream \;

To specify a --File argument or -F, if you would like to search for a file instead of a directory, use:

Run -F astro.config.ts npx astro add @playform/compress

Additionally, you can provide a --Root argument or -R to set the current working directory to a different folder. The default is ..

Run -R D:\Developer .git git fetch upstream

Specify a --Parallel argument or -P if you would like to run commands in parallel. The default is sequential.

Run -P -R D:\Developer .git git fetch upstream

Dependencies

The code imports several crates:

  • clap - For parsing command-line arguments.
  • tokio - Enables parallel execution of tasks.
  • walkdir - Facilitates filesystem traversal.

Changelog

See CHANGELOG.md for a history of changes to this CLI.