nd-cli 0.1.0

nd-cli, a terminal directory navigator
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 20.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mcmanussliam

nd-cli

nd-cli is a terminal directory navigator written in Rust. It displays subdirectories, lets you move using numeric choices, and prints the final selected path when you quit.

Installation

cargo install nd-cli

Enable shell integration (required to change directories from your current shell).

The project crate is nd-cli, and the binary/shell command is nd:

# zsh
echo 'eval "$(nd init zsh)"' >> ~/.zshrc
source ~/.zshrc

# bash
echo 'eval "$(nd init bash)"' >> ~/.bashrc
source ~/.bashrc

# fish
echo 'nd init fish | source' >> ~/.config/fish/config.fish
source ~/.config/fish/config.fish

# powershell
Add-Content -Path $PROFILE -Value 'Invoke-Expression (& nd init powershell)'
. $PROFILE

Use nd to navigate and update your current shell directory:

nd

Without shell integration, you can still run the binary directly:

nd

After shell integration, nd is a shell function that runs nd and then cds to the selected directory.

For local development:

cargo run -- --show-hidden

Usage

nd

Commands inside the TUI:

  • 1..N select a directory
  • b go to parent directory
  • q quit and print selected path

Flags:

  • --show-hidden include directories that start with .
  • --start-dir <PATH> start browsing from a specific directory
  • --no-color disable ANSI color output

Releasing to crates.io

This repository includes a CD workflow at .github/workflows/release.yml.

  1. Add the repository secret CARGO_REGISTRY_TOKEN in GitHub (Settings -> Secrets and variables -> Actions).
  2. Ensure Cargo.toml has the version you want to release.
  3. Create and push a version tag in the format vX.Y.Z (for example v0.1.0).
git tag v0.1.0
git push origin v0.1.0

The release workflow will run cargo package --locked and then cargo publish --locked.