wincd
One-step Windows path navigation for WSL — paste a Windows path, cd instantly
Why wincd?
Navigating Windows paths in WSL is painful:
# Traditional: type it all out
# With wslpath: still need to compose the command
# With wincd: one step
You can even read paths straight from the clipboard — copy a path in Windows Explorer with Ctrl+C, then just run wcd in WSL.
Features
- Multiple path formats:
C:\,C:/,\\wsl$\,\\server\share, mixed separators - Clipboard integration: reads Windows clipboard when no args given
- Direct cd: shell integration for real directory switching
- Path validation: checks existence, suggests fuzzy matches
- Reverse conversion: WSL path → Windows path
- Shell completions: bash, zsh, fish
- Pure Rust: zero external dependencies, just compile and go
Installation
One-line install (recommended)
|
Download from GitHub Releases
Head to the Releases page and grab the binary for your platform.
Build from source
Via cargo
Quick Start
Basic usage
# Convert a Windows path
# Output: /mnt/c/Users/foo/Documents
# Forward slashes work too
# Output: /mnt/c/Users/foo/Documents
# UNC paths
# Output: /home/user
Clipboard mode
# Copy a path in Windows Explorer, then:
# Reads clipboard and converts automatically
Shell integration (recommended)
Add to your ~/.bashrc or ~/.zshrc:
Then use wcd directly:
# Switches to /mnt/c/code/Rust
Supported shells: bash, zsh, fish
Reverse conversion
# WSL → Windows
# Output: C:\Users\...\home\user\projects
# Windows path with forward slashes
# Output: C:/Users/.../home/user/projects
Path not found
# Warning: path does not exist: /mnt/c/Users/foo/NonExistent
# Possible directories:
# /mnt/c/Users/foo/Documents
# /mnt/c/Users/foo/Desktop
# /mnt/c/Users/foo/Downloads
# Auto-find nearest existing parent
# Output: /mnt/c/Users/foo
Full Usage
wincd [OPTIONS] [PATH]
Arguments:
[PATH] Windows path (reads from clipboard if omitted)
Options:
-w, --to-windows Reverse conversion: WSL → Windows
-m, --mixed Windows path with / separator
-p, --parent Find nearest existing parent directory
-f, --force Skip path existence check
-v, --verbose Show conversion details
--init <SHELL> Print shell integration code [bash, zsh, fish]
--no-color Disable colored output
-h, --help Show help
-V, --version Show version
Custom mount points
If your WSL uses a custom mount prefix (configured in /etc/wsl.conf), wincd detects it automatically:
# /etc/wsl.conf
[automount]
root = /drv
wincd will use /drv/c/... instead of /mnt/c/....
Shell completions
Generate shell completion scripts:
# bash
# zsh
# fish