A nice lint runner
Project description
Fnug
Fnug /fnuk/ 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
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 (without autorun)
fnug_version: 0.1.0
name: fnug
commands:
- name: hello
cmd: echo world
Git autorun example:
Uses git autorun to select commands (reselect by pressing "g")
fnug_version: 0.1.0
name: fnug
commands:
- name: hello
cmd: echo world
autorun:
git: true
path:
- "./"
regex:
- "\\.fnug\\.yaml$"
Watch autorun example:
Uses file autorun to monitor the file system for changes, and select commands accordingly, can be combined with git autorun
fnug_version: 0.1.0
name: fnug
commands:
- name: hello
cmd: echo world
autorun:
watch: true
path:
- "./"
regex:
- "\\.fnug\\.yaml$"
Advanced example:
View this projects .fnug.yaml
file for an advanced example
Demo
https://github.com/nickolaj-jepsen/fnug/assets/1039554/8f8a4d34-8beb-4fb4-9bbc-6fd0a4a384be
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.