| Crates.io | ccd-pick |
| lib.rs | ccd-pick |
| version | 0.1.3 |
| created_at | 2025-07-25 05:06:36.553107+00 |
| updated_at | 2025-08-01 06:28:27.189021+00 |
| description | A fast, intelligent directory navigation tool with frequency tracking |
| homepage | https://github.com/permacommons/ccd |
| repository | https://github.com/permacommons/ccd |
| max_upload_size | |
| id | 1767203 |
| size | 407,994 |
A fast, intelligent directory navigation tool that uses the locate database to quickly find and change to directories. Features frequency tracking and an interactive TUI for easy directory selection.
ccd is a shell function that wraps a Rust tool called ccd-pick. First install ccd-pick, then use it to install the wrapper.

locate database for instant directory lookupInstall the Rust binary to your PATH:
cargo install ccd-pick
Or, to build and install from the repository:
cargo install --path . --locked
Ensure ~/.cargo/bin is in your PATH (add to ~/.bashrc if needed):
export PATH="$HOME/.cargo/bin:$PATH"
Install the shell function to your ~/.bashrc:
ccd-pick --install
Reload your shell configuration:
source ~/.bashrc
The ccd-pick search functionality will only work if locate is installed and working, and the
locate index is up-to-date. It is typically provided via the plocate package, which replaces
the older mlocate, and the underlying database is usually regularly updated in the background
via the updatedb command.
If you prefer manual installation, you can get the shell function and add it manually:
# Print the shell function
ccd-pick --printfn > ccd_function.sh
# Add this to your ~/.bashrc or ~/.zshrc
source /path/to/ccd_function.sh
# Launch interactive directory picker
ccd
Interactive Mode Controls:
Tab: Toggle between search mode and frequent directories view↑/↓: Navigate through resultsPgUp/PgDn: Fast navigation (10 items at a time)Home/End: Jump to first/last resultEnter: Select directory and change to itShift+Delete: Reset frequency count for selected directoryEsc: Quit without changing directorySearch Mode:
Frequent Mode:
Press Tab to view your most frequently used directories
Shows directories sorted by usage count (most used first)
Press Tab again to return to search mode
# Change to best match for "proj"
ccd proj
# Show help
ccd --help
ccd <search>, the count is not incremented. This is to avoid tracking poor matches.Shift+Delete key in interactive mode~/.ccd_frequencyThe ccd-pick binary searches the locate database using locate --limit 100 <pattern>
Filters results to show only directories
Loads frequency data from ~/.ccd_frequency
Sorts results by usage frequency (most used first), then by path length
In direct mode: changes to the first directory found
In interactive mode: presents a TUI for selection
The tool uses a shell function wrapper (ccd) that calls the Rust binary (ccd-pick) and properly changes the current shell's directory. The binary outputs the target directory path, and the shell function captures this and executes cd.
$ ccd
# Opens TUI interface - type "proj" to search
# Use arrow keys to navigate, Enter to select
$ ccd tmp
Changed to: /tmp
$ ccd nonexistent
Searching for directories matching: nonexistent
No directories found matching 'nonexistent'
plocate package)sudo updatedb)src/main.rs - Main Rust application (ccd-pick binary)ccd.sh - Shell wrapper function (compiled into binary)build.rs - Build script for compiling shell functionCargo.toml - Rust project configuration# Debug build
cargo build
# Release build
cargo build --release
# Install to ~/.cargo/bin
cargo install --path . --locked
See AGENTS.md for contribution guidelines. We welcome contributions from both humans and AI assistants!
This project is open source. Please see the license file for details.