Skip to main content

A nice lint runner

Project description

Fnug

image image image Actions status

Fnug /fnuk/ is a lint runner, well actually it's a terminal multiplexer (like e.g. tmux), but with a focus on running lint commands defined in a .fnug.yaml file, and displaying the result of those command.

[!IMPORTANT] This is prerelease software, breaking changes might be introduced in minor versions!

Installation

Currently, only Python 3.11 and 3.12 is supported. pipx is highly recommended:

pipx install fnug

Demo

https://github.com/nickolaj-jepsen/fnug/assets/1039554/a0c47289-9670-4d81-aa24-39204caf8c89

Config

Fnug is controlled by a .fnug.yaml, a minimal example would be:

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

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.15.tar.gz (28.3 kB view hashes)

Uploaded Source

Built Distribution

fnug-0.0.15-py3-none-any.whl (28.1 kB view hashes)

Uploaded Python 3

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