# inf

<img width="128" alt="inf logo" src="https://raw.githubusercontent.com/magnickolas/inf/refs/heads/main/extra/logo.svg" align="left"> 

**Instant feedback for your development loop.**

*inf* monitors source files and executes the given compile / run commands as soon
as those files change.

<br clear="left">

<p align="center">
  <img src="https://raw.githubusercontent.com/magnickolas/inf/refs/heads/main/extra/demo.gif" alt="inf demo" width="700">
</p>

## Installation

```console
curl -fsSL https://raw.githubusercontent.com/magnickolas/inf/main/install.sh | sh
```

Or install from source:
```console
git clone https://github.com/magnickolas/inf
cd inf
make install prefix=~/.local
```

## Usage examples

Rebuild and run when `main.c` changes:
```console
inf --run ./main gcc -o main main.c
```

Pipe input into the binary when either `main.c` or `input.txt` changes:
```console
inf --input input.txt --run ./main gcc -o main main.c
```

For build systems, list every source file that should trigger a rebuild. Here the shell expands the globs and pipes them into inf (inf monitors all `*.c` and `*.h` files in `src/`):
```console
echo src/*.c src/*.h | inf --run "make test" make -j4
```

- Run a static type checker in _zen_ mode (no meta-headers), whenever any Python file in `src/` or its subdirectories changes:

```console
inf -z mypy src/**/*.py
```
