Intro

Rupit is a straightforward CLI tool designed to execute long, complex, and multi-step terminal commands using aliases.

It leverages a configuration file, rupit.json, which holds the list of aliases for Rupit to reference.

It functions similarly to how npm scripts are used in Node.js projects.

How to use

For Linux users you can use the pre-built binary from the releases page, it's built and tested on Ubuntu 22.04.4 LTS,

or you can build from source for linux, windows, and macOS systems using the following steps:

  1. Pull the repo:
git pull git@github.com:mohamedeliwa/rupit.git
  1. Build the project with:
cargo build --release
  1. Put the release binary in a suitable execution path
  2. Create rupit.json file, with a structure similar to the following:
{
  "aliases": {
    "greetings": "echo \"Hello World\"",
    "multistep": "cd ~; touch test.txt"
  }
}

Note: depending on your OS the path at which to put the file will be

Linux: /home/<user>/.config/rupit/rupit.json

Windows: C:\Users\<user>\AppData\Roaming\Foo Corp\Bar App\rupit.json

macOS: /Users/<user>/Library/Application Support/com.Foo-Corp.Bar-App/rupit.json

  1. Run the command with an alias name rupit <ALIAS>
rupit greetings

this will execute the following:

echo "Hello World"

Hello World

Available Commands

  • rupit run <alias> -> to run specific alias command from the config file.
  • rupit show -c -> to show the expected path of the config file.
  • rupit show -a <alias> -> to print the alias corresponding command without executing it.
  • rupit help -> to print the help message

Links