Skip to main content

A nice lint runner

Project description

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fnug-0.0.24.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

fnug-0.0.24-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file fnug-0.0.24.tar.gz.

File metadata

  • Download URL: fnug-0.0.24.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fnug-0.0.24.tar.gz
Algorithm Hash digest
SHA256 3d95b56f588d75ea93f4c78feb7e7af5f15b7b4436680ba8098d68ec76d541e8
MD5 0708ac9df0d09dce54080ce6a011bfa5
BLAKE2b-256 12b0bd369a432e01168c9bab0f3181e33228c7e04fd76ca75d4c76bf0998e506

See more details on using hashes here.

File details

Details for the file fnug-0.0.24-py3-none-any.whl.

File metadata

  • Download URL: fnug-0.0.24-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fnug-0.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 f02484c853a24c41818ffe094f43394dcf62754de04f69397e6c308948fdb8e8
MD5 30fe6c8012b0b1d90c6b1c372d3f81b2
BLAKE2b-256 1d5348626f00a52c7a5da3139cde652ef803856376dce031d5a93715ad7898c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page