A comprehensive cross-platform file automation and system monitoring toolkit for macOS, Linux, and Windows.
The File Automation Suite is a collection of Python tools designed to automate file management, system monitoring, and productivity tasks. It provides both GUI and CLI interfaces for various automation workflows.
- System Monitoring: Track CPU, disk, and memory usage with configurable alerts
- File Organization: Find and organize files by size, type, or custom criteria
- macOS Integration: AppleScript-based automation for Reminders, Calendar, and Time Machine
- Master Control App: Tkinter-based GUI for centralized automation management
- Cross-Platform: Core utilities work on macOS, Linux, and Windows
# Clone the repository
git clone https://github.com/yourusername/03-File_Automation.git
cd 03-File_Automation
# Create virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtSystem Monitor
python src/system_monitor.pyFile Organizer
# Find 10 largest files in Documents
python src/file_organizer.py ~/Documents 10
# Find largest PDF files
python src/file_organizer.py ~/Documents 20 .pdfmacOS Automation (macOS only)
python mac_automation.pyMaster Control App (GUI)
python copilot_master_app.py03-File_Automation/
âââ src/ # Core source code
â âââ system_monitor.py # System resource monitoring
â âââ file_organizer.py # File organization utilities
â âââ __init__.py
âââ tests/ # Unit tests
â âââ test_system_monitor.py
â âââ test_file_organizer.py
âââ docs/ # Documentation
âââ assets/ # Icons, images, resources
âââ mac_automation.py # macOS-specific automation (AppleScript)
âââ copilot_master_app.py # Master control GUI application
âââ time_machine_monitor.py # Time Machine backup monitoring
âââ requirements.txt # Python dependencies
âââ .gitignore # Git ignore patterns
âââ LICENSE # MIT License
âââ README.md # This file
âââ CHANGELOG.md # Version history
Monitor system resources and get alerts when thresholds are exceeded.
Features:
- CPU usage monitoring
- Disk space checking
- Memory usage tracking
- Configurable thresholds
- Detailed status reports
Example:
from src.system_monitor import SystemMonitor
monitor = SystemMonitor(disk_threshold=20, cpu_threshold=75)
if not monitor.is_system_healthy():
status = monitor.get_detailed_status()
print(f"WARNING: CPU at {status['cpu_percent']:.1f}%")Find and organize files efficiently with real-time progress tracking.
Features:
- Find largest files using heap queue algorithm
- Filter by file extension
- Real-time progress reporting
- Directory statistics
- Human-readable size formatting
Example:
from src.file_organizer import FileOrganizer
organizer = FileOrganizer()
largest = organizer.find_largest_files("/path/to/scan", top_n=20)
for size, path in largest:
print(f"{organizer.format_size(size)} - {path}")macOS Only - AppleScript-based automation for native macOS apps.
Features:
- Create Reminders with due dates
- Schedule Calendar events
- Create workout schedules
- Fitness tracking reminders
- Goal deadline management
Example:
from mac_automation import MacAutomation
automation = MacAutomation()
# Create a reminder
automation.create_reminder(
title="Review project",
list_name="Work",
due_date="2025-10-20 14:00",
notes="Check progress and update timeline"
)
# Create calendar event
automation.create_calendar_event(
title="Team Meeting",
start_date="2025-10-21 10:00",
end_date="2025-10-21 11:00",
location="Zoom"
)macOS Only - Monitor Time Machine backups and receive alerts.
Features:
- Check last backup date
- Menu bar notifications
- Configurable alert thresholds
- Auto-start via LaunchAgent
- Integration with menu bar app
Usage:
python time_machine_monitor.pyTkinter-based GUI for centralized automation control.
Features:
- Quick action buttons for common tasks
- Script management interface
- VS Code integration
- Code generation prompts
- Real-time status monitoring
- Background script execution
Usage:
python copilot_master_app.pyScreenshots:
- Quick Actions tab for one-click automation
- Code Generation with Copilot integration
- Script management and execution
- VS Code workspace integration
Create a .env file for custom configuration:
# System Monitor Thresholds
DISK_THRESHOLD=20 # Minimum free disk space %
CPU_THRESHOLD=75 # Maximum CPU usage %
# File Organizer
DEFAULT_SCAN_PATH=/Users/daniel/Documents
DEFAULT_TOP_N=10
# macOS Automation
COPILOT_WORKSPACE=/Users/daniel/copilot
VSCODE_PATH=/Applications/Visual Studio Code.appmacOS:
- AppleScript automation requires Accessibility permissions
- Time Machine monitoring requires Full Disk Access
- Menu bar apps use
rumpslibrary
Linux:
- Some GUI features may require additional dependencies
- AppleScript features unavailable
Windows:
- Paths use backslashes (
\) - Some macOS-specific features unavailable
- Requires Python 3.8+ with tkinter
- Python 3.8+
- psutil >= 5.9.0 (system monitoring)
- tkinter (built-in with Python)
- watchdog >= 3.0.0 (file system monitoring)
- rumps >= 0.4.0 (macOS menu bar apps)
- pytest >= 7.4.0
- pytest-cov >= 4.1.0
- black >= 23.0.0 (code formatting)
- flake8 >= 6.0.0 (linting)
- mypy >= 1.0.0 (type checking)
Install all dependencies:
pip install -r requirements.txt# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/test_system_monitor.py# Format code with Black
black src/ tests/
# Lint with flake8
flake8 src/ tests/
# Type check with mypy
mypy src/- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
pytest) - Format code (
black .) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
The project includes comprehensive unit tests for core functionality:
tests/test_system_monitor.py- System monitoring teststests/test_file_organizer.py- File organization tests
Run tests with:
pytest -v- Time Machine Monitor: Requires Full Disk Access on macOS Catalina+
- Menu Bar Apps:
rumpsinstallation may fail on some Python versions - AppleScript Permissions: First run requires manual permission grants
- Virtual Environment: Ensure correct Python version in virtual environment
See CHANGELOG.md for version-specific issues.
- File system watcher for real-time monitoring
- Cloud backup integration
- Email notifications for alerts
- Web dashboard interface
- Android support via Termux
- iOS Shortcuts integration
- Automated photo organization
- Duplicate file detection
- Complete cross-platform GUI
- Plugin system for extensions
- REST API for remote control
- Mobile companion apps
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Daniel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files...
- Built with Python and cross-platform libraries
- Inspired by Hazel (macOS) and File Juggler (Windows)
- Uses
psutilfor system monitoring - GUI built with tkinter for maximum compatibility
Report bugs or request features:
See CHANGELOG.md for version history.
Daniel
- GitHub: @yourusername
Current Version: 1.0.0 Status: Active Development Last Updated: October 2025
Made with Python đ Compatible with macOS, Linux, and Windows đ»
- Personal tinkering: Free to download, study, and modify for your own hobby, learning, or research projects as long as you keep the required credit.
- Attribution: Always display âBuilt with BatesAI software by Daniel Bates (https://batesai.org)â anywhere the app, docs, marketing pages, or listings mention the product.
- Organizations & monetization: Any company, client, employer, school, nonprofit, or government team must either obtain a BatesAI commercial license (daniel@batesai.org) or remit a 10% share of gross receiptsâincluding one-time purchases, subscriptions (monthly, annual, seat-based, usage-based), service retainers, and bundled salesâthat rely on this software.
- Reporting: Revenue-share users must send monthly revenue summaries plus payment within 15 days of month-end or the license automatically pauses.
Read the full âBatesAI Personal & Revenue Share License v1.1â in LICENSE for legal terms, including no sublicensing and California governing law.