Clones Desktop
A desktop application for contributing to the world's largest dataset for multimodal computer-use agents. Earn $CLONES, $USDC or $ETH tokens in two ways: record your desktop interactions to train better computer-use AI, or provide secure virtual desktop infrastructure for deploying these agents.
Built from the ground up with privacy and security as core principles. See our Privacy Policy for details.
Getting Started
First, clone the repository to your local machine:
git clone https://github.com/clones-ai/clones-desktop.git
cd desktop
Development
This project is a monorepo containing the Flutter Web application and the Rust backend integrated with Tauri.
Prerequisites
- Flutter - Flutter 3.29+
- Rust
- VS Code with the following extensions:
- Windows-specific requirements:
- PowerShell 5.0+ (included with Windows 10/11)
- Windows Terminal (recommended) or Command Prompt
- Visual Studio Build Tools (for Rust compilation)
- The backend server and website must be running. Using the recommended Docker setup for both is advised.
1. Configure Environment Variables
Create a .env
file in the root of the desktop
project directory by copying the env.example
file.
cp env.example .env
For local development, the default values in this file do not need to be changed.
Option 1: Automated Script (Recommended)
Use the provided development script that handles both Flutter Web and Tauri:
For Windows:
# PowerShell (Recommended) - Full Flutter Web + Tauri
.\scripts\windows\dev_web_tauri.ps1
# Batch file wrapper - Full Flutter Web + Tauri
.\scripts\windows\dev_web_tauri.bat
# PowerShell - Tauri Desktop Only (for wallet testing)
.\scripts\windows\dev_tauri_desktop.ps1
# Batch file wrapper - Tauri Desktop Only
.\scripts\windows\dev_tauri_desktop.bat
# PowerShell - Windows-optimized Tauri development
.\scripts\windows\dev-windows.ps1
# Batch file wrapper - Windows-optimized Tauri development
.\scripts\windows\dev-windows.bat
For macOS/Linux:
./scripts/macos/dev_web_tauri.sh
These scripts will:
- Start Flutter Web development server on port 3000
- Wait for Flutter to be ready
- Start Tauri development server with Windows-specific optimizations
- Provide real-time logs
- Handle Windows file lock issues using temporary build directories
Option 2: VS Code Launch Configuration
- Open the project in your IDE.
- Go to the "Run and Debug" panel (Shortcut:
Cmd+Shift+D
orCtrl+Shift+D
with Cursor/VS Code). - Select the [NEW] Flutter Web + Tauri Development configuration from the dropdown menu.
- Start debugging.
Option 3: Manual Setup
Run the following commands in separate terminals:
For Windows:
# Terminal 1: Start Flutter Web development server
flutter run -d web-server --web-port 3000 --web-hostname 127.0.0.1
# Terminal 2: Start Tauri development server (Windows-optimized)
cd src-tauri
$env:CARGO_TARGET_DIR = "$env:TEMP\clones-desktop-target"
cargo tauri dev
For macOS/Linux:
# Terminal 1: Start Flutter Web development server
flutter run -d web-server --web-port 3000 --web-hostname 127.0.0.1
# Terminal 2: Start Tauri development server
cd src-tauri
cargo tauri dev
Architecture Overview
The application now uses a unified architecture:
- Flutter Web application served on
http://localhost:3000
- Tauri desktop wrapper with integrated Rust backend
- IPC Server runs within the Tauri process on port 19847
- Hot Reload preserved for development
- Native distribution via Tauri for production
This architecture provides a consistent development and production experience while maintaining all existing functionality.
Windows-Specific Notes
The Windows development environment includes several optimizations to handle common Windows development challenges:
- Temporary Build Directories: Uses
%TEMP%\clones-desktop-build
and%TEMP%\clones-desktop-target
to avoid file lock issues - PowerShell Scripts: Enhanced PowerShell scripts with proper error handling and cleanup
- Batch File Wrappers: Simple
.bat
files for users who prefer Command Prompt - Process Management: Automatic cleanup of Flutter and Rust processes on script termination
- File Lock Handling: Prevents common Windows file locking issues during development
If you encounter any Windows-specific issues, the automated scripts handle most common problems automatically.
Windows Development Scripts Overview
The project includes several Windows-specific development scripts for different use cases:
Full Development (Flutter Web + Tauri)
dev_web_tauri.ps1
/dev_web_tauri.bat
: Complete development environment with Flutter Web server and Tauri desktop app- Best for: Full application development and testing
Tauri Desktop Only
dev_tauri_desktop.ps1
/dev_tauri_desktop.bat
: Runs only the Tauri desktop application- Best for: Testing wallet functionality and desktop-specific features
- Skips Flutter Web server setup
Windows-Optimized Tauri
dev-windows.ps1
/dev-windows.bat
: Optimized Tauri development with enhanced Windows file handling- Best for: Pure Tauri development and debugging
- Uses temporary build directories to avoid file lock issues
Script Features
- PowerShell Scripts: Full-featured with error handling, process management, and cleanup
- Batch Files: Simple wrappers that call the PowerShell scripts
- Automatic Cleanup: Removes temporary files and stops processes on exit
- File Lock Prevention: Uses Windows temp directories to avoid build conflicts
- Process Management: Automatically handles Flutter and Rust process lifecycle