Git Product home page Git Product logo

taru's Introduction

Taru - local workflow runner

Build status

Taru is a simple local-first workflow-runner for unix-based systems. Taru is designed as an alternative to makefiles, shell scripts and bash aliases to store and manage local tasks and workflows. The configuration is specified through YAML files, and allows for the execution of any shell commands that can be run in your local shell environment.

Features

  • Workflow configuration using YAML with support for injecting:

    • User-defined variables
    • Environment variables
  • Specify multi-depth job dependencies.

Installation

Running the application requires Rust to be installed on your system and the installation guide requires the Cargo package manager to be accessible on your PATH.

Building using Cargo

Run

cargo install --git https://github.com/RasmusNygren/taru taru

Assuming that your cargo bin directory is on your path you can now invoke the Taru cli through taru.

Using homebrew

Taru is available via the rasmusnygren/taru tap.

Run

brew tap rasmusnygren/taru
brew install taru

Using Taru

Usage: taru <COMMAND>

Commands:
  `run`   Run a job
  `list`  List all jobs
  `help`  Print this message or the help of the given subcommand(s)

Options:
  `-h`, `--help`     Print help
  `-V`, `--version`  Print version

YAML Syntax

The YAML schema currently supports jobs and variables as top-level keywords.

jobs

Each job is specified with a name and must include a steps parameter where each step must correspond to a valid shell command, but a command can also include variables if they are specified in the variables section. Variables are referred to by specifying the key value inside single brackets e.g. {variable_name}

Each job also accepts requires as an optional parameter to specify dependencies. requires only accepts other jobs as depdendencies and thus only other job names are valid values.

variables

Variables are optional and are specified using key: value syntax.

Variables can reference environment variables by prefixing the environment variable name with env.. For example, the SHELL environment variable can be assigned to the variable name shell using the syntax

shell: env.SHELL

Examples:

jobs:
  authenticate-docker-with-aws:
    steps:
      - aws ecr get-login-password --region eu-north-1 | docker login --username AWS --password-stdin {aws_uri}

  build-lambda-amd64:
    requires:
      - authenticate-docker-with-aws
    steps:
      - docker buildx build --platform linux/amd64 -t {aws_image_tag} .
      - docker tag {aws_image_tag} {aws_uri}/{aws_image_tag}
      - docker push {aws_uri}/{aws_image_tag}
      - aws lambda update-function-code --region eu-north-1 --function-name scrape-backend-api --image-uri {aws_uri}/{aws_image_tag} --architecture=x86_64

  run-local:
    steps:
      echo 'Running local server as {user}.'
      uvicorn --reload src/api:app



variables:
  aws_image_tag: scrape-ai:latest
  aws_uri: aws_account_id.dkr.ecr.eu-north-1.amazonaws.com
  user: env.USER

taru's People

Contributors

rasmusnygren avatar

Stargazers

 avatar Tim Kersey avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.