pls

A polite but determined task runner

pls is a simple, general-purpose task runner that aims at making common tasks easier to manage and execute. It was inspired by some of the functionalities provided by the nifty package manager, only without the package manager part.

Main Features

pls can be used to:

  • Define a catalog of actions to perform on things, which will result in commands to be executed, each with the same simple syntax.
  • Define a catalog of things, representing virtually anything that can be the object of a shell command or referred within other things.
  • Define a set of dependencies among commands, in the form of commands.
  • Manage aliases to commonly-used strings (properties) to use within other sections of the configuration.

Hello, World!

Here’s minimal but quite comprehensive example of how everything works with pls. Given the following pls.yml file (placed in $HOME or in %USERPROFILE% on Windows):

things:
  home:
    value: /home/h3rald
  bin:
    value: {{home.value}}/bin
  self:
    value: {{home.value}}/dev/pls
    exe: pls
    config: {{home.value}}/pls.yml
    nimble: true
actions:
  config:
    config: vim {{config}}
  build:
    nimble+value: cd {{value}} && nimble build -d:release
  publish:
    exe+value: cd {{value}} && $(cp "{{exe}}" "{{bin.value}}") &
deps:
  publish self:
    - build self

It will be possible to run the following command to build the pls program itself and copy it to the /home/h3rald/bin:

pls publish self

Similarly, to edit the pls.yml file using Vim, it will be sufficient to run:

pls config self

Downloads