A Windows desktop application for syncing software configuration and save data to OneDrive using symbolic links.
- OneDrive Integration: Automatically detects OneDrive installation and manages sync directory
- Symlink Management: Creates symbolic links, junctions, or hardlinks to sync files seamlessly
- Backup & Restore: Versioned backups with configurable retention policy (up to 10 versions)
- Conflict Detection: Three-layer conflict detection (timestamp, hash, OneDrive status) with resolution UI
- Software Templates: Pre-configured templates for popular software (VS Code, Git, Chrome, etc.)
- Sync Rules: Flexible rules with exclusion patterns for fine-grained control
- Real-time Status: Monitor sync status, health checks, and history for all managed software
- Windows 10/11
- OneDrive desktop app installed and configured
- Flutter SDK 3.0+ (for development)
-
Clone the repository:
git clone https://github.com/your-username/cloudlink.git cd cloudlink -
Install dependencies:
flutter pub get
-
Run the application:
flutter run -d windows
flutter build windows --releaseThe executable will be in build/windows/x64/runner/Release/.
- Click the "+" button on the main screen
- Choose from a template or manually configure:
- Name: Unique identifier for the software
- Display Name: Friendly name shown in the UI
- Config Path: Path to the configuration directory (supports variables like
{APPDATA}) - Sync Mode:
config_onlyorfull
Each software can have multiple sync rules:
- Source Path: Local path to sync (e.g.,
{APPDATA}\Code\User) - Target Path: OneDrive path (auto-generated or custom)
- Link Type:
symbolic,junction, orhardlink - Exclude Patterns: Glob patterns to exclude (e.g.,
*.log,cache/*)
CloudLink supports the following path variables:
| Variable | Description | Example |
|---|---|---|
{APPDATA} |
Roaming AppData | C:\Users\Name\AppData\Roaming |
{LOCALAPPDATA} |
Local AppData | C:\Users\Name\AppData\Local |
{USER_PROFILE} |
User home directory | C:\Users\Name |
{ONEDRIVE} |
OneDrive root | C:\Users\Name\OneDrive |
{PROGRAMFILES} |
Program Files | C:\Program Files |
- Select a software from the list
- Click "Sync" to start synchronization
- The sync process will:
- Create a backup of existing files
- Copy files to OneDrive
- Create a symbolic link from the original location to OneDrive
When conflicts are detected:
- Navigate to Conflict Management from the sidebar
- Review conflicting files with modification times and sizes
- Choose resolution:
- Keep Local: Use local version
- Keep Cloud: Use OneDrive version
- Ignore: Skip this conflict
- Backups are created automatically before each sync
- Access backups via the Backup section
- Restore any previous version with one click
- Configure retention policy in settings (default: 10 versions)
lib/
├── models/ # Data models (Software, SyncRule, Conflict, etc.)
├── services/ # Business logic
│ ├── sync_engine.dart # Core sync orchestration
│ ├── backup_service.dart # Backup management
│ ├── link_manager.dart # Symlink operations
│ ├── onedrive_service.dart # OneDrive detection
│ ├── conflict_detector.dart # Conflict detection
│ └── database_service.dart # SQLite persistence
├── platform/ # Windows-specific APIs
└── ui/ # Flutter UI components
├── screens/ # Main screens
├── dialogs/ # Dialog windows
└── widgets/ # Reusable widgets
# All tests
flutter test
# Unit tests only
flutter test test/unit/
# Integration tests
flutter test test/integration/
# With coverage
flutter test --coveragetest/unit/- Unit tests for services and modelstest/widget/- Widget tests for UI componentstest/integration/- Integration tests for workflowstest/helpers/- Test utilities and mocks
MIT License - see LICENSE for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request