| Crates.io | run-this |
| lib.rs | run-this |
| version | 0.1.17 |
| created_at | 2025-03-02 19:59:48.779589+00 |
| updated_at | 2025-03-03 14:22:46.236545+00 |
| description | A utility that gracefully handles missing command dependencies |
| homepage | |
| repository | https://github.com/arsenstorm/run-this |
| max_upload_size | |
| id | 1574843 |
| size | 1,116,390 |
run-thisrun-this is a utility command that gracefully handles missing command dependencies.
# This environment doesn't have bun.sh installed.
run-this -- bun run dev
Since this environment doesn't have Bun installed, the command bun run dev will not run and would normally throw an error.
run-this gracefully stops the system from throwing this error and informs the user that they do not have Bun installed, along with instructions on how to install it.
curl -fsSL https://raw.githubusercontent.com/arsenstorm/run-this/main/install.sh | bash
irm https://raw.githubusercontent.com/arsenstorm/run-this/main/install.ps1 | iex
# Clone the repository
git clone https://github.com/arsenstorm/run-this.git
cd run-this
# Build and install
cargo install --path .
cargo install run-this
run-this -- <command> [arguments]
The -- is used to separate the run-this command from the command you want to run. This is necessary if the command you want to run has options that might be interpreted by run-this.
You can create a run-this.json file in your project directory to provide custom installation instructions for specific commands.
When a command is not found, run-this will check this file for installation instructions before falling back to built-in suggestions.
The tool automatically detects the user's operating system and provides platform-specific installation instructions when available.
{
"flutter": {
"url": "https://flutter.dev/docs/get-started/install",
"messages": ["Or use Homebrew on macOS: brew install --cask flutter"],
"windows": {
"url": "https://flutter.dev/docs/get-started/install/windows",
"messages": ["Or use Chocolatey: choco install flutter"]
},
"macos": {
"url": "https://flutter.dev/docs/get-started/install/macos",
"messages": ["Or use Homebrew: brew install --cask flutter"]
},
"linux": {
"url": "https://flutter.dev/docs/get-started/install/linux",
"messages": ["Or use snapd: sudo snap install flutter --classic"]
}
},
"deno": {
"url": "https://deno.land/#installation",
"windows": {
"messages": ["PowerShell: irm https://deno.land/install.ps1 | iex"]
},
"macos": {
"messages": ["Use Homebrew: brew install deno"]
}
}
}
Supported platforms:
windows)macos)linux)The project includes both unit tests and integration tests organized in the src/tests directory:
Unit tests cover the core functionality of the application, including:
Integration tests verify the CLI functionality:
To run all tests:
cargo test
MIT