A nice lint runner


Keywords
cli, developer-tools, task-runner, terminal, textual, tui
License
GPL-3.0
Install
pip install fnug==0.0.23

Documentation

Fnug

image image image Actions status

Fnug is a command runner, well actually it's a terminal multiplexer (like tmux), but with a focus on running all your lint and test commands, at once, and displaying the result of those command. Confused? Watch the demo

screenshot

Features

  • User-friendly terminal interface, with 100% support for both keyboard and mouse navigation
  • Git integration, automatically select lints and tests that's should be run, based on what files have uncommitted changes
  • Track file changes, and selects commands based on the changed files
  • Terminal emulation with scroll back, for those really long error messages

Installation

Python 3.10 or later is required.

pipx or rye tool are highly recommended:

# Recommended
pipx install fnug
# (or with rye tool)
rye install fnug
# Via pip (NOT RECOMMENDED)
pip install fnug

Usage

To start fnug you only need to run it in a directory with a .fnug.yaml configuration file (or with the argument -c path/to/config.yaml)

Config

Fnug is controlled by a .fnug.yaml configuration file (or .fnug.json if thats more your speed).

Minimal example:

Runs a single commands

fnug_version: 0.1.0
name: fnug
commands:
  - name: hello
    cmd: echo world

Git selection example:

Uses git auto to select commands based on what files have uncommitted changes (reselect by pressing "g")

fnug_version: 0.1.0
name: fnug
commands:
  - name: hello
    cmd: echo world
    auto:
      git: true
      path:
        - "./"
      regex:
        - "\\.fnug\\.yaml$"

File watching example:

Uses file watching to monitor the file system for changes, and select commands accordingly, can be combined with git auto

fnug_version: 0.1.0
name: fnug
commands:
  - name: hello
    cmd: echo world
    auto:
      watch: true
      path:
        - "./"
      regex:
        - "\\.fnug\\.yaml$"

Advanced example:

View this projects .fnug.yaml file for an advanced example

Demo

fnug-demo.mp4

Development

Build with Rye

Install dependencies

rye sync

Run in textual devmode

log terminal: rye run console fnug (debug) terminal: rye run debug

Run lint/tests

Use fnug of course 😄 (or rye run fnug)

Thanks

Made possible by: