A modern desktop application for seamless two-way file synchronization between Windows and WSL (Windows Subsystem for Linux) environments.
- Two-way synchronization between Windows and WSL file systems
- Real-time progress tracking with detailed file-by-file updates
- Path validation for both Windows and WSL formats
- Automatic path conversion between Windows and WSL formats
- Conflict resolution with multiple resolution strategies
- Dry run mode to preview changes before syncing
- Multi-threaded processing using worker threads for optimal performance
- Streaming for large files with progress reporting
- Intelligent file batching for efficient small file handling
- Retry mechanism with exponential backoff for transient failures
- Operation queue to prevent UI freezing during large syncs
- File verification using SHA-256 hashing (optional)
- Modern Web 3.0 design with glassmorphism effects
- Dark mode support with smooth theme transitions
- Interactive folder tree with file type icons
- Real-time validation with inline error messages
- Progress visualization with detailed statistics
- Responsive layout that works on various screen sizes
- Node.js 18 or higher
- npm or yarn
- Windows 10/11 with WSL2 installed
- Git (for cloning the repository)
- Clone the repository:
git clone https://github.com/yourusername/wsl-sync.git
cd wsl-sync- Install dependencies:
npm install- Run in development mode:
npm run dev- Build for production:
npm run build- Launch the application
- Enter or browse to your Windows folder path
- Enter your WSL folder path (e.g.,
/home/user/project) - Click "Sync Both Ways" to start synchronization
- Dry Run: Preview changes without applying them
- Verify Files: Enable SHA-256 verification for file integrity
- Max Workers: Adjust the number of worker threads (default: 4)
- Windows:
C:\Users\YourName\Documents\projectorD:\projects\myapp - WSL:
/home/username/projector/mnt/c/Users/YourName/Documents
The application supports .syncignore files for excluding files/folders from sync:
# .syncignore example
node_modules/
*.tmp
.git/
build/
dist/
*.log
- Frontend: React 19.1.0 with Vite
- Desktop Framework: Electron 36.4.0
- Styling: Tailwind CSS with custom theme system
- File Operations: Node.js fs-extra with worker threads
- State Management: React hooks and event emitters
sync/sync.js- Core synchronization logic with path validationsync/sync-performance.js- Performance-optimized sync with worker threadssync/file-worker.cjs- Worker thread for parallel file operationselectron/main.cjs- Main Electron process with IPC handlerssrc/App.jsx- React UI with modern designsrc/components/FolderTree.jsx- Interactive folder browser
# Development
npm run dev # Start dev server with hot reload
# Testing
npm test # Run all tests
npm run test:ui # Run UI tests with Vitest
npm run test:watch # Run tests in watch mode
# Building
npm run build # Build for production
npm run clean # Clean build artifactswsl-sync/
├── electron/ # Electron main process
├── src/ # React application
│ ├── components/ # React components
│ └── styles/ # CSS and theme files
├── sync/ # Core sync logic
├── tests/ # Test suites
├── dist/ # Build output
└── assets/ # Application assets
The project includes comprehensive test coverage:
- Unit tests for sync logic
- Integration tests for IPC communication
- Performance tests for worker threads
- UI tests for React components
Run tests with:
npm test- Worker threads for parallel processing
- Streaming for files over 10MB
- Batch processing for small files
- Operation queuing to prevent overload
- Efficient memory usage with streaming
- Small files (< 1MB): Up to 100 files/second
- Large files (> 10MB): 15-20 MB/s throughput
- Worker threads: 2-4x performance improvement for many files
-
"WSL path does not exist" error
- Ensure WSL is running:
wsl --list --running - Check path accessibility:
wsl ls /your/path
- Ensure WSL is running:
-
"Permission denied" errors
- Run the app as administrator if needed
- Check file permissions in both Windows and WSL
-
Sync seems slow
- Increase worker threads in settings
- Check for antivirus interference
- Ensure no other heavy I/O operations
Set the DEBUG environment variable for verbose logging:
DEBUG=wsl-sync:* npm run devContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -am 'Add your feature' - Push to branch:
git push origin feature/your-feature - Submit a pull request
- Use ESLint for JavaScript linting
- Follow React best practices
- Write tests for new features
- Update documentation as needed
- Paths are validated to prevent directory traversal
- File operations are sandboxed within specified directories
- No data is sent to external servers
- Credentials are never stored
This project is licensed under the ISC License. See the LICENSE file for details.
- Built with Electron
- UI powered by React
- Styled with Tailwind CSS
- Icons from Lucide
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing issues for solutions
- Read the documentation for technical details
Made with ❤️ for the Windows + Linux development community