How nickolaj-jepsen/fnug works
Main Components
a) Core Components:
• Python Frontend (TUI Layer)
• Rust Backend (Core Engine)
• Configuration Handler
• Command Runner System
• File System Watcher
• Git Integration
b) Key Subsystems:
• PTY (Pseudo Terminal) Management
• Command Selection System
• User Interface Components
┌─ Python Frontend (TUI) ─────────────────────┐
• Terminal UI (Textual-based) │
• Components: │
• * Context Menu │
• * Lint Tree │
• * Terminal Display │
• ┬───────────────────────┘
• ↕ (IPC)
┌─ Rust Backend Engine ──────────────────────┐
• ┌─ Command Management ─┐ ┌─ PTY System ──┐ │
• Auto Command │ │ - Terminal │ │
• Group Command │ │ - Python Int. │ │
• Inherit Command │ │ - Messages │ │
• ┘ └───────────────┘ │
• ┌─ Selectors ─────────┐ ┌─ Config ─────┐ │
• Git Integration │ │ - YAML/JSON │ │
• File Watcher │ │ - Validation │ │
• Always Selector │ └───────────────┘ │
• ┘ │
• ┘
┌─ File System ─┐ ┌─ Git Repository ─┐
• Watching │ │ - Change Status │
• Config Files│ │ - File Tracking │
• ┘ └─────────────────┘
Important Relationships to Highlight
• Bidirectional communication between Python Frontend and Rust Backend
• How the Selector system interacts with both Git and File System
• Demonstrate the flow from configuration to command execution
• How PTY system manages command output to the UI
Implementation Details
• That Python 3.10+ is required
• Supported config formats (YAML/JSON)
• Command selection mechanisms (git-based, file-watch, manual)