Skip to content

javanhut/ImLazy

Repository files navigation

ImLazy

_______________                ______
|              |               |    |
|_____   ______|               |    |
      |  |                     |    |
      |  |                     |    |         |-------|
      |  |       |--|    |--|  |    |         |  |__| |
      |  |       |   \  /   |  |    |         |       |
______|  |_____  |    \/    |  |    |_______  |   ___ |
|              | |  |\  /|  |  |            | |  |  | |
|______________| |__| \/ |__|  |____________| |__|  |_| [] [] [] screw it

A task runner for people who can't be bothered.

Why

I got tired of:

  • Remembering long commands
  • Writing Makefiles
  • Learning Yet Another Build Tool
  • .PHONY existing

So I made this. It reads a TOML file. It runs commands. That's it.

Install

go install github.com/javanhut/imlazy@latest

Or:

git clone https://github.com/javanhut/imlazy
cd imlazy
go run main.go install

if you're too lazy to move it its in its own lazy.toml i used the lazy to control the lazy.

Quick Start

imlazy init

Edit lazy.toml:

[commands.build]
run = ["go build -o myapp"]

[commands.test]
run = ["go test ./..."]

Run it:

imlazy build
imlazy test

Done.

Features

  • Aliases - imlazy b instead of imlazy build
  • Dependencies - run commands in order
  • Variables - {{name}} interpolation
  • Watch mode - re-run on file changes
  • Platform-specific - different commands for linux/mac/windows
  • Fuzzy matching - typos are forgiven
  • Interactive picker - for when you forget command names
  • Parallel execution - go fast
  • Dotenv support - load .env files
  • Timeouts & retries - for flaky stuff
  • Namespacing - test:unit, test:e2e, run with test:*
  • Makefile migration - auto-convert Makefiles to lazy.toml

Documentation

Too lazy to scroll? Same.

Or just run imlazy help.

Example

[settings]
default = "dev"

[variables]
name = "myapp"

[commands.build]
desc = "Build it"
run = ["go build -o {{name}}"]
alias = ["b"]

[commands.test]
desc = "Test it"
run = ["go test ./..."]
alias = ["t"]

[commands.dev]
desc = "Build and run"
dep = ["build"]
run = ["./{{name}}"]
imlazy dev          # build then run
imlazy b            # just build
imlazy -w test      # watch mode
imlazy -i           # interactive picker
imlazy build test   # multiple commands
imlazy last         # re-run last command

Does it have bugs?

Probably. Run imlazy validate to catch the obvious ones.


Go nuts. - Javan

About

too lazy to explain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages