Metadata-Version: 2.4
Name: nrd
Version: 0.0.8
Summary: run vite dev server in background
Author-email: Problemli GmbH <info@problem.li>
Project-URL: Homepage, https://github.com/blemli/nrd2
Project-URL: Issues, https://github.com/blemli/nrd2
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: icecream>=2.1.3
Dynamic: license-file

# nrd

Run `npm run dev` in background for all your Laravel Herd sites.

## Installation

```bash
pip install nrd
```

During installation, you'll be prompted to automatically install NRD as a system service. This makes NRD start automatically when your system boots.

**Note:** 
- On Linux, you may need to run: `sudo pip install nrd`
- On Windows, run the command in an Administrator PowerShell/CMD window
- On macOS, no special privileges needed for the prompt

## Usage

Simply run the nrd command to start all Vite dev servers for your secured Herd sites:

```bash
nrd
```

Or run it as a module:

```bash
python -m nrd.nrd
```

## Autostart on System Boot

NRD can be configured to automatically start when your system boots. This ensures your development servers are always running in the background.

### Quick Start

After installing NRD via pip, simply run:

**macOS:**
```bash
nrd-service-install
```

**Linux:**
```bash
sudo nrd-service-install
```

**Windows (Run PowerShell/CMD as Administrator):**
```powershell
nrd-service-install
```

### Uninstall Service

**macOS:**
```bash
nrd-service-uninstall
```

**Linux:**
```bash
sudo nrd-service-uninstall
```

**Windows (Run as Administrator):**
```powershell
nrd-service-uninstall
```

For detailed instructions, troubleshooting, and management commands, see the [Service Installation Guide](service/README.md).

## Features

- Automatically detects all secured Laravel Herd sites
- Runs Vite dev servers in the background
- Cross-platform service support (macOS, Linux, Windows)
- Auto-restart on failure
- Easy installation and management scripts

## Requirements

- Python 3.8 or higher
- Laravel Herd installed and configured
- npm and node.js
- Sites with Vite configured

## How It Works

NRD uses the `herd parked --json` command to discover all your secured Herd sites, then starts `npm run dev` for each site in the background. When configured as a service, it automatically starts on system boot and keeps your dev servers running.
