Skip to content

About

For MacOS where limited primary drive space but accessory SSD exists

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🧠 SmartMover (AI-Enhanced)

The intelligent storage manager for macOS Developers & AI Engineers.

SmartMover identifies massive folders—LLM models, Conda environments, Docker containers, and IDE caches—and safely relocates them to an external SSD. It seamlessly integrates them back into your system using Symbolic Links or Environment Variables, freeing up gigabytes of internal space without breaking your workflow.

🚀 Why SmartMover?

Moving system folders is risky. SmartMover mitigates that risk with a multi-tier defense system:

  • 🛡️ Risk Assessment Engine: Uses hardcoded heuristics + a Local LLM (MLX) to analyze unknown folders. It flags CRITICAL items (like Google Drive) that break if moved.
  • 🔒 Active Lock Protection: Checks if an app (e.g., VS Code, Windsurf) is currently using the folder before moving it, preventing data corruption.
  • 🧟 Zombie Repair: Automatically detects and repairs failed moves (where files exist on both drives), ensuring no data is lost.
  • 🤖 Zsh Automation: Automatically updates ~/.zshrc with the correct exports (HF_HOME, UV_CACHE_DIR) and backs up your config before touching it.
  • ⚡ Deadlock Prevention: Optimized to run file system scans and AI inference simultaneously without process forking errors.

📸 Dashboard & Interface

1. The System Dashboard

On startup, SmartMover provides a health check of your current links and environment variables.

─────────────────────── 🛡️  MOCK MODE ───────────────────────
               📊 Current System Status                        
 Item           Type      Status          Location             
───────────────────────────────────────────────────────────────
 huggingface    ENV       ✅ Active       /Volumes/WS4TB/Data/huggingface  
 .ollama        SYMLINK   ✅ Active       /Volumes/WS4TB/Data/.ollama      
 .lmstudio      SYMLINK   ✅ Active       /Volumes/WS4TB/Data/.lmstudio    
 HF_HOME        ENV VAR   ✅ Configured   .zshrc                           

2. Risk-Aware Scanning

It scans your caches and developer folders, assigning a Risk Level to each candidate.

                    Found 8 Candidates                        
┏━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name       ┃   Size ┃    Risk    ┃ Assessment               ┃
┡━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ .npm       │  21.1G │  PERF HIT  │ Tiny files (Slow I/O)    │
│ Google     │  14.0G │  CRITICAL  │ Contains Cloud Sync      │
│ miniforge3 │  12.8G │    SAFE    │ AI: Isolated environment │
│ Windsurf   │   1.6G │    SAFE    │ Editor Cache             │
└────────────┴────────┴────────────┴──────────────────────────┘

3. Interactive Safety Mode

When executing, it prompts for confirmation and warns you about dangerous moves.

⚠️  WARNING: Google contains DriveFS/Cloud Sync.
    Are you absolutely sure you want to move Google? [y/n]: n
    Skipped Google.

🛑 STOP: Windsurf is using files in this folder!
   Please Quit Windsurf (Cmd+Q) and try again.

🛠️ Installation

Prerequisites

  • macOS (Apple Silicon recommended for AI features)
  • Python 3.8+
  • External SSD

Setup

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/SmartMover.git
    cd SmartMover
  2. Install dependencies:

    pip install rich
    # Optional: Install MLX for Local AI Risk Assessment
    pip install mlx-lm huggingface_hub
  3. Make executable:

    chmod +x smartmover.py

📖 Usage

1. Dry Run (Mock Mode)

Run without arguments to scan your system. No files are touched.

./smartmover.py

2. Execute Moves

Enter interactive mode to move files. You will be prompted y/n for every candidate.

./smartmover.py --execute

3. Enable AI Intelligence

Use a local LLM (Qwen2.5-1.5B) to analyze "Unknown" folders and determine if they are safe to move.

./smartmover.py --ai

(Note: First run will download the ~1GB model).

4. Reset Configuration

Changed your external drive? Run the wizard again:

./smartmover.py --reset

⚙️ Supported Tools

SmartMover has built-in detection logic for:

  • AI: HuggingFace, Ollama, LMStudio, PyTorch
  • Python: Conda (Anaconda/Miniconda/Miniforge), UV, Pip, Poetry
  • Containers: Docker, OrbStack, Colima, Podman
  • Dev: Xcode (DerivedData, Simulators), Android Studio, Gradle, NPM, Yarn
  • IDEs: VS Code, Windsurf, Cursor

⚠️ Safety Disclaimer

  • Critical Folders: The tool attempts to flag Google Drive, Dropbox, and System folders as CRITICAL. Do not move these. Symlinking cloud sync roots often causes sync errors or data duplication.
  • Performance: Moving Browser caches (Chrome/Firefox) or node_modules to an external drive may result in UI lag due to high random I/O.
  • Backups: While this tool includes safety checks, always ensure you have a Time Machine backup before modifying system files.

📄 License

MIT License. Use at your own risk.

About

For MacOS where limited primary drive space but accessory SSD exists

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages