Show DEV: Run - Easily manage and invoke small scripts and wrappers (Written in Golang)

tekwizely profile image TekWize.ly ・2 min read


Do you find yourself using tools like make to manage non build-related scripts?

Build tools are great, but they are not optimized for general script management.

Introducing Run:

GitHub : https://github.com/TekWizely/run

Run aims to be better at managing small scripts and wrappers, while incorporating a familiar make-like syntax.


Here are a few of Run's features:

  • Terse, make-like syntax
  • Manage multiple script types: Bash, Python, Ruby, etc.
  • Automatic help text generation
  • Command scripts are executed in a single sub-shell, not like make's (default) behavior of executing each line of a recipe in a separate sub-shell.
  • Define cli options and have the values passed to your scripts as environment variables.


Where make has the ubiquitous Makefile, run has the cleverly-named "Runfile"

By default, run will look for a file named "Runfile" in the current directory, exiting with error if not found.

See the project README for details on specifying alternative runfiles, as well as other special modes you might find useful.

Hello World Example

The project's README starts with a much simpler example and walks through the various features, but I thought I would share a more fleshed out example to demonstrate several of the features together:


# Hello world example.
# Prints "Hello, <name>".
# OPTION NAME -n,--name <name> Name to say hello to
  echo "Hello, ${NAME:-World}"

list commands

$ run list

  list     (builtin) List available commands
  help     (builtin) Show Help for a command
  hello    Hello world example.
       run [-r runfile] help <command>
          (show help for <command>)
  or   run [-r runfile] <command> [option ...]
          (run <command>)

show help for hello command

$ run help hello

  Hello world example.
  Prints "Hello, <name>".
  -h, --help
        Show full help screen
  -n, --name <name>
        Name to say hello to

invoke hello command with no options

$ run hello

Hello, World

invoke hello command with options

$ run hello --name=Newman
$ run hello -n Newman

Hello, Newman


Currently, installing requires using go get, but there is an active PR for a brew formula and I'm also working on a PKGBUILD file.


If you're at all interested in managing task runners and scripts, I hope you will give my project a try.

I am happy to answer any questions you might have.

Thank you for your time and Happy Holidays!

-TekWizely ( https://github.com/TekWizely )

[edit] Typos


Editor guide

This seems really useful, well done!