# @artale/pi-sysmon

System monitor & resource manager for pi. Carmack-style: measure everything, cut the waste.

## Install
```bash
npm install -g @artale/pi-sysmon
```

## Features
- **Dashboard** — RAM, disk, top processes, warnings in one view
- **Hog detection** — flag anything using >200 MB
- **Process kill** — kill by name via PowerShell (`Stop-Process`)
- **Node audit** — show all node processes with command lines
- **Chrome audit** — tab-level memory breakdown
- **Disk cleanup** — npm cache, pnpm store, temp files >7 days
- **History** — resource snapshots over time (JSONL at `~/.pi/sysmon/`)

## Tools (for AI agent use)
- **sysmon_status** — structured system health JSON
- **sysmon_top** — top N processes by memory
- **sysmon_kill** — kill process by name, returns MB freed
- **sysmon_clean** — run all disk cleanups

## Commands
```
/sysmon              dashboard
/sysmon top          top processes by memory
/sysmon hogs         memory hogs (>200MB)
/sysmon kill <name>  kill by name
/sysmon clean        disk cleanup
/sysmon node         node process audit
/sysmon chrome       chrome breakdown
/sysmon disk         disk usage by directory
/sysmon history      resource snapshots
```

## Philosophy
> "Never guess where the bottleneck is. Measure." — John Carmack

Windows-native via PowerShell. No dependencies beyond Node.js.
