Skip to main content

A fast keyboard-driven directory navigator for the terminal.

Project description

cd-browser

Stop typing paths. Browse them.

cd-browser is a fast keyboard-driven directory navigator for the terminal. It lets you explore directory trees visually and jump to any folder instantly.

cd-browser demo

Repository (full demo + docs): https://gitea.sakydogalo.es/saky/cd-browser

Why cd-browser?

Working in the terminal often means:

  • typing long directory paths
  • navigating deep folder trees
  • repeating cd .. multiple times

cd-browser provides an interactive terminal UI that allows you to browse directories with the keyboard and return the selected path directly to your shell.

Features

  • ⌨️ Fully keyboard-driven workflow ( / / / )
  • 🌲 Expand and collapse directories ( to expand/enter, to collapse/back)
  • 📜 Navigation history inside the session (h history mode, b back, f forward)
  • 🔎 Incremental filter mode (/, type to filter, Backspace, Esc)
  • 📄 Toggle file visibility (a) to switch between directories-only and mixed view
  • ⚡ Fast jumps in large lists (PgUp/PgDn, Home/End, g/G in normal mode)
  • 🚀 Contextual open with menu (o) with app detection based on your environment
  • 🔁 Blocking terminal editors restore the UI state when they exit (nvim, nano, less, bat)
  • 👀 Toggle hidden entries with .
  • 🖥 Native terminal interface
  • 🔁 Works with Bash, Zsh and other shells
  • ⚡ Returns the selected path to the shell (Enter to confirm, Esc to cancel)

Controls

Normal mode:

  • / : Move selection
  • : Expand directory, or enter when already expanded
  • : Collapse directory, or go to parent
  • Enter: Confirm selected path and exit
  • Esc: Cancel and return the original path
  • h: Toggle history mode
  • b / f: Back / forward in navigation history
  • .: Toggle hidden entries
  • a: Toggle file visibility
  • /: Enter filter mode
  • o: Open selected entry with an app
  • PgUp / PgDn: Page jump
  • Home / End: Jump to first/last entry
  • g / G: Jump to first/last entry

Filter mode:

  • Type text: Filter visible entries in real time (case-insensitive)
  • / : Move inside filtered results
  • Enter: Apply filter and perform contextual action:
    • Directory: navigate into it without exiting cd_
    • File: open app selection menu
  • Esc: Exit filter mode and clear query
  • Backspace: Remove last filter character

History mode:

  • / : Move through history entries
  • Enter: Jump to selected history path
  • Esc or h: Exit history mode
  • PgUp / PgDn, Home / End: Fast history navigation

Open with menu (o):

  • / : Move between app options
  • Enter: Launch selected app
  • Esc: Cancel

The menu only shows apps available in your system (PATH) and context:

  • GUI options (when GUI is available): code, system open/xdg-open
  • Terminal options: antigravity, nvim, nano, less, bat (as applicable)

Quick Demo

Run:

cd_

Browse directories using the arrow keys and press Enter to jump directly to the selected folder.

Documentation

See the documentation index:

docs/index.md

Installation

Install the project in user mode:

pip install cd-browser

Important: After installation, run this to set up the cd_ command:

cd_browser_post_install

This interactive script will guide you through enabling cd_ in your shell.

Shell Integration For cd_

Because a Python subprocess cannot directly change the parent shell directory, use a shell wrapper that captures the final path printed by cd_browser.

Bash or Zsh example:

cd_() {
  local target
  target="$(cd_browser)" || return

  if [ -n "$target" ] && [ -d "$target" ]; then
    cd "$target"
  fi
}

After adding the function to your shell profile, reload it:

source ~/.bashrc

Or:

source ~/.zshrc

Then use:

cd_
  • Inside cd_browser, press . to toggle hidden entries.

Platform Compatibility

Practical conclusion:

  • Best current support: macOS and Linux
  • Windows is partially supported, but still needs real-world validation in Windows terminal environments before being considered fully supported

Uninstall

If the project was installed with pip, remove it with:

pip uninstall cd-browser

Important: After uninstalling, remove the cd_() function from your shell profile (~/.bashrc or ~/.zshrc) to clean up completely.

Developer Setup

Recommended setup:

make dev

Run the application in development mode:

python -m app.main

Useful development commands:

make fix
make quality
make run

Template Origin

This project was created from the Python AI Dev Template.

The original template documentation has been preserved in README_TEMPLATE.md so the project-specific README can focus on cd-browser usage and development.

For the original template setup, conventions, and generic workflow notes, see README_TEMPLATE.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cd_browser-0.2.6.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cd_browser-0.2.6-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file cd_browser-0.2.6.tar.gz.

File metadata

  • Download URL: cd_browser-0.2.6.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for cd_browser-0.2.6.tar.gz
Algorithm Hash digest
SHA256 b1ff3607d73d22cfabedc28c94dc796f660df3a25de7a5df6376f0e56cb327b7
MD5 ef1594f14b12c6b99eb106cdcb4e9b8b
BLAKE2b-256 f6f98325740b06e3bdf11223dc92ac35d778212fd6d158127479d95c57579f22

See more details on using hashes here.

File details

Details for the file cd_browser-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: cd_browser-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for cd_browser-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 04383c77337094edd9fdd42b03bef1543f27286b532d3c2edd56171a277ab050
MD5 f378c0a2a510ba51fdd459cdac74c9eb
BLAKE2b-256 c0fa6ed84c022cce754ebb99b0f615f237ced44292f91e97523f6c67400b468b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page