lazy-badger

Crates.iolazy-badger
lib.rslazy-badger
version0.2.0
sourcesrc
created_at2024-07-19 03:30:01.640168
updated_at2024-07-30 02:02:15.150509
descriptionSimple Command Line Interface to call scripts from your working directory
homepage
repositoryhttps://github.com/gabaconrado/lazy-badger
max_upload_size
id1308252
size20,792
Gabriel Conrado (gabaconrado)

documentation

README

Lazy Badger

Simple utility to run scripts in the project level to boost your workflow

Overview

Lazy badger is a tool to call scripts in a pre-configured directory to make the development workflow smooth in a consistent way across different projects.

Features

  • Calls bash scripts from the working directory;
  • Forwards received parameters to the inner script;

Is this a make with files instead of commands?

Almost, the main differences are:

  • Commands are identified by their file names;
  • You can send parameters to them directly;
  • No dependencies between scripts;

The project was actually motivated by make, but without the building pragmatism present there. It aims to be a simplified, more focused on general workflow management.

Basic usage

Add some scripts to a directory (./scripts by default) in your working directory and use the tool to call them.

# For the following directory structure
#
# .
# ./scripts/
# ./scripts/script_one.sh
# ./scripts/scoped/script_two.sh
# ./scripts/scoped/more_scoped/with_args.sh

# Call the scripts directly
lazy-badger script_one
lazy-badger script_two

# Pass arguments to them
lazy-badger with_args foo bar baz

# Change default script root
lazy-badger --scripts-root my-root-dir my-script

# List all available scripts
lazy-badger

# Help message
lazy-badger --help

Requirements/Limitations

  • Only works for systems that use bash as their underlying command executor;
  • Scripts require to be readable and executable by the user running the application;

Future improvements

  • Add logging and better debugging capabilities;
  • Support scripts with the same name in different sub-directories;
Commit count: 0

cargo fmt