A sophisticated, intelligent storage management daemon that automatically organizes files, manages backups, and optimizes disk space across local storage and Google Drive.
- Real-time file monitoring with automatic categorization
- Smart duplicate detection and resolution
- Automatic cleanup when disk space is low
- Intelligent file organization by content type and date
- Seamless backup to Google Shared Drives
- Automatic sync with customizable schedules
- Smart categorization routing files to appropriate drives
- Multi-account support
- Real-time web dashboard with system metrics
- RESTful API for programmatic control
- Comprehensive logging and activity tracking
- Health monitoring with automated alerts
- Secure file handling with integrity checks
- Backup verification before deletion
- Configurable retention policies
- Process supervision and auto-restart
npm install -g storage-management-daemon
storage-daemon-installgit clone https://github.com/username/storage-management-daemon.git
cd storage-management-daemon
./install.sh# Start the daemon
storage-daemon start
# Interactive configuration
storage-daemon configure
# Check status
storage-daemon status
# Open web dashboard
storage-daemon dashboard
# View logs
storage-daemon logsAccess the dashboard at: http://localhost:3456
The daemon automatically organizes files into a structured hierarchy:
~/organized/
βββ Legal/ # Court docs, contracts, legal files
βββ Business/ # Corporate documents, invoices
βββ Development/ # Code, projects, repositories
βββ Documents/ # General documents
βββ Media/ # Images, videos, audio
βββ Financial/ # Receipts, taxes, statements
βββ Personal/ # Personal documents
βββ Archives/ # Old files by date
# Launch interactive configuration wizard
storage-daemon configureFeatures:
- π― Guided setup with clear menus
- β Input validation and smart defaults
- π§ Section-by-section configuration
- πΎ Safe save/cancel options
storage-daemon config{
"autoOrganize": {
"enabled": true,
"moveAfterDays": 7,
"archiveAfterDays": 30
},
"backup": {
"critical": [
"~/Documents",
"~/Business"
],
"schedule": {
"critical": "*/15 * * * *", // Every 15 minutes
"regular": "0 * * * *" // Every hour
}
},
"googleDrive": {
"enabled": true,
"mapping": {
"legal": "Arias V Bianchi",
"business": "ARIBIA LLC",
"development": "MAIN"
}
}
}| Method | Endpoint | Description |
|---|---|---|
| GET | /api/status |
Daemon status |
| GET | /api/stats |
System statistics |
| POST | /api/control/sync |
Trigger sync |
| POST | /api/control/cleanup |
Run cleanup |
| GET | /api/config |
Get configuration |
| POST | /api/config |
Update configuration |
| POST | /api/organize |
Run organize pass |
| GET | /api/actions |
Recent organize actions |
| POST | /api/backup |
Run critical backup |
// Get daemon status
const response = await fetch('http://localhost:3456/api/status');
const status = await response.json();
// Trigger manual sync
await fetch('http://localhost:3456/api/control/sync', {
method: 'POST'
});
// Organize now (dry-run)
await fetch('http://localhost:3456/api/organize', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ dryRun: true })
})
// Backup critical folders (dry-run)
await fetch('http://localhost:3456/api/backup', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ dryRun: true })
})Deploy to multiple machines easily:
# Deploy to remote Mac
./deploy-remote.sh 192.168.1.100 username
# Or use the npm package
npm install -g storage-management-daemon
ssh user@remote-host "storage-daemon-install"- Node.js 14+
- macOS (primary), Linux (experimental), Windows (planned)
git clone https://github.com/username/storage-management-daemon.git
cd storage-management-daemon
npm install
npm run devnpm test
npm run test:integration
npm run test:e2e- Real-time system resources (CPU, Memory, Disk)
- File processing statistics
- Google Drive sync status
- Live activity logs
- Manual control buttons
- Low disk space warnings
- Sync failures
- Large duplicate discoveries
- System health issues
- macOS notifications are enabled by default.
- Slack (optional): set
SLACK_WEBHOOK_URLornotifications.slack.webhookUrl. - ChatGPT (optional via OpenAI Assistants API):
- Set env vars:
OPENAI_API_KEYandOPENAI_ASSISTANT_ID. - Optional:
OPENAI_THREAD_ID(if omitted, a new thread id is created and saved todata/chatgpt-thread.txt). - Alerts are posted as messages to the thread and a run is triggered.
- Note: these messages appear in the OpenAI Assistants API thread; they do not show in standard ChatGPT chats.
- Set env vars:
- Create a Notion integration and copy the token.
- Share a parent page with the integration and copy that parent pageβs ID.
- Export env vars:
export NOTION_API_KEY=...export NOTION_PARENT_PAGE_ID=...
- Run setup:
./manage.sh notion-setup
- This creates:
- A database for Alerts
- A database for Actions
- A "Storage Daemon Dashboard" page linking both
- To have alerts, actions, and status snapshots flow into Notion, set (either env or in config):
- Alerts DB:
NOTION_ALERTS_DB_IDornotifications.notion.alertsDatabaseId - Actions DB:
NOTION_ACTIONS_DB_IDornotifications.notion.actionsDatabaseId - Status DB:
NOTION_STATUS_DB_IDornotifications.notion.statusDatabaseId - Optional: a Status page id (for appending text snapshots):
NOTION_STATUS_PAGE_ID
- Alerts DB:
- Daemon writes periodic status snapshots (CPU, memory, disk, files processed, errors, sync operations):
- Local log:
data/snapshots.log - Notion: inserted into the Status database if configured
- Local log:
- Schedule:
monitoring.statusSchedule(cron, default0 9 * * *daily) - Enable/disable:
monitoring.enabled
- β No external data collection
- β Local-only processing
- β Secure Google Drive API usage
- β File integrity verification
- β Configurable access controls
- β Audit logging
{
"security": {
"enableAuditLog": true,
"restrictedPaths": ["/System", "/private"],
"maxFileSize": "1GB",
"allowedExtensions": [".pdf", ".doc", ".jpg"]
}
}- Native launchd integration
- File system event monitoring
- Keychain integration for credentials
- Spotlight indexing support
- systemd service integration
- inotify file watching
- Native package management
- Windows Service integration
- File system change notifications
- MSI installer package
- Memory: ~50-100MB typical
- CPU: <5% average usage
- Disk I/O: Throttled during active use
- Network: Minimal (sync windows only)
- Configure ignore patterns for large directories
- Adjust sync frequency for non-critical files
- Use SSD for organized directory structure
- Enable cleanup scheduling
We welcome contributions! Please see our Contributing Guide.
- Windows support
- Linux systemd integration
- Additional cloud providers
- Mobile companion app
- Advanced ML categorization
- Plugin system
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation: Full Documentation
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: support@storage-daemon.com
- Built with Node.js and modern web technologies
- Inspired by the need for intelligent file management
- Special thanks to all contributors and testers
Made with β€οΈ for better file management