Skip to content

abennouna/tusk

 
 

Repository files navigation

Tusk

GitHub release CircleCI AppVeyor license Gitter

Tusk is a yaml-based task runner. By creating a tusk.yml in the root of a repository, Tusk becomes a custom command line tool with minimal configuration.

Details on the usage and configuration options can be found in the project documentation.

Features

  • Customizable: Specify your own tasks and options with support for command-line flags, environment variables, conditional logic, and more.
  • Explorable: With help documentation generated dynamically and support for Bash and Zsh tab completion available, all the help you need to get started in a project is available straight from the command line.
  • Accessible: Built for usability with a simple YAML configuration, familiar syntax for passing options, Bash-like variable interpolation, and a colorful terminal output.
  • Zero Dependencies: All you need is a single binary file to get started on Linux, macOS, or Windows.

Getting Started

Installation

The latest version can be downloaded from the releases page.

Installation Script

To install automatically, or for use in CI, run the following command:

curl -sL https://git.io/tusk | bash -s -- -b /usr/local/bin latest

To pin to a specific version, which is recommended for automated scripts, replace latest with the tag for that version.

To install to another directory, change the path passed to -b.

Homebrew

On macOS, installation is also available through homebrew:

brew install rliebz/tusk/tusk

Usage

Create a tusk.yml file in the root of a project repository:

tasks:
  greet:
    usage: Say hello to someone
    options:
      name:
        usage: A person to say "Hello" to
        default: World
    run: echo "Hello, ${name}!"

As long as there is a tusk.yml file in the working or any parent directory, tasks can be run:

$ tusk greet --name friend
Running: echo "Hello, friend!"
Hello, friend!

Help messages are dynamically generated based on the YAML configuration:

$ tusk --help
tusk - the modern task runner

Usage:
   tusk [global options] <task> [task options]

Tasks:
   greet  Say hello to someone

Global Options:
   -f, --file <file>  Set file to use as the config file
   -h, --help         Show help and exit
   ...

Individual tasks have help messages as well:

$ tusk greet --help
tusk greet - Say hello to someone

Usage:
   tusk greet [options]

Options:
   --name <value>  A person to say "Hello" to

Additional information on the configuration spec can be found in the project documentation.

For more detailed examples, check out the project's own tusk.yml file.

Contributing

Set-up instructions for a development environment and contribution guidelines can be found in CONTRIBUTING.md.

About

The modern task runner

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 93.9%
  • Shell 5.8%
  • Dockerfile 0.3%