{"id":34028746,"url":"https://github.com/nickolaj-jepsen/fnug","last_synced_at":"2026-03-06T00:10:10.582Z","repository":{"id":217194729,"uuid":"743272286","full_name":"nickolaj-jepsen/fnug","owner":"nickolaj-jepsen","description":"Fnug runs all your lints, tests and commands at once, in the terminal. With git integration and file watching","archived":false,"fork":false,"pushed_at":"2026-03-04T23:24:13.000Z","size":1347,"stargazers_count":54,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-05T03:12:24.038Z","etag":null,"topics":["cli","developer-tools","task-runner","terminal","textual","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickolaj-jepsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-14T20:48:27.000Z","updated_at":"2026-03-04T23:24:08.000Z","dependencies_parsed_at":"2024-02-13T18:06:26.813Z","dependency_job_id":"777a129a-9e23-4f9f-8276-ad662a54bc7d","html_url":"https://github.com/nickolaj-jepsen/fnug","commit_stats":null,"previous_names":["nickolaj-jepsen/fnug"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/nickolaj-jepsen/fnug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolaj-jepsen%2Ffnug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolaj-jepsen%2Ffnug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolaj-jepsen%2Ffnug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolaj-jepsen%2Ffnug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickolaj-jepsen","download_url":"https://codeload.github.com/nickolaj-jepsen/fnug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickolaj-jepsen%2Ffnug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","developer-tools","task-runner","terminal","textual","tui"],"created_at":"2025-12-13T17:17:44.730Z","updated_at":"2026-03-06T00:10:10.571Z","avatar_url":"https://github.com/nickolaj-jepsen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fnug\n\n\u003e [!WARNING]\n\u003e The main branch is currently undergoing a refactor to Rust. If you're looking for the latest Python version, see the [`python`](https://github.com/nickolaj-jepsen/fnug/tree/python) branch.\n\n[![CI](https://github.com/nickolaj-jepsen/fnug/workflows/CI/badge.svg)](https://github.com/nickolaj-jepsen/fnug/actions)\n[![Crates.io](https://img.shields.io/crates/v/fnug)](https://crates.io/crates/fnug)\n[![image](https://img.shields.io/pypi/v/fnug.svg)](https://pypi.python.org/pypi/fnug)\n\nFnug is a TUI command runner that automatically selects and executes lint and test commands based on git changes or file watching. Think of it as a terminal multiplexer (like [tmux](https://github.com/tmux/tmux/wiki)), but purpose-built for running your dev commands side by side.\n\n![Fnug demo](docs/demo.gif)\n\n## Features\n\n- **Git integration** — automatically select commands based on uncommitted file changes\n- **File watching** — monitor the file system and re-select commands when files change\n- **Terminal emulation with scrollback** — full PTY support for interactive commands and long output\n- **Headless mode** (`fnug check`) — run selected commands without the TUI, useful for CI\n- **Git hook integration** (`fnug init-hooks`) — install a pre-commit hook that runs `fnug check`\n- **Command dependencies** — define `depends_on` to control execution order\n- **Environment variables** — set per-command or per-group env vars\n- **Nested command groups** — organize commands into a hierarchical tree with inherited settings\n- **Workspace support** — discover and merge `.fnug.yaml` files from subdirectories in mono-repos\n\n## Installation\n\n### From crates.io\n\n```bash\ncargo install fnug\n```\n\n### From PyPI\n\n```bash\n# With uv\nuv tool install fnug\n\n# With pipx\npipx install fnug\n```\n\n### From GitHub Releases\n\nDownload a prebuilt binary from [GitHub Releases](https://github.com/nickolaj-jepsen/fnug/releases).\n\n### With Nix\n\n```bash\n# Run directly\nnix run github:nickolaj-jepsen/fnug\n\n# Or install to profile\nnix profile install github:nickolaj-jepsen/fnug\n```\n\n### From source\n\n```bash\ngit clone https://github.com/nickolaj-jepsen/fnug.git\ncd fnug\ncargo install --path .\n```\n\n## Usage\n\nRun `fnug` in a directory with a `.fnug.yaml` configuration file (or pass `-c path/to/config.yaml`).\n\n### Subcommands\n\n| Command           | Description                                                     |\n| ----------------- | --------------------------------------------------------------- |\n| `fnug`            | Launch the TUI                                                  |\n| `fnug check`      | Run selected commands headlessly (exit code reflects pass/fail) |\n| `fnug init-hooks` | Install a git pre-commit hook that runs `fnug check`            |\n\n### Flags\n\n| Flag              | Description                                                     |\n| ----------------- | --------------------------------------------------------------- |\n| `-c \u003cpath\u003e`       | Path to config file                                             |\n| `--no-workspace`  | Disable workspace resolution (don't search for a parent root)   |\n| `--log-file`      | Write logs to a file                                            |\n| `--log-level`     | Log level: off, error, warn, info, debug, trace (default: info) |\n| `--fail-fast`     | Stop on first failure (`check` only)                            |\n| `--no-tui`        | Never prompt to open TUI on failure (`check` only)              |\n| `--mute-success`  | Suppress output for passing commands (`check` only)             |\n| `--all`           | Include commands with `auto.check: false` (`check` only)        |\n| `--force`         | Overwrite existing hook (`init-hooks` only)                     |\n\n## Configuration\n\nFnug searches for `.fnug.yaml`, `.fnug.yml`, or `.fnug.json` from the current directory upward.\n\n### Minimal example\n\n```yaml\nfnug_version: 0.1.0\nname: my-project\ncommands:\n  - name: hello\n    cmd: echo world\n```\n\n### Git auto-selection\n\nSelect commands based on uncommitted changes. Re-trigger with `g` in the TUI.\n\n```yaml\nfnug_version: 0.1.0\nname: my-project\ncommands:\n  - name: lint\n    cmd: cargo clippy\n    auto:\n      git: true\n      path:\n        - \"./src\"\n      regex:\n        - \"\\\\.rs$\"\n```\n\n### File watching\n\nMonitor the file system and select commands when matching files change. Can be combined with git auto.\n\n```yaml\nfnug_version: 0.1.0\nname: my-project\ncommands:\n  - name: test\n    cmd: cargo test\n    auto:\n      watch: true\n      path:\n        - \"./src\"\n      regex:\n        - \"\\\\.rs$\"\n```\n\n### Always auto-selection\n\nMark commands that should always be selected, regardless of git changes or file watching.\n\n```yaml\nfnug_version: 0.1.0\nname: my-project\ncommands:\n  - name: typecheck\n    cmd: cargo check\n    auto:\n      always: true\n```\n\n### Excluding commands from check mode\n\nCommands with `auto.check: false` are skipped during `fnug check` (and git hooks) but remain auto-selected in the TUI. Use `fnug check --all` to include them.\n\nUseful for commands that are too slow or noisy for pre-commit checks but you still want to run them automatically in the TUI.\n\n```yaml\nfnug_version: 0.1.0\nname: my-project\ncommands:\n  - name: unit tests\n    cmd: cargo test\n    auto:\n      git: true\n  - name: integration tests\n    cmd: cargo test --release\n    auto:\n      git: true\n      check: false   # skip in `fnug check`, still auto-selected in TUI\n```\n\n### Nested groups with inheritance\n\nGroups inherit `cwd`, `auto`, and `env` settings from their parent.\n\n```yaml\nfnug_version: 0.1.0\nname: my-project\nchildren:\n  - name: backend\n    auto:\n      git: true\n      watch: true\n      path:\n        - \"./src\"\n      regex:\n        - \"\\\\.rs$\"\n    commands:\n      - name: fmt\n        cmd: cargo fmt\n      - name: test\n        cmd: cargo test\n      - name: clippy\n        cmd: cargo clippy\n```\n\n### Workspace\n\nWorkspace mode discovers `.fnug.yaml` files in subdirectories and merges them as child groups. This is useful for mono-repos where each package has its own config.\n\nWhen `workspace: true`, fnug walks the filesystem (skipping `.gitignore`'d and hidden directories) to find sub-configs. Files do not need to be git-tracked to be discovered.\n\n```yaml\n# Auto-discover sub-configs (walks up to 5 levels deep)\nfnug_version: 0.1.0\nname: my-monorepo\nworkspace: true\ncommands:\n  - name: root-lint\n    cmd: echo \"root\"\n```\n\n```yaml\n# Custom max scan depth\nworkspace:\n  max_depth: 2\n```\n\n```yaml\n# Explicit glob patterns\nworkspace:\n  paths:\n    - \"./packages/*/\"\n    - \"./apps/*/\"\n```\n\nWhen run from a subdirectory that contains a `.fnug.yaml`, fnug automatically resolves upward to the nearest workspace root. Use `--no-workspace` to disable this behavior.\n\n### Advanced example\n\nSee this project's [`.fnug.yaml`](.fnug.yaml) for a full example.\n\n### Configuration reference\n\n#### Root fields\n\n| Field          | Type              | Description                                                       |\n| -------------- | ----------------- | ----------------------------------------------------------------- |\n| `fnug_version` | string            | Expected fnug version — warns on mismatch                         |\n| `name`         | string            | Display name for the root group                                   |\n| `workspace`    | bool / object     | Enable workspace mode (see [Workspace](#workspace))               |\n| `commands`     | list              | Top-level commands                                                |\n| `children`     | list              | Nested command groups                                             |\n| `cwd`          | string            | Working directory (inherited by children)                         |\n| `env`          | map               | Environment variables (inherited by children)                     |\n| `auto`         | object            | Default auto rules (inherited by children)                        |\n\n#### Command fields\n\n| Field        | Type              | Description                                                         |\n| ------------ | ----------------- | ------------------------------------------------------------------- |\n| `name`       | string            | Display name (required)                                             |\n| `cmd`        | string            | Shell command to run (required)                                     |\n| `id`         | string            | Custom identifier — defaults to the command name                    |\n| `cwd`        | string            | Working directory override                                          |\n| `env`        | map               | Extra environment variables                                         |\n| `auto`       | object            | Auto-selection rules (see below)                                    |\n| `depends_on` | list of strings   | Command IDs that must finish before this one runs                   |\n| `scrollback` | integer           | PTY scrollback buffer size (number of lines)                        |\n\n#### Group fields\n\n| Field      | Type              | Description                                                           |\n| ---------- | ----------------- | --------------------------------------------------------------------- |\n| `name`     | string            | Display name (required)                                               |\n| `id`       | string            | Custom identifier — defaults to the group name                        |\n| `cwd`      | string            | Working directory (inherited by children)                             |\n| `env`      | map               | Environment variables (inherited by children)                         |\n| `auto`     | object            | Default auto rules (inherited by children)                            |\n| `commands` | list              | Commands in this group                                                |\n| `children` | list              | Nested child groups                                                   |\n\n#### Auto fields\n\n| Field    | Type              | Description                                                             |\n| -------- | ----------------- | ----------------------------------------------------------------------- |\n| `git`    | bool              | Select when git-changed files match `path`/`regex`                      |\n| `watch`  | bool              | Select when watched files match `path`/`regex`                          |\n| `always` | bool              | Always selected regardless of changes                                   |\n| `path`   | list of strings   | Path prefixes to match against (e.g. `\"./src\"`)                        |\n| `regex`  | list of strings   | Regex patterns to match against file paths (e.g. `\"\\\\.rs$\"`)           |\n| `check`  | bool              | Include in `fnug check` — set `false` to skip (default `true`)         |\n\n## Keyboard Shortcuts\n\n| Key       | Context  | Action                            |\n| --------- | -------- | --------------------------------- |\n| `j` / `↓` | Tree     | Move down                         |\n| `k` / `↑` | Tree     | Move up                           |\n| `h` / `←` | Tree     | Collapse group / Deselect command |\n| `l` / `→` | Tree     | Expand group / Select command     |\n| `Space`   | Tree     | Toggle expand/select              |\n| `Enter`   | Tree     | Run all selected commands         |\n| `r`       | Tree     | Run current command               |\n| `s`       | Tree     | Stop current command              |\n| `c`       | Tree     | Clear current command             |\n| `g`       | Tree     | Git auto-select                   |\n| `/`       | Tree     | Search/filter commands            |\n| `Esc`     | Search   | Clear search                      |\n| `L`       | Tree     | Toggle log panel                  |\n| `Tab`     | Tree     | Focus terminal                    |\n| `Esc`     | Terminal | Back to tree                      |\n| `Ctrl+R`  | Global   | Toggle fullscreen                 |\n| `Ctrl+C`  | Global   | Quit                              |\n| `q`       | Tree     | Quit                              |\n\n### Mouse\n\n- **Click** a tree item to select it\n- **Double-click** a command to run it, or a group to expand/collapse\n- **Click** the selection orb (●/○) or arrow (▼/▶) to toggle\n- **Drag** the separator between tree and terminal to resize\n- **Scroll wheel** in the terminal panel to scroll output\n- **Right-click** a command for a context menu with run/stop/clear options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickolaj-jepsen%2Ffnug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickolaj-jepsen%2Ffnug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickolaj-jepsen%2Ffnug/lists"}