Universal Path Translator - One path to rule them all!
Seamlessly convert paths between Windows, WSL, and Unix formats. Never manually translate D:\BEACON_HQ to /mnt/d/BEACON_HQ again!
- The Problem
- The Solution
- Features
- Quick Start
- Installation
- Usage
- Real-World Examples
- How It Works
- Configuration
- Integration
- Troubleshooting
- Contributing
- Credits
When working across Windows, WSL, and Unix environments, path format mismatches are a daily frustration:
| Scenario | What Happens |
|---|---|
| Copy path from Windows Explorer | Paste in WSL terminal β Doesn't work! |
| Config files for cross-platform tools | Need different paths for different agents |
| Share file paths in team chat | Recipient on different OS can't use them |
| Manual path conversion | Tedious, error-prone, wastes time |
# Windows path - won't work in WSL
D:\BEACON_HQ\MEMORY_CORE_V2\file.txt
# WSL path - won't work in Windows
/mnt/d/BEACON_HQ/MEMORY_CORE_V2/file.txt
# How many times have you manually converted these?Time wasted: 2-5 minutes per session on manual path conversion
Frequency: Multiple times per day
Affected: ALL team members working cross-platform
PathBridge automatically detects path format and converts to the target format with a single command:
# Windows β WSL (auto-detected)
pathbridge "D:\BEACON_HQ\file.txt"
# Output: /mnt/d/BEACON_HQ/file.txt
# WSL β Windows (auto-detected)
pathbridge "/mnt/d/BEACON_HQ/file.txt"
# Output: D:\BEACON_HQ\file.txt
# That's it! No manual conversion needed.| Feature | Benefit |
|---|---|
| Auto-detection | Just paste the path - PathBridge figures out the format |
| Zero dependencies | Works with Python stdlib only |
| Clipboard integration | Convert clipboard contents with --clipboard |
| Batch mode | Pipe multiple paths via stdin |
| Python API | Integrate into your own tools |
| Cross-platform | Works on Windows, Linux, macOS |
- π Auto-detect path format (Windows, WSL, Unix)
- π Smart conversion (converts to opposite format by default)
- π― Target format override (
--to wsl,--to win,--to unix) - π Clipboard integration (read/write with
--clipboard) - π Path info (show all format variations with
--info) - π’ Batch mode (process multiple paths via stdin)
- β‘ Zero dependencies - Pure Python stdlib
- π Python API - Import and use in your code
- π§ Custom mappings - Define custom drive letter mappings
- π₯οΈ Cross-platform - Windows, Linux, macOS
- π Edge case handling - Spaces, special chars, relative paths
| Format | Example | Detection Pattern |
|---|---|---|
| Windows | D:\BEACON_HQ\file.txt |
Drive letter followed by : |
| Windows (forward) | D:/BEACON_HQ/file.txt |
Drive letter with forward slashes |
| WSL | /mnt/d/BEACON_HQ/file.txt |
Starts with /mnt/[a-z]/ |
| Unix | /home/user/file.txt |
Starts with / (not /mnt/x/) |
| UNC | \\server\share\file.txt |
Network paths (detected as Windows) |
# Clone and use immediately
git clone https://github.com/DonkRonk17/PathBridge.git
cd PathBridge
python pathbridge.py "D:\test\path"# Convert a Windows path to WSL
python pathbridge.py "D:\BEACON_HQ\MEMORY_CORE_V2"
# [OK] windows -> wsl: /mnt/d/BEACON_HQ/MEMORY_CORE_V2
# Convert a WSL path to Windows
python pathbridge.py "/mnt/d/BEACON_HQ/MEMORY_CORE_V2"
# [OK] wsl -> windows: D:\BEACON_HQ\MEMORY_CORE_V2That's it! PathBridge just works.
git clone https://github.com/DonkRonk17/PathBridge.git
cd PathBridge
# Run directly
python pathbridge.py --help
# Or create a shell alias
alias pb='python /path/to/PathBridge/pathbridge.py'PathBridge is a single file with zero dependencies. Just copy pathbridge.py wherever you need it:
# Copy to your scripts directory
cp pathbridge.py ~/scripts/
python ~/scripts/pathbridge.py "D:\test"# Windows (PowerShell)
Copy-Item pathbridge.py "$env:USERPROFILE\scripts\"
# Add to PATH: $env:USERPROFILE\scripts
# Linux/macOS
cp pathbridge.py ~/.local/bin/pathbridge
chmod +x ~/.local/bin/pathbridgecd PathBridge
pip install -e .
pathbridge --help# Windows β WSL
pathbridge "D:\BEACON_HQ\file.txt"
# [OK] windows -> wsl: /mnt/d/BEACON_HQ/file.txt
# WSL β Windows
pathbridge "/mnt/d/BEACON_HQ/file.txt"
# [OK] wsl -> windows: D:\BEACON_HQ\file.txt# Force WSL output
pathbridge --to wsl "D:\BEACON_HQ"
pathbridge -t wsl "D:\BEACON_HQ"
# Force Windows output
pathbridge --to win "/mnt/d/BEACON_HQ"
pathbridge -t windows "/mnt/d/BEACON_HQ"# Read path from clipboard, convert, copy result back
pathbridge --clipboard
# Shorthand
pathbridge -c# Only output the converted path (for scripting)
pathbridge -q "D:\BEACON_HQ"
# /mnt/d/BEACON_HQ# Show detailed path information
pathbridge --info "D:\BEACON_HQ\file.txt"
# Output:
# [INFO] Path Information
# Original: D:\BEACON_HQ\file.txt
# Format: windows
# Windows: D:\BEACON_HQ\file.txt
# WSL: /mnt/d/BEACON_HQ/file.txt
# Status: [X] Not found# Convert multiple paths via stdin
echo -e "D:\\path1\nD:\\path2\nD:\\path3" | pathbridge
# From a file
cat paths.txt | pathbridge -q > converted_paths.txtfrom pathbridge import PathBridge
pb = PathBridge()
# Auto-convert (Windows β WSL)
result = pb.convert("D:\\BEACON_HQ\\file.txt")
print(result) # /mnt/d/BEACON_HQ/file.txt
# Auto-convert (WSL β Windows)
result = pb.convert("/mnt/d/BEACON_HQ/file.txt")
print(result) # D:\BEACON_HQ\file.txtfrom pathbridge import PathBridge
pb = PathBridge()
# Force WSL output
result = pb.convert("D:\\BEACON_HQ", target="wsl")
print(result) # /mnt/d/BEACON_HQ
# Force Windows output
result = pb.convert("/mnt/d/BEACON_HQ", target="windows")
print(result) # D:\BEACON_HQfrom pathbridge import PathBridge
pb = PathBridge()
print(pb.detect_format("D:\\BEACON_HQ")) # windows
print(pb.detect_format("/mnt/d/BEACON_HQ")) # wsl
print(pb.detect_format("/home/user")) # unixfrom pathbridge import PathBridge
pb = PathBridge()
info = pb.get_info("D:\\BEACON_HQ\\file.txt")
print(info)
# {
# 'original': 'D:\\BEACON_HQ\\file.txt',
# 'format': 'windows',
# 'windows': 'D:\\BEACON_HQ\\file.txt',
# 'wsl': '/mnt/d/BEACON_HQ/file.txt',
# 'unix': None,
# 'exists': False
# }from pathbridge import PathBridge
pb = PathBridge()
paths = ["D:\\folder1", "D:\\folder2", "C:\\Users"]
results = pb.convert_batch(paths)
print(results)
# ['/mnt/d/folder1', '/mnt/d/folder2', '/mnt/c/Users']from pathbridge import PathBridge
# Map X: drive to custom mount point
custom = {"X": "/custom/mount"}
pb = PathBridge(custom_mappings=custom)
result = pb.convert("X:\\data\\file.txt")
print(result) # /custom/mount/data/file.txtProblem: TimeSync has hardcoded WSL paths that break on Windows.
Solution:
from pathbridge import PathBridge
pb = PathBridge()
config_path = pb.convert("/mnt/d/BEACON_HQ/config.json")
# Returns Windows path on Windows, WSL path on WSLProblem: CLIO (WSL) shares a file path with FORGE (Windows) - won't work!
Solution:
# CLIO creates path
clio$ echo "/mnt/d/project/src/main.py" > handoff.txt
# FORGE converts and uses it
forge> pathbridge -q $(cat handoff.txt)
D:\project\src\main.pyProblem: Copy path from Windows Explorer, need to use in WSL terminal.
Solution:
# One command!
pathbridge -c
# Reads from clipboard, converts, copies result backProblem: Generate config that works on both Windows and WSL.
Solution:
from pathbridge import PathBridge
import json
pb = PathBridge()
data_path = "D:\\BEACON_HQ\\data"
config = {
"windows_path": pb.convert(data_path, target="windows"),
"wsl_path": pb.convert(data_path, target="wsl"),
}
print(json.dumps(config, indent=2))
# {
# "windows_path": "D:\\BEACON_HQ\\data",
# "wsl_path": "/mnt/d/BEACON_HQ/data"
# }Problem: Process a list of paths from a log file.
Solution:
# Extract and convert paths from log
grep "ERROR:" server.log | awk '{print $3}' | pathbridge -q > fixed_paths.txt- Check for UNC paths (
\\server\share) β Windows - Check for drive letter (
C:,D:) β Windows - Check for WSL mount (
/mnt/[a-z]/) β WSL - Check for Unix root (
/...) β Unix - Check for backslashes β Assume Windows
- Check for forward slashes β Assume Unix
- Otherwise β Unknown
| Source | Target | Action |
|---|---|---|
| Windows | WSL | Replace X:\ with /mnt/x/, convert \ to / |
| WSL | Windows | Replace /mnt/x/ with X:\, convert / to \ |
| Windows | Windows | No change |
| WSL | WSL | No change |
| Unix | * | Typically no change (pure Unix paths don't map to Windows) |
By default, PathBridge maps X: to /mnt/x/. You can customize this:
from pathbridge import PathBridge
# Map network drives or special cases
custom = {
"N": "/network/share",
"Z": "/custom/data",
}
pb = PathBridge(custom_mappings=custom)Add to your .bashrc, .zshrc, or PowerShell profile:
# Bash/Zsh
alias pb='python /path/to/pathbridge.py'
alias pbc='python /path/to/pathbridge.py --clipboard'
# PowerShell
function pb { python C:\path\to\pathbridge.py $args }
function pbc { python C:\path\to\pathbridge.py --clipboard }PathBridge integrates seamlessly with the Team Brain ecosystem:
# TimeSync - Fix cross-platform paths
from pathbridge import PathBridge
from timesync import TimeSync
pb = PathBridge()
config_path = pb.convert("/mnt/d/BEACON_HQ/timesync_config.json")
ts = TimeSync(config_path)# SynapseLink - Share paths in messages
from pathbridge import PathBridge
from synapselink import quick_send
pb = PathBridge()
file_path = pb.convert("D:\\project\\report.pdf", target="wsl")
quick_send(
"CLIO",
"Report Ready",
f"File is at: {file_path}",
priority="NORMAL"
)For complete integration guides:
- INTEGRATION_PLAN.md - Full integration architecture
- QUICK_START_GUIDES.md - Agent-specific guides
- INTEGRATION_EXAMPLES.md - Copy-paste examples
Problem: Path returns unchanged.
Solution: Check the format:
pathbridge --info "your/path/here"
# If format is "unknown", the path doesn't match any known patternProblem: --clipboard fails.
Solution: Depends on platform:
- Windows: Requires PowerShell
- macOS: Requires
pbcopy/pbpaste - Linux: Requires
xcliporxsel
# Linux: Install xclip
sudo apt install xclipProblem: Paths with spaces or special characters fail.
Solution: Quote the path:
pathbridge "D:\My Documents\My File (1).txt"Problem: Network paths (\\server\share) don't convert.
Solution: UNC paths are Windows-specific and don't have a direct WSL equivalent. PathBridge detects them as Windows format but cannot convert them to WSL.
usage: pathbridge [-h] [--to {windows,win,wsl,unix}] [--clipboard] [--info]
[--quiet] [--version]
[path]
PathBridge - Universal Path Translator. One path to rule them all!
positional arguments:
path Path to convert (or use --clipboard, or pipe via stdin)
options:
-h, --help show this help message and exit
--to {windows,win,wsl,unix}, -t {windows,win,wsl,unix}
Target format (windows/win, wsl, unix). Default: auto-detect
--clipboard, -c Read path from clipboard and copy result back
--info, -i Show detailed information about the path
--quiet, -q Only output the converted path (no labels)
--version, -v show program's version number and exit
| Method | Description |
|---|---|
__init__(custom_mappings=None) |
Initialize with optional custom drive mappings |
detect_format(path) |
Detect path format: "windows", "wsl", "unix", or "unknown" |
convert(path, target=None) |
Convert path to target format (auto-detects if target is None) |
convert_batch(paths, target=None) |
Convert multiple paths |
get_info(path) |
Get detailed information about a path |
windows_to_wsl(path) |
Convert Windows path to WSL format |
wsl_to_windows(path) |
Convert WSL path to Windows format |
| Function | Description |
|---|---|
get_clipboard_content() |
Read content from system clipboard |
set_clipboard_content(content) |
Write content to system clipboard |
normalize_target(target) |
Normalize target format string |
Contributions are welcome! Please follow these guidelines:
git clone https://github.com/DonkRonk17/PathBridge.git
cd PathBridge
python test_pathbridge.py # Run tests- All tests must pass (53/53 currently)
- Add tests for new features
- No external dependencies
- Follow existing code patterns
- Add docstrings for public methods
- Use type hints
- ASCII-only in Python code (no emojis)
- Fork the repository
- Create a feature branch
- Write tests for new features
- Ensure all tests pass
- Submit a pull request
MIT License - see LICENSE for details.
Built by: ATLAS (Team Brain)
For: Logan Smith / Metaphy LLC
Requested by: FORGE (Cursor Orchestrator)
Part of: Beacon HQ / Team Brain Ecosystem
Date: January 23, 2026
FORGE identified path format mismatches as a daily pain point affecting ALL Team Brain agents:
- CLIO (WSL) shares paths with FORGE (Windows) β Won't work
- TimeSync has hardcoded paths β Breaks cross-platform
- Manual conversion is tedious β Wastes time
PathBridge solves this with a dead-simple approach:
- Auto-detect input format
- Convert to opposite format
- Zero configuration needed
- FORGE for identifying the need and writing the tool request
- CLIO for testing on Linux/WSL
- Team Brain for the collaborative development model
- Logan Smith for the vision of seamless cross-platform tooling
- GitHub: https://github.com/DonkRonk17/PathBridge
- Issues: https://github.com/DonkRonk17/PathBridge/issues
- Examples: EXAMPLES.md
- Cheat Sheet: CHEAT_SHEET.txt
- Integration: INTEGRATION_PLAN.md
PathBridge: One path to rule them all! π