all repos — erl @ 93e469e1487d1c41abc1bc8b2c04c2f63438301a

Execute Reload Loop

drwxrwxrwx
command/
drwxrwxrwx
ignore/
drwxrwxrwx
output/
drwxrwxrwx
repository/
drwxrwxrwx
state/
drwxrwxrwx
testcases/
drwxrwxrwx
watcher/
-rw-r--r--
739
.gitignore
-rw-r--r--
634
.golangci.yaml
-rw-r--r--
1068
LICENSE
-rw-r--r--
1581
README.md
-rw-r--r--
503
default.nix
-rw-r--r--
10
envrc.sample
-rw-r--r--
6637
flake.lock
-rw-r--r--
2444
flake.nix
-rw-r--r--
369
go.mod
-rw-r--r--
2182
go.sum
-rw-r--r--
930
gomod2nix.toml
-rw-r--r--
170
justfile
-rw-r--r--
3781
main.go
-rw-r--r--
499
shell.nix

E(a)rl

E(a)rl helps with your development by restarting your command when files change.

A file watcher based on things I liked about nodemon and watchexec:

  • When command exits, wait for changes instead of re-starting ad infinitum

The name is an acronym for “Execute Reload Loop”, inspired by “Read Eval Print Loop”. “Earl” is nicer to say than “erl”, but “erl” is nicer to type on a QWERTY keyboard.

Installation

Using Nix

If you have Nix with flakes enabled:

nix run git+https:git.alin.ovh/erl -- --exec your-command arg1 arg2

Or install it:

nix profile install git+https:git.alin.ovh/erl

Usage

Basic usage:

erl --exec go run main.go

Command Line Options

  • --exec string - Command to execute on file change (optional, defaults to “go run”)
  • --quiet - Suppress erl’s own output
  • --verbose - Enable verbose output (print file events)
  • --watch path - Add extra paths to watch (recursive)

Examples

Go development (explicit):

erl --exec go run .

Go development (implicit):

erl .

When no --exec flag is provided, erl defaults to running go run with the provided arguments.

Build and test:

erl --exec make test

Quiet mode:

erl --quiet --exec npm start

Verbose mode:

erl --verbose --exec python app.py

Development

nix develop

just run

just test

just build

License

This project is available under the MIT License.