# MemoryForge Ultimate CLI Reference

The dashboard, CLI, and service are modes of the same `MemoryForge Ultimate.exe`. CLI mode never creates a notification-area icon.

## Syntax

```powershell
& '.\MemoryForge Ultimate.exe' --cli <command> [options]
```

## Complete command map

| Dashboard capability | CLI command |
|---|---|
| Refresh system telemetry | `status` |
| Test NVIDIA sensors | `sensors` |
| Refresh/search processes | `processes [--filter TEXT] [--top N]` |
| Original full working-set sweep | `clean-ram` |
| Original working-set + system-cache + standby-list clean | `clean-ram-cache [--elevate]` |
| Auto Optimize | `auto-optimize` |
| Run All 24 | `run-all-24` |
| Graceful End Task | `end-process --pid N` |
| Force Kill | `force-kill --pid N --yes` |
| Kill Tree | `kill-tree --pid N --yes` |
| Set Priority | `set-priority --pid N --priority High` |
| Activate Game Mode | `game-mode-on [--pid N] [--clean-first]` |
| Restore Game Mode | `game-mode-off` |
| Automatic threshold cleaner | `monitor [monitor options]` |
| Performance OSD test | `osd-test` |
| Cleaning progress OSD test | `cleaning-osd-test` |
| Resource Pet test | `pet-test [--character PixelRobot|Nova|Skye|Atlas|Teddy|CyberFox] [--seconds 5]` |
| Full-screen display test | `display-test` |
| Install automatic service | `install-service [monitor options]` |
| Start/stop/query/remove service | `start-service`, `stop-service`, `service-status`, `uninstall-service` |
| Clear service activity log | `clear-service-log` |

Visual tests deliberately create only the requested temporary visual; they still do not start the dashboard or tray icon.

## Monitor/service options

- `--threshold 82`: trigger threshold, 50–99%
- `--interval 5`: sensor sample interval in seconds
- `--trigger-seconds 15`: RAM must remain above threshold for this duration
- `--cooldown 300`: minimum time between automatic cleans
- `--cache`: include privileged Windows standby-cache purge
- `--duration SECONDS`: stop CLI monitoring after a fixed duration
- `--once`: take one monitoring sample and exit

## Output options

- Default: one compact line for each meaningful result
- `--verbose`: stage-by-stage or sample-by-sample terminal feedback
- `--json`: one-line machine-readable JSON
- `--quiet`: suppress console feedback
- `--output PATH`: also write feedback to a file
- `--dry-run`: validate and describe without changing the system
- `--elevate`: request Administrator approval for the original system-cache and standby-list engine
- `--show-osd`: show cleaning progress for a CLI clean
- `--show-results`: keep the cleaning result visible briefly in that OSD

## Exit codes

- `0`: success
- `1`: failure or partial result
- `2`: invalid or unsafe arguments
- `130`: monitoring cancelled

## Unattended examples

```powershell
# Minimal feedback
& '.\MemoryForge Ultimate.exe' --cli clean-ram

# Detailed terminal feedback
& '.\MemoryForge Ultimate.exe' --cli run-all-24 --verbose

# Machine monitoring
& '.\MemoryForge Ultimate.exe' --cli status --json

# Scheduled threshold cleaning for 8 hours
& '.\MemoryForge Ultimate.exe' --cli monitor --threshold 85 --duration 28800 --quiet --output 'C:\Logs\memoryforge.log'

# Validate service registration without installing
& '.\MemoryForge Ultimate.exe' --cli install-service --threshold 82 --cache --dry-run
```

Keep the executable at a permanent path before installing the service because Windows records that exact path.