#cli #cli-tool #productivity #command-runner #clap

app runner-cli

A cli tool that let's you map commands to a shorter alias

7 releases

0.1.9 Apr 15, 2023
0.1.8 Dec 8, 2022
0.1.7 Nov 26, 2022

#310 in Command-line interface

Download history 3/week @ 2024-02-24 146/week @ 2024-03-02 36/week @ 2024-03-09

185 downloads per month

MIT license

2MB
294 lines

Runner

πŸ€” What is this?

A cli tool that let's you map commands to a shorter alias. Run the mapped command using the <ALIAS_NAME>.

runner <ALIAS_NAME>

You can map all your commands in runner.toml file

An example runner.toml file:

[Command]
alias = "ci"
program = "cargo"
args = ["install", "lsd"]

[Command]
alias = "nv"
program = "node"
args = ["-v"]

[Command]
alias = "cc"
program = "cargo"
args = ["check"]

An example run for [ci] alias

Output:

πŸ“¦ Installation

cargo install runner-cli

🏁 Initialize

It will initialize a empty runner.toml file in config directory

runner --init

Output:

βš™οΈ Config

Get the path to runner.toml file by running runner with config option

runner --config

πŸ—ΊοΈ Mappings

Get all the user mapped alias

runner --mapping

Output:

βž• Add

Map a new command to an alias right from the terminal

runner --add

Output:

)

πŸ” Find

Find a command mapped to the given alias

runner --find <ALIAS_NAME>

Output:

Available

Check if a alias is available to use

runner --available <ALIAS_NAME>

πŸ–₯️ Options:

    -a, --add        Map a new command to a alias right from terminal
        --available  Check if a alias is available to use
    -c, --config     Path of the the config file runner.toml
    -f, --find       Find a command mapped to the give alias
    -h, --help       Print help information
    -i, --init       Initialize a empty runner.toml file
    -m, --mapping    Show all the user defined mappings
    -V, --version    Print version information

πŸ“„ TOML file guide:

Each command starts wtih a [Command] key

[Command]
alias =  "Shorter subcommand you want to use instead of the command"
program = "CLI Program Name(like: git, cat, batcat, code, neofetch, cargo, python, node, npm etc.)"
args = "Arguments you want to pass to the cli program"

Contribution

Have any suggestion or feature idea/request feel free to open a issue.

Dependencies

~4–15MB
~153K SLoC