"Tera system, meri zimmedari" — Your system, my responsibility
MJ FTE is an open-source Windows disk cleaner and system analyzer CLI agent written in Python. It scans your drives to find junk files, temporary files, and dangerous executables, shows a full disk storage breakdown, and safely cleans them — with your approval on every file. Secured with Google OAuth login and protected by hard rules that never touch Windows system files.
- 🔐 Google OAuth Authentication - Secure "Continue with Google" login, no passwords stored
- 🔍 Deep System Scan - Parallel multi-threaded scanning with live progress tracking
- 🗂️ Smart Classification - Detects junk files, dangerous executables, and protected system files
- 🛡️ Windows Protection - Never touches
C:\Windows,Program Files, or any system-critical path - 💾 Storage Analysis - Visual disk usage bar + top folders by size
- 🧹 Safe Cleaning - Dry-run by default, per-file confirmation, Recycle Bin support (recoverable)
- 🎨 Beautiful TUI - Rich terminal interface with tables, progress bars, and colors
Install from PyPI:
pip install mj-fteOr with uv:
uv tool install mj-fte- Python 3.12+
- Windows 10/11
- Google Cloud Console project with OAuth credentials (see setup below)
- Clone and install:
git clone https://github.com/syed-mujtaba-stack/mj-fte.git
cd mj-fte
# Using uv (recommended)
uv sync
# Or using pip
pip install -e .- Configure credentials:
cp .env.example .env
# Edit .env with your credentials-
Get Google OAuth credentials:
- Go to Google Cloud Console
- Create OAuth 2.0 Client ID (Desktop app)
- Add
http://localhost:8080/callbackas authorized redirect URI - Copy Client ID and Secret to
.env
-
Get OpenRouter API key (optional, for AI features):
- Sign up at OpenRouter
- Add key to
.env
mj initIf Google credentials are not configured yet, a one-time setup wizard starts:
- Paste your
GOOGLE_CLIENT_ID - Paste your
GOOGLE_CLIENT_SECRET(hidden input) - Credentials are saved to
%APPDATA%\MJ_FTE\.env— works from any directory afterwards
Then the browser opens for Continue with Google login. Tokens stored securely in Windows Credential Manager.
Manual alternative: create
.envin%APPDATA%\MJ_FTE\(or current directory) withGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET.
# Full C: drive scan (default)
mj analyze
# Custom options
mj analyze --drive D:\ --depth 5 --workers 8 --min-size 10Shows:
- Junk files (temp, cache, logs, build artifacts, etc.)
- Dangerous files (executables, scripts in user folders)
- Protected Windows files (never touched)
- Storage breakdown with visual bar
- Top folders by size
# Dry run (default) - shows what would be deleted
mj clean --junk
# Actually clean junk files
mj clean --junk --no-dry-run
# Clean dangerous files too (be careful!)
mj clean --junk --dangerous --no-dry-run
# Batch confirm (one prompt for all)
mj clean --junk --no-dry-run --batch
# Skip confirmations entirely
mj clean --junk --no-dry-run --no-confirmmj status # Show auth and config status
mj logout # Remove stored credentials
mj auth-test # Test OAuth configuration
mj --help # Show all optionsAll settings in .env or environment variables:
| Variable | Default | Description |
|---|---|---|
GOOGLE_CLIENT_ID |
- | OAuth client ID |
GOOGLE_CLIENT_SECRET |
- | OAuth client secret |
OPENROUTER_API_KEY |
- | OpenRouter API key |
SCAN_ROOT |
C:\ |
Root drive to scan |
MAX_SCAN_DEPTH |
10 |
Max folder depth |
PARALLEL_WORKERS |
4 |
Scan threads |
MIN_FILE_SIZE_MB |
1.0 |
Min file size to report |
C:\Windows,C:\Program Files,C:\Program Files (x86)C:\ProgramData,C:\System Volume Information- User AppData folders for Microsoft, browsers, system apps
- Files with SYSTEM, HIDDEN, READONLY attributes
- Per-file (default) - Confirm each file
- Batch - One confirmation for all
- No-confirm - Auto-delete (use with
--no-dry-run)
All clean operations default to dry-run. Use --no-dry-run to actually delete.
Files are moved to Recycle Bin by default (recoverable). Controlled via USE_RECYCLE_BIN=false in .env.
Set MJ_SKIP_AUTH=1 environment variable to bypass Google auth (development/testing only).
.tmp, .temp, .log, .cache, .bak, .old, .orig, .dmp, .crash, .wer, .etl, .chk, .gid, .fts, .pyc, .pyo, .class
temp, tmp, cache, logs, crashdumps, prefetch, SoftwareDistribution\Download, Windows.old, $Recycle.Bin, node_modules, __pycache__, .venv, dist, build, target, .gradle, .idea, .vscode, .vs, bin, obj, packages, out, publish
.exe, .bat, .cmd, .com, .scr, .pif, .msi, .ps1, .vbs, .vbe, .jse, .wsf, .wsh, .hta, .cpl, .inf, .reg, .msc, .gadget
crack, keygen, loader, inject, rootkit, keylogger, stealer, miner, ransom, trojan, malware, spyware, backdoor, botnet
Note: Archives (
.zip,.rar,.iso), libraries (.dll), and shortcuts (.lnk) are NEVER flagged — too risky to assume they're junk.
mj/
├── __main__.py # Entry point
├── cli/
│ ├── commands.py # Click commands (init, analyze, clean, status)
│ └── ui.py # Rich console UI
├── auth/
│ └── google_oauth.py # Google OAuth flow + token storage
├── analyzer/
│ ├── windows_rules.py # Windows protection rules
│ ├── scanner.py # Parallel filesystem scanner
│ ├── classifier.py # File classification engine
│ └── storage.py # Disk usage analysis
├── cleaner/
│ └── safe_delete.py # Safe deletion with Recycle Bin
├── config/
│ └── settings.py # Pydantic settings management
└── utils/
└── (utilities)
Run mj init first.
Run terminal as Administrator for full C: access.
- Check
.envcredentials - Verify redirect URI in Google Console:
http://localhost:8080/callback - Ensure OAuth consent screen is configured
- Reduce
--depth - Increase
--min-size - Exclude more folders in
settings.py
MIT License - Use at your own risk. Always backup important data.
This tool deletes files. While extensive protections exist, use at your own risk. Always:
- Run
mj analyzefirst - Review the file lists
- Use
--dry-runbefore--no-dry-run - Keep backups of important data
The authors are not responsible for any data loss.