A terminal directory navigator. Browse your filesystem interactively and cd into any folder without typing paths.
curl -sSL https://raw.githubusercontent.com/Gorgoll/cdg/main/install.sh | bash
source ~/.bashrcThis will:
- Download the
cdgbinary to~/.local/bin/ - Add the
cdgshell function to your~/.bashrcor~/.zshrc
irm https://raw.githubusercontent.com/Gorgoll/cdg/main/install.ps1 | iex;
. $PROFILEThis will:
- Download the
cdgbinary to$env:LOCALAPPDATA\cdg\cdg.exe - Add the
cdgshell function to your PowerShell profile
⚠️ macOS builds are available on the releases page but are untested.
Download the binary manually and follow the Manual Installation steps below.
Just run:
cdg| Key | Action |
|---|---|
↑ / ↓ |
Navigate folders |
Enter |
Enter selected folder |
../ |
Go to parent directory |
./ |
cd into current directory and quit |
Cdg [options]
| Key | Action |
|---|---|
| -h | Help menu |
| -b name | Bookmark current directory |
| -b | List all bookmarks |
| name | Jump to a bookmarked directory |
- Download the binary for your platform from the releases page.
- Place it at
~/.local/bin/cdg-bin(or anywhere on your$PATH). - Add the following function to your shell config:
bash/zsh (~/.bashrc or ~/.zshrc):
cdg(){
local dir
dir=$(~/.local/bin/cdg-bin "$@" 2>/dev/tty)
[ -n "$dir" ] && cd "$dir"
}PowerShell (your PowerShell profile):
function cdg {
$dir = & "$env:LOCALAPPDATA\cdg\cdg.exe" @Args
if ($dir -is [array]) {
$dir = $dir[0]
}
if($dir){
$dir = $dir.Trim()
if (Test-Path $dir) {
Set-Location $dir
}
}
}- Reload your shell:
# bash/zsh
source ~/.bashrc
# PowerShell
. $PROFILE| Platform | Status |
|---|---|
| Linux | ✅ Tested |
| Windows | ✅ Tested |
| macOS |

