7 releases (breaking)

0.7.0 Jun 25, 2023
0.6.0 Jun 24, 2023
0.5.0 Jun 23, 2023
0.4.0 Jun 23, 2023
0.1.0 Jun 22, 2023

#337 in Build Utils

30 downloads per month

MIT license

19KB
404 lines

Command runner for your ./scripts folder

invoke-script is ✨ syntactic sugar ✨ around executing programs in your scripts folder.

Tip: Alias invoke-script to something short like is

Install

This is currently only available as a cargo binary. Installation options will be expanded once/if this gets to v1.0.0.

cargo install invoke-script

Quickstart

I you have a file starting with a hash-bang line in a ./scripts folder:

scripts/build.sh

#! /usr/bin/sh
echo compiling stuff...
sleep 2
echo done

You run it using:

invoke-script build
>> compiling stuff...
>> done

It does not need to be bash. Any interpreter-like program can be used if you can specify the full path to it. On linux machines, you can use the /usr/bin/env if you are not sure what the full path might be.

scripts/test.py

#! /usr/bin/env python

print("HELLO FROM PYTHON")

Run it the same way:

invoke-script test
>> HELLO FROM PYTHON

Dependencies

~0.4–0.8MB
~19K SLoC