An interactive working directory selector plugin for Bash/Zsh — triggered on terminal startup or SSH login.
hatoba displays a directory selection menu on SSH login, letting you navigate with arrow keys and cd into your chosen working directory.
- ✅ Select directories with arrow keys (↑↓)
- ✅ Manage options and defaults via
config.toml - ✅ Activates only on SSH + interactive + login shell
# From GitHub (latest)
cargo install --git https://github.com/iidax/hatoba
# From crates.io (Not yet available)
cargo install hatobaFor zsh users
Run the following command:
echo 'eval "$(hatoba init zsh)"' >> ~/.zshrc
Or add the following directly to ~/.zshrc:
eval "$(hatoba init zsh)"After editing, restart your shell or run source ~/.zshrc.
For bash users
Run the following command:
echo 'eval "$(hatoba init bash)"' >> ~/.bashrcOr add the following directly to ~/.bashrc:
eval "$(hatoba init bash)"After editing, restart your shell or run source ~/.bashrc.
Confirm that hatoba is available:
# Check version
hatoba --version
# Check help
hatoba --help# Add a candidate (the config file is created automatically on first run)
hatoba add ~/Workspace/myproject --label myproject --default
# Add more candidates
hatoba add ~/Workspace/other --label other
# List registered entries
hatoba listYou can also change the default selection:
# Change the default selection
hatoba default ~/Workspace/fooYou can also edit ~/.config/hatoba/config.toml directly:
# ~/.config/hatoba/config.toml
[[dirs]]
path = "~/Workspace/myproject"
label = "myproject"
default = true
[[dirs]]
path = "~/Workspace/other"
label = "other"| Command | Description |
|---|---|
hatoba list |
List registered directories |
hatoba add <path> [--label <name>] [--default] |
Add a directory |
hatoba remove <path> |
Remove a directory |
hatoba default <path> |
Change the default selection |