~fancycade/nrg

Juice up your Crystal dev flow
Changed scripts to commands
Document format
Add special command 'format' to run crystal tool format

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~fancycade/nrg
read/write
git@git.sr.ht:~fancycade/nrg

You can also use your local clone with git send-email.

nrg

Juice up your Crystal dev flow with a shot of nrg!!!

Simple system command runner (like Make) for Crystal projects.

Write commands as keys in your shard.yml file.

Then execute them with the nrg tool and feel that Crystal energy vibrating through you!

Build

make dev

or

make prod

Usage

Blog post

Install nrg onto your system.

sudo make install

Add keys in the script field in your project's shard.yml file.

commands:
 dev:
   crystal build app.cr

Then run that command while in the project directory:

nrg dev

It simply executes system commands listed in the key.

Multiline commands work too. Make sure to add | at the end of the key name.

commands:
 prod: |
   crystal build --release app.cr
   echo "Built prod"

Format

Since formatting is a common thing, I've added a special command for formatting as shorthand for (crystal tool format):

nrg format