MJ FTE - System Analyst & Cleaner for Windows
"Tera system, meri zimmedari" - Your system, my responsibility
A powerful CLI tool that analyzes your Windows system for junk files, dangerous executables, and storage usage, then safely cleans them with your confirmation.
Features
- ๐ Google OAuth Authentication - Secure, no passwords stored
- ๐ Deep System Scan - Parallel scanning with progress tracking
- ๐๏ธ Smart Classification - Detects junk, dangerous, and protected files
- ๐ก๏ธ Windows Protection - Never touches system files (Windows, Program Files, etc.)
- ๐พ Storage Analysis - Visual breakdown of disk usage
- ๐งน Safe Cleaning - Per-file confirmation, Recycle Bin support, dry-run mode
- ๐จ Beautiful TUI - Rich terminal interface with tables, progress bars, colors
Installation
Prerequisites
- Python 3.12+
- Windows 10/11
- Google Cloud Console project with OAuth credentials
Setup
- Clone and install:
git clone <your-repo>
cd my-personal-assistend
# 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
Usage
First Time Setup
mj init
Opens browser for Google authentication. Tokens stored securely in Windows Credential Manager.
Analyze System
# Full C: drive scan (default)
mj analyze
# Custom options
mj analyze --drive D:\ --depth 5 --workers 8 --min-size 10
Shows:
- 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
Clean Files
# 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-confirm
Other Commands
mj status # Show auth and config status
mj logout # Remove stored credentials
mj auth-test # Test OAuth configuration
mj --help # Show all options
Configuration
All 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 |
Safety Features
Protected Paths (Never Touched)
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
Confirmation Modes
- Per-file (default) - Confirm each file
- Batch - One confirmation for all
- No-confirm - Auto-delete (use with
--no-dry-run)
Dry Run Default
All clean operations default to dry-run. Use --no-dry-run to actually delete.
Recycle Bin
Files are moved to Recycle Bin by default (recoverable). Controlled via USE_RECYCLE_BIN=false in .env.
Dev Mode
Set MJ_SKIP_AUTH=1 environment variable to bypass Google auth (development/testing only).
File Classification
Junk Extensions (conservative - clearly disposable only)
.tmp, .temp, .log, .cache, .bak, .old, .orig, .dmp, .crash, .wer, .etl, .chk, .gid, .fts, .pyc, .pyo, .class
Junk Folders
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
Dangerous Extensions (executable/script formats)
.exe, .bat, .cmd, .com, .scr, .pif, .msi, .ps1, .vbs, .vbe, .jse, .wsf, .wsh, .hta, .cpl, .inf, .reg, .msc, .gadget
Suspicious Names (only checked on dangerous extensions)
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.
Architecture
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)
Troubleshooting
"Not authenticated"
Run mj init first.
"Permission denied" during scan
Run terminal as Administrator for full C: access.
"Google OAuth failed"
- Check
.envcredentials - Verify redirect URI in Google Console:
http://localhost:8080/callback - Ensure OAuth consent screen is configured
Scan takes too long
- Reduce
--depth - Increase
--min-size - Exclude more folders in
settings.py
License
MIT License - Use at your own risk. Always backup important data.
Disclaimer
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mj_fte-0.1.0.tar.gz.
File metadata
- Download URL: mj_fte-0.1.0.tar.gz
- Upload date:
- Size: 69.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955ca23cf7a1d0827c8bf0e1a8142571890d309ccd39ea83633aae8e072bb3c5
|
|
| MD5 |
1ef544386347747f6fa21f1265673858
|
|
| BLAKE2b-256 |
52eba8068f8eda8a9e7f11fd4372d2eb2975dc89d5fa9a17777ef7797e3d21c9
|
File details
Details for the file mj_fte-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mj_fte-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7db5bc5eb17098a087167981fcf01bbc98b1ca8b731f72d8873aec0283a18eb7
|
|
| MD5 |
404b4b77a1769e3ab2a79b3d3ae665aa
|
|
| BLAKE2b-256 |
7a189db3aa4c5ac6e30e4f20c3b0181f34fa2510e1b9494f19cce6eae28f8a2e
|