A tiny antomation tool.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
Areskul 8860c1876c add distro packaging pipeline 1 week ago
.pipelight/config add distro packaging pipeline 1 week ago
exec replace multispaces with new line on tree print 4 weeks ago
pipelight add tests 1 week ago
pipeline add a tag 1 week ago
playground/examples add playground for tests 1 week ago
shared add tests 1 week ago
typescript add teleport crate 2 weeks ago
utils add failsafe guqrd if triggers in config and outside of git repo 1 week ago
.gitignore print statuless nodes 1 month ago
Cargo.lock add playground for tests 1 week ago
Cargo.toml miette error display 4 weeks ago
README.md smaller readme 3 weeks ago
ROADMAP.md add Deno allow run 1 week ago
pipelight.ts add distro packaging pipeline 1 week ago

README.md

Pipelight

A tiny automation tool.

Wrap your bash script with Typescript. And trigger those pipelines automatically on git action.

Define, Run pipe, check Logs, without living your terminal.

Full Documentation

Install

Package only available on Arch linux. (Available soon on Debian/Ubuntu and Fedora)

Install from the AUR

paru -S pipelight

Or from source

git clone <this_repo>
cd pipelight
cargo build --release
cp target/release/pipelight* /<my_bin_directory>/

TL;DR

If you're too can not stand the suspens and go further in the documentation.. Just read the USAGE section, install and try the Cli. It will yell a few times until your config file is good. But in the end it will run smooth. Enjoy!

In short: Pipelight is easy to install, fast, and usable for every kind of project.


Usage

Configuration example

Create a config file at the root of your project

//pipelight.config.ts
const config = {
  pipelines: [
    {
      name: "my_pipeline",
      steps: [
        {
          name: "list working directory",
          commands: ["ls -alh"]
        },
        {
          name: "get working directory",
          commands: ["pwd"]
        }
      ]
    }
  ]
};
export default config;

Command Line Interface (Cli)

In the same folder..

List pipelines defined in config file

pipelight ls

or

pipelight ls -vvv

Run a pipeline

pipelight run <pipeline_name>

Compulsively check execution with pretty termial logs

pipelight logs

Verbosity can be increased..

pipelight logs -vvv

pretty verbose logs picture

_The actulal pipeline to deploy the documentation website._

Abort pipeline execution

pipelight stop <pipeline_name>

Triggers

Only works in a Git repo.

//pipelight.config.ts
const config = {
  pipelines: [
    {
      name: "automatic",
      triggers: [
        {
          actions: ["pre-push", "pre-commit"],
          branches: ["master"]
        }
      ]
    }
  ]
};
export default config;

Define triggers as combinations of branch-name and git-hooks.

How it works

Think of it as a bash wrapper.

When we first deploy a project we quickly edit some raw bash scripts. It's clearly the fastest way to test.

//deploy.sh
vitest
vite build
rsync local_files to_my_remote_server

But at some point, this method lakes verbosity, and automation... Just put your commands into a Pipeline object.

//pipelight.config.ts
import { Config } from "npm:pipelight";
const config: Config = {
  pipelines: [
    {
      name: "deploy",
      steps: [
        {
          name: "test",
          commands: ["vitest"]
        },
        {
          name: "build",
          commands: ["vite build"]
        },
        {
          name: "send",
          commands: ["rsync local_files to_my_remote_server"]
        }
      ]
    }
  ]
};
export default config;

Add triggers, appreciate logs, and bettern your deployment scripts.