Metadata-Version: 2.4
Name: astop
Version: 0.1.1
Summary: Terminal-based Apple Silicon system monitor
License-Expression: MIT
Keywords: apple-silicon,system-monitor,terminal,tui
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Operating System :: MacOS
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Requires-Dist: psutil>=5.9.0
Requires-Dist: textual>=1.0.0
Description-Content-Type: text/markdown

astop
  
    Terminal-based system monitor for Apple Silicon Macs
    
    Like btop, but built for M-series chips.

---

## Why astop?

Existing Apple Silicon monitors (asitop, macmon, mxtop) **hardcode chip names and cluster layouts**, causing crashes on newer chips. astop discovers your SoC topology at runtime via `sysctl` — no hardcoded chip tables, no breakage on M4/M5/future chips.

| Feature | astop | asitop | mxtop |
|---|---|---|---|
| Works on all M-series | Yes | Partial | No |
| Dynamic SoC discovery | Yes | No | No |
| GPU/ANE monitoring | Yes | Yes | Yes |
| Per-core CPU bars | Yes | No | No |
| Braille waveform graphs | Yes | No | No |
| No sudo required | Yes (degraded) | No | No |

## Install

```bash
pip install astop
```

Requires Python 3.11+ and macOS (Apple Silicon).

## Usage

```bash
astop              # basic mode — CPU, memory, disk, network, processes
sudo astop         # enhanced mode — adds GPU, ANE, power, thermals
astop --no-sudo    # force basic mode even with sudo available
astop --refresh 2  # custom refresh interval (default: 1s)
```

### Panels

| Panel | Basic Mode | Sudo Mode |
|---|---|---|
| **CPU** — per-core bars + braille graph | Yes | Yes |
| **GPU** — utilization, frequency, power | — | Yes |
| **ANE** — Neural Engine utilization | — | Yes |
| **Memory** — usage, active, wired, compressed | Yes | Yes |
| **Network / Disk** — I/O rates + graph | Yes | Yes |
| **Battery** — charge, watts, time remaining | Yes | Yes + power breakdown |
| **Processes** — sortable top-N table | Yes | Yes |

## Keybindings

| Key | Action |
|---|---|
| `q` | Quit |
| `p` | Pause / Resume |
| `r` | Force refresh |
| `s` | Cycle process sort (CPU / Mem / PID / Name) |
| `v` | Reverse sort order |

## How it works

astop uses `hw.nperflevels` and `hw.perflevel{i}.*` sysctl keys to dynamically discover CPU cluster topology at startup — no chip name lookup tables. GPU, ANE, and power data come from `powermetrics` (requires sudo). Everything else uses `psutil`.

Data collection runs in parallel via `asyncio` + thread executors, so the TUI never blocks.

## License

MIT
