A Windows memory inspector with a Severance MDR-inspired terminal UI. Lists every process clogging your RAM, then asks Claude which ones are safe to kill without disrupting your workflow.
▛▀▀▀▜ LUMON INDUSTRIES ◇ MACRODATA REFINEMENT FILE: BLACKBEAR / XDABI
▌ L ▐ STATUS COMPLETE RAM 26.5 / 31.7 GB ████████████░░░ 83.6% 23:15:08
▙▄▄▄▟ ───────────────────────────────────────────────────────────────────────────
- Scans every running process and aggregates by name (USS-based, so numbers reflect what would actually be freed on kill).
- Hands a compact JSON snapshot of the top-N memory consumers to the local
claudeCLI, which classifies each as SAFE, RISKY, or CRITICAL plus returns a short action plan and estimated MB recoverable. - Lays everything out as five bins that always sum to your machine's total RAM — so the view is honest about where the memory has actually gone.
- Python 3.11+
pip install psutil textual- The Claude CLI on
PATH(or setCLAUDE_BIN). The refinement step callsclaude -p <prompt>in text mode.
python ram_scanner.py # interactive TUI (default)
python ram_scanner.py --cli # plain CLI mode (no TUI)
python ram_scanner.py --ai-top 15 # send fewer procs to Claude (fewer tokens)
python ram_scanner.py --no-claude # CLI table only, no Claude callFlags:
| flag | default | meaning |
|---|---|---|
--top N |
0 |
TUI table cap (0 = show every process) |
--min-mb N |
0 |
Hide processes smaller than N MB |
--ai-top N |
25 |
How many top-mem procs to send to Claude — controls token spend |
--model ID |
— | Pass --model through to claude |
--cli |
off | Use the plain CLI (scriptable / pipe-friendly) |
--no-claude |
off | CLI only: skip Claude analysis |
--raw |
off | CLI only: print Claude's raw stdout |
R REFINE submit the queue to Claude for classification
K KILL terminate the highlighted process (after confirm)
X KILL ALL SAFE terminate every FROLIC-classified process at once
S SORT cycle: memory ▸ name ▸ pid-count
F FILTER cycle: all ▸ safe ▸ risky ▸ critical ▸ unrefined
P PLAN show Claude's recommended action plan
Ctrl+R RESCAN refresh process snapshot
↑↓ NAV move the cursor
? HELP handbook
Q / Esc QUIT
| code | name | meaning |
|---|---|---|
SY |
System | kernel + cached + shared overhead + unrefined processes |
WO |
Woe | processes Claude flagged DO_NOT_KILL |
DR |
Dread | processes Claude flagged RISKY |
FC |
Frolic | processes Claude flagged SAFE_TO_KILL |
FR |
Free | available memory |
Each bin renders its share in GB plus a progress bar; the row total
matches psutil.virtual_memory().total to within rounding.
The Claude prompt uses single-char verdicts (S / R / N), one-letter
JSON keys, no cmdlines or pid lists, and minified payload. At --ai-top 25
the input prompt is roughly 330 tokens — about a 60–70% reduction vs a
naive verbose prompt. Bigger process lists don't blow up your token bill;
only the top-N are submitted.
ram_scanner.py # entry point (TUI default, --cli for plain mode)
mdr_core.py # process scanning + USS math + Claude prompt/parse
mdr_tui.py # Severance MDR-styled Textual interface
kill -9semantics: we callpsutil.Process.terminate()(graceful on Windows). System-protected processes will fail with AccessDenied — that's expected. The session-freed counter only counts processes that actually exited.- The five-bin sum is an honest accounting using USS (unique set size) for
classified processes; unrefined processes are absorbed into
SYso the total never lies. - Bin names (Woe / Frolic / Dread / Malice) are an homage to Severance's
four tempers; here only Woe / Dread / Frolic are used, with
SYandFRacting as system-state book-ends.