WSL Tools
Overview
Section titled “Overview”Seamless file synchronization and path conversion between WSL and Windows, unified into 1 tool.
Copy files between WSL and Windows, sync workspace, or manage auto-sync configuration. Action is auto-deduced from the parameters you provide.
Modes:
Single file/directory copy (source_path)
Section titled “Single file/directory copy (source_path)”Direction is auto-detected from the path format:
- Path starts with
/→ WSL-to-Windows - Path starts with drive letter (e.g.,
C:\) → Windows-to-WSL
// WSL to Windows (auto-detected from /mnt/... path)wsl({ source_path: "/home/user/project/main.go" })
// Windows to WSL (auto-detected from C:\ path)wsl({ source_path: "C:\\Users\\user\\file.txt" })
// With explicit destinationwsl({ source_path: "/home/user/file.go", dest_path: "C:\\project\\file.go" })Workspace sync (direction)
Section titled “Workspace sync (direction)”// Sync entire workspace WSL → Windowswsl({ direction: "wsl_to_windows" })
// Sync with file filterwsl({ direction: "windows_to_wsl", filter_pattern: "*.go" })
// Preview sync without executingwsl({ direction: "bidirectional", dry_run: true })All parameters:
source_path(optional): Source file/dir pathdest_path(optional): Destination (auto-calculated if empty)direction(optional):wsl_to_windows,windows_to_wsl,bidirectionalfilter_pattern(optional): File filter (e.g.,*.go)dry_run(optional): Preview without executing (default: false)create_dirs(optional): Create destination directories (default: true)
Show status (action: “status”)
Section titled “Show status (action: “status”)”wsl({ action: "status" })// Returns: environment detection, path mappings, file locations, auto-sync stateConfigure auto-sync
Section titled “Configure auto-sync”// Enable auto-syncwsl({ enabled: true })
// Enable with optionswsl({ enabled: true, sync_on_write: true, sync_on_edit: true, silent: false })
// Disable auto-syncwsl({ enabled: false })Additional parameters (status/config):
action(optional):"status"to show integration statusenabled(optional): Enable/disable auto-syncsync_on_write(optional): Auto-sync on write operations (default: true)sync_on_edit(optional): Auto-sync on edit operations (default: true)silent(optional): Silent mode (default: false)
Migration from v3
Section titled “Migration from v3”| v3 Tool | v4 Equivalent |
|---|---|
wsl_to_windows_copy | wsl({ source_path: "/wsl/path" }) |
windows_to_wsl_copy | wsl({ source_path: "C:\\..." }) |
sync_claude_workspace | wsl({ direction: "..." }) |
wsl_windows_status | wsl({ action: "status" }) |
configure_autosync | wsl({ enabled: true }) |
get_autosync_config | wsl({ action: "status" }) |
wsl_sync (v3.x) | wsl({ source_path: "..." }) |
wsl_status (v3.x) | wsl({ action: "status" }) |
All 14 WSL features from v3 are preserved. No functionality was removed.
See WSL Integration for complete guide.