Like
code .use to open the vscode from the terminal. Its a CLI-to-GUI File Navigation Tool which allows us to open the common directory from the terminal using their name itself.
TypeDesktop,Downloads,Pictures(and more) anywhere in your terminal to instantly open that folder in your GUI file manager.
diropen is a single self-contained binary. When you run diropen install, it:
- Copies itself into a dedicated bin directory under your user profile
- Creates one named executable per common directory (
Desktop.exe,Downloads.exe, etc.) - Adds that bin directory to your user PATH — permanently, no admin rights needed
When you later type Desktop in a terminal, the matching executable runs and opens ~/Desktop in your GUI file manager (explorer on Windows, xdg-open on Linux, open on macOS).
Requires Go 1.21+.
# Clone / enter the repo
git clone https://github.com/continuum235/CLI-to-GUI-File-Navigation-Tool.git
cd CLI-to-GUI-File-Navigation-Tool
# Build for your current platform
go build -o diropen main.go # Linux / macOS
go build -o diropen.exe main.go # Windows (PowerShell)# Windows → Linux
GOOS=linux GOARCH=amd64 go build -o diropen main.go
# Windows → macOS (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build -o diropen main.go
# Linux/macOS → Windows
GOOS=windows GOARCH=amd64 go build -o diropen.exe main.go# 1. Build
go build -o diropen.exe main.go
# 2. Install shortcuts + add to PATH
.\diropen.exe installWhat install does on Windows:
- Creates
%LOCALAPPDATA%\diropen\bin\ - Writes
Desktop.exe,Documents.exe,Downloads.exe,Music.exe,Pictures.exe,Videos.exethere - Adds the bin folder to your user PATH via the registry (
HKCU\Environment) — no admin needed
Activate in the current terminal (without opening a new one):
$env:PATH = [System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')Or just open a new terminal — the PATH loads automatically on every new session.
# 1. Build
go build -o diropen main.go
# 2. Install shortcuts + symlinks
./diropen installWhat install does on Linux:
- Creates common dirs under
~/if they don't exist - Places a hidden copy of itself inside each dir (e.g.
~/Desktop/.Desktop) - Creates lowercase symlinks in
~/.local/bin/→desktop,documents,downloads, etc.
Activate in the current shell (or add to ~/.bashrc / ~/.zshrc):
export PATH="$HOME/.local/bin:$PATH"To make it permanent, add that line to your shell profile:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcShortcuts installed:
| Command | Opens |
|---|---|
desktop |
~/Desktop |
documents |
~/Documents |
downloads |
~/Downloads |
music |
~/Music |
pictures |
~/Pictures |
videos |
~/Videos |
templates |
~/Templates |
public |
~/Public |
Note: Linux uses lowercase command names (
desktop, notDesktop).
Requires a desktop environment withxdg-open— works with GNOME, KDE, XFCE, and most others.
# 1. Build
go build -o diropen main.go
# 2. Install shortcuts + symlinks
./diropen installWhat install does on macOS:
- Places a hidden copy of itself inside each dir (e.g.
~/Desktop/.Desktop) - Creates lowercase symlinks in
~/.local/bin/→desktop,documents,downloads, etc.
Activate in the current shell (or add to ~/.zshrc):
export PATH="$HOME/.local/bin:$PATH"To make it permanent:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcShortcuts installed:
| Command | Opens |
|---|---|
desktop |
~/Desktop |
documents |
~/Documents |
downloads |
~/Downloads |
music |
~/Music |
pictures |
~/Pictures |
movies |
~/Movies |
public |
~/Public |
Uses macOS
opencommand — opens in Finder automatically.
All platforms follow the same pattern after install:
<DirName> Open the named home directory
<DirName> . Open the current working directory
<DirName> <subfolder> Open ~/DirName/subfolder
<DirName> /absolute/path Open an absolute path
# Windows
Desktop # opens C:\Users\<you>\Desktop
Downloads # opens C:\Users\<you>\Downloads
Downloads . # opens current directory in Explorer
Pictures vacation # opens C:\Users\<you>\Pictures\vacation# Linux / macOS
desktop # opens ~/Desktop
downloads # opens ~/Downloads
downloads . # opens current directory in Nautilus/Finder
pictures vacation # opens ~/Pictures/vacation# Any platform — open an arbitrary path
diropen . # open current directory
diropen /some/path # open any absolute path# Remove the bin directory
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\diropen"
# Remove from user PATH (open System Properties > Environment Variables,
# or use PowerShell):
$current = [System.Environment]::GetEnvironmentVariable('Path','User')
$new = ($current -split ';' | Where-Object { $_ -notlike '*diropen*' }) -join ';'
[System.Environment]::SetEnvironmentVariable('Path', $new, 'User')# Remove symlinks
rm ~/.local/bin/desktop ~/.local/bin/documents ~/.local/bin/downloads \
~/.local/bin/music ~/.local/bin/pictures ~/.local/bin/videos
# Remove hidden binaries (optional)
rm ~/Desktop/.Desktop ~/Documents/.Documents ~/Downloads/.Downloads \
~/Music/.Music ~/Pictures/.Pictures ~/Videos/.Videos| Problem | Fix |
|---|---|
| Command not found right after install (Windows) | Run the $env:PATH = ... one-liner printed by install, or open a new terminal |
| Command not found right after install (Linux/macOS) | Run export PATH="$HOME/.local/bin:$PATH" or open a new shell |
xdg-open not found (Linux) |
Install xdg-utils: sudo apt install xdg-utils or equivalent |
| No GUI (headless Linux server) | This tool requires a desktop environment — not designed for headless use |
| Permission denied writing bin dir | Make sure you have write access to %LOCALAPPDATA% / ~/.local/bin |
| OS | File Manager Command | Opens in |
|---|---|---|
| Windows | explorer <path> |
Windows Explorer |
| macOS | open <path> |
Finder |
| Linux | xdg-open <path> |
Default DE file manager (Nautilus, Dolphin, Thunar, etc.) |
current system:
Creates many copies of the binary
Better approach:
Keep one binary
Use symlinks only
xdg-open ~/Desktop xdg-open ~/Downloads xdg-open ~/Pictures
its definately widely used but i dont care...i just did this for my own conviences