Metadata-Version: 2.4
Name: wifipause-llm
Version: 0.1.0
Summary: A CLI and Python library to safely orchestrate network switches on macOS by pausing active tasks, auditing connectivity, and verifying stable reconnects.
Author-email: Vector <vector@llmtech.net>
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: psutil>=5.9.0
Requires-Dist: rich>=12.0.0
Description-Content-Type: text/markdown

# wifipause-llm ⚡

`wifipause-llm` is a lightweight macOS tool and library designed to audit running processes for potential network dependency and safely orchestrate network cutovers (switching WiFi SSIDs, migrating networks) without interrupting or corrupting active local server states or agent executions.

---

## Features

- 🕵️ **Active Task Auditing**: Scans active macOS processes to identify running compiler tasks, package downloads (`npm`, `pip`, `git`, `cargo`, `docker`), and HTTP clients (`curl`, `wget`) that may break if the network cutover begins.
- 📶 **WiFi SSID Inspection**: Direct hook into the macOS Apple80211/networksetup API to safely check your currently associated wireless SSID and Wi-Fi interface.
- ⚡ **Connectivity Testing**: High-efficiency connection-probing utilizing basic TCP sockets to verify active gateway routing without heavy HTTP overhead.
- 🔄 **Monitored Cutover Loop**: A non-blocking generator and CLI live panel spinner that monitors state transition: **Connected ➔ Disconnected ➔ Reconnecting ➔ Target Network Verified**.

---

## Installation

Install directly using `pip` or your favorite package manager:

```bash
pip install wifipause-llm
```

Or run directly using `uv` (recommended):

```bash
uv run wifipause check
uv run wifipause wait --target "YourNewSSID"
```

---

## CLI Usage

### 1. Check Network and Audit Tasks
Analyze active connections and identify potentially network-sensitive tasks running in the background:

```bash
wifipause check
```

### 2. Wait for Network Cutover
Instruct the runner to pause and block execution, waiting for you to complete your WiFi switch:

```bash
wifipause wait
```

To block specifically until you join a specific SSID network:

```bash
wifipause wait --target "OfficeWiFi" --timeout 180
```

---

## Library Usage (Python API)

You can also integrate `wifipause` directly into your custom automation scripts:

```python
from wifipause.core import get_wifi_ssid, ping_host, audit_network_processes

# Check SSID and internet
ssid = get_wifi_ssid()
online = ping_host()
print(f"Connected to {ssid}: Online={online}")

# Audit network tasks
sensitive_procs = audit_network_processes()
for proc in sensitive_procs:
    print(f"PID {proc['pid']} ({proc['name']}) matches signature: {proc['matched']}")
```

---

## License

MIT License. Developed by Vector.
