Skip to content

WSL Tools

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:

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 destination
wsl({ source_path: "/home/user/file.go", dest_path: "C:\\project\\file.go" })
// Sync entire workspace WSL → Windows
wsl({ direction: "wsl_to_windows" })
// Sync with file filter
wsl({ direction: "windows_to_wsl", filter_pattern: "*.go" })
// Preview sync without executing
wsl({ direction: "bidirectional", dry_run: true })

All parameters:

  • source_path (optional): Source file/dir path
  • dest_path (optional): Destination (auto-calculated if empty)
  • direction (optional): wsl_to_windows, windows_to_wsl, bidirectional
  • filter_pattern (optional): File filter (e.g., *.go)
  • dry_run (optional): Preview without executing (default: false)
  • create_dirs (optional): Create destination directories (default: true)
wsl({ action: "status" })
// Returns: environment detection, path mappings, file locations, auto-sync state
// Enable auto-sync
wsl({ enabled: true })
// Enable with options
wsl({ enabled: true, sync_on_write: true, sync_on_edit: true, silent: false })
// Disable auto-sync
wsl({ enabled: false })

Additional parameters (status/config):

  • action (optional): "status" to show integration status
  • enabled (optional): Enable/disable auto-sync
  • sync_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)

v3 Toolv4 Equivalent
wsl_to_windows_copywsl({ source_path: "/wsl/path" })
windows_to_wsl_copywsl({ source_path: "C:\\..." })
sync_claude_workspacewsl({ direction: "..." })
wsl_windows_statuswsl({ action: "status" })
configure_autosyncwsl({ enabled: true })
get_autosync_configwsl({ 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.