A fast, lightweight tool and interactive Terminal User Interface (TUI) to run, monitor, and manage local developer processes as user-level systemd daemons, with full terminal interactivity via screen.
nx is designed for developers who want to run background processes (like dev servers, databases, queue workers, or scraping scripts) reliably on their local Linux machines without cluttering terminal tabs, yet retain the ability to instantly attach and interact with those processes at any time.
Running long-lived local processes during development usually comes with friction:
- Lost Terminals: Keeping multiple terminal tabs or sessions open just to keep local servers running.
- Process Management: Manually writing systemd
.servicefiles, placing them in~/.config/systemd/user/, and memorizing long commands (systemctl --user daemon-reload,systemctl --user enable nx-app.service, etc.). - No Interactivity: Background systemd processes standard input/output is redirected to journald, meaning you cannot interact with a debugger (like
pdbornode inspect) or interactive CLI interfaces. - Messy Cleanup: Forgetting to stop processes, resulting in orphaned background tasks running on local ports.
nx provides a seamless bridge between systemd's reliability and terminal multiplexer interactivity (screen):
- Instant Daemonization: Launch any command under systemd instantly (e.g.,
nx npm run dev).nxautomatically generates, enables, and starts the systemd service for you. - Interactive Attachment: By running your service inside systemd-managed
screensessions, you can attach to the live interactive session from the TUI or command line, run interactive debuggers or input commands, and safely detach (Ctrl+A,D) while the process keeps running in the background. - Streamlined TUI Dashboard: Run
nxwith no arguments to open a beautiful, responsive Bubble Tea TUI manager to view, start, stop, restart, toggle autostart, attach, and cleanly delete/uninstall services.
Run this single-line command in your terminal to instantly download and run the latest compiled global binary, which automatically registers itself:
curl -fsSL https://github.com/Neuxbane/nx/raw/refs/heads/main/nx -o nx && chmod +x nx && ./nxAlternatively, you can build from source by compiling and executing it locally:
go build -o nx main.go && ./nxnx will automatically detect local execution, copy/install itself globally to ~/.local/bin/nx, and verify your system $PATH.
To completely uninstall nx and clean up all configured services:
nx --uninstallRun nx followed by the command you want to run inside your project directory:
nx npm run dev
# or
nx python main.pynx will automatically:
- Generate a systemd user service file named
nx-<folder-name>.service. - Reload systemd, enable the service, and start it.
- Attach your terminal directly to the interactive
screensession.
Tip
Detaching: To leave the process running in the background and return to your shell, press Ctrl+A followed by d.
Terminating: To stop the process completely, press Ctrl+C inside the attached screen session.
Run nx with no arguments to launch the management dashboard:
nxInside the dashboard:
[↑/↓]or[k/j]: Move cursor between services.[a]: Attach to the selected running service's interactive screen session.[l]: View the systemd Logs (real-timejournalctlstream).[s]: Start or Stop the selected service.[r]: Restart the selected service (if running).[e]: Toggle Autostart (Enable/Disable systemd load configuration).[d]: Step-by-step Breakdown (Tear-down/clean up the service: Stop -> Disable -> Delete unit file).[q]: Quit the dashboard.
- Service Files: Generated in
~/.config/systemd/user/nx-<app-name>.service. - State Management: Handled natively by systemd (
systemctl --user). - Environment Variables: Automatically inherits your current
$PATHand shell environment variables, ensuring scripts run exactly as they would in your current terminal session.