Simple, dependency-free Bash/Zsh CLI for named directory bookmarks and fast navigation.
goto-cli β is a simple CLI utility for quickly navigating between frequently used directories, designed for Bash and Zsh shells.
Save a directory under a short name:
goto -a my-project ~/projects/my-projectand then navigate to it:
goto my-projectgit clone <repository-url>
cd goto-cli
make installAfter installation, reload your shell:
source ~/.bashrcFor Zsh:
source ~/.zshrcCheck the installation:
goto --help
goto-cliis installed to~/.local/share/gotoand does not requiresudo.
From the project directory:
make uninstallor:
./uninstall.shThis removes goto-cli and its configuration from .bashrc / .zshrc.
Saved routes are not deleted.
cd ~/projects/my-project
goto -a my-projectNow:
goto my-projectwill take you to:
~/projects/my-project
Show all saved routes:
goto| Command | Description |
|---|---|
goto |
Show the list of projects |
goto <name> |
Navigate to a project |
goto -a <name> [path] |
Add a project |
goto -m <name> |
Modify a project |
goto -m <name> <value> |
Change the name or path |
goto -r <name> |
Remove a project |
goto -p <name> |
Explicitly navigate to a project |
goto -h |
Show help |
Long options are also available:
--add
--modify
--change
--rm
--remove
--project
--list
--help
goto -a my-projectThe current directory will be used.
goto -a my-project ~/projects/my-projectcd ~/projects/my-project
goto -aThe alias will be:
my-project
goto -m my-projectYou can then choose:
1) Change name
2) Change path
3) Change name and path
0) Cancel
goto -m my-project new-namegoto -m my-project ~/projects/new-locationgoto -r my-projectOnly the saved route is removed, not the directory itself.
For example:
my-project β /home/user/projects/my-project
after:
goto -r my-projectthe directory /home/user/projects/my-project will remain on disk.
gotoor:
goto -lor:
goto --listExample:
Available projects:
frontend -> /home/user/projects/frontend
backend -> /home/user/projects/backend
website -> /home/user/projects/website
goto-cli supports Tab completion in Bash and Zsh.
For example:
goto front<TAB>may complete the project name.
Command completion is also available:
goto --<TAB>If a project name starts with -, use -p:
goto -p "-my-project"or:
goto --project "-my-project"By default, routes are stored in:
~/.project_routes
Format:
name|path
For example:
frontend|/home/user/projects/frontend
backend|/home/user/projects/backend
website|/home/user/projects/website
You can use a different file:
export GOTO_PROJECTS_FILE="$HOME/.config/goto/routes"Routes will then be stored in the specified file.
If the variable is not set, the default is:
~/.project_routes
Check the installation:
make health-checkor:
./check.shThe following are checked:
- installation files;
src/andlib/directories;- Bash/Zsh configuration;
- loading of
goto.sh.
After pulling a new version:
git pull
make installThen reload your shell:
source ~/.bashrcor:
source ~/.zshrcgoto-cli/
βββ goto.sh # main file
βββ install.sh # installation
βββ uninstall.sh # uninstallation
βββ check.sh # health check
βββ Makefile
βββ src/ # functional modules
β βββ add.sh
β βββ go.sh
β βββ help.sh
β βββ list.sh
β βββ merge.sh
β βββ modify.sh
β βββ rm.sh
βββ lib/ # shared libraries
β βββ input.sh
β βββ log.sh
βββ FUTURE.md
Main commands:
make install
make uninstall
make health-check
make permissions
make rehash
make helpTo run locally without installing:
source ./goto.shThen:
goto --helpgoto is a shell function, not a regular executable.
This allows:
goto my-projectto change the directory of the current shell session.
During installation, goto.sh is automatically sourced through .bashrc or .zshrc.
See LICENSE.