Stop typing long
directory paths.
Goto is a tiny CLI tool that lets you bookmark directories with short names, then jump to them instantly from anywhere.
# Save a directory with a short name
$ gotocli goto add projects ~/Desktop/my_projects
Saved 'projects' -> ~/Desktop/my_projects
# Jump to it from anywhere
$ goto projects
~/Desktop/my_projects $#Overview
Bookmark
Save any directory with a short, memorable alias.
Jump
Instantly cd to any bookmarked directory by name.
Manage
List all bookmarks or remove ones you no longer need.
How it works
Goto stores your directory bookmarks in a simple JSON file at ~/.goto.json. Each bookmark maps an alias name to an absolute directory path. The CLI binary reads and writes this file—no database, no daemon, no network calls. It's fast because there's nothing to slow it down.
#Installation
1. Build from source
Requires Go 1.25+ installed on your system.
# Clone the repository
$ git clone <repo-url>
$ cd goto_project/goto
# Build the binary
$ go build -o gotocli ./app2. Add to your PATH
Move the binary somewhere on your PATH so you can run it from anywhere.
# Move to a directory in your PATH
$ sudo mv gotocli /usr/local/bin/
# Verify it works
$ gotocli goto list
No directories saved.#Commands
Save a directory path with a short alias name. Paths with spaces are supported.
# Usage
$ gotocli goto add <name> <path>
# Example
$ gotocli goto add work ~/Documents/work/project-alpha
Saved 'work' -> ~/Documents/work/project-alphaRetrieve the path for a saved alias. Prints the path to stdout so it can be used with cd via a shell function.
# Usage
$ gotocli goto jump <name>
# Example
$ gotocli goto jump work
~/Documents/work/project-alphaDisplay all saved directory bookmarks and their paths.
# Usage
$ gotocli goto list
# Example
$ gotocli goto list
work -> ~/Documents/work/project-alpha
docs -> ~/DocumentsDelete a saved directory bookmark by its alias name.
# Usage
$ gotocli goto remove <name>
# Example
$ gotocli goto remove work
Removed 'work'#Shell Setup
The jump command prints a directory path but can't change your shell's working directory by itself. Add this shell function to your ~/.zshrc or ~/.bashrc to enable goto <name> to actually change directories:
# Add to ~/.zshrc or ~/.bashrc
goto() {
local dest
dest=$(gotocli goto jump "$1")
if [ $? -eq 0 ] && [ -n "$dest" ]; then
cd "$dest"
else
echo "goto: '$1' not found"
fi
}
# Then reload your shell
$ source ~/.zshrcWhy a shell function? A subprocess (like a Go binary) cannot change the parent shell's working directory. The shell function calls gotocli goto jump, captures the output path, and runs cd in the current shell session.
#Quick Reference
| Action | Command |
|---|---|
| Save a directory | gotocli goto add <name> <path> |
| Jump to a directory | goto <name> |
| List all bookmarks | gotocli goto list |
| Remove a bookmark | gotocli goto remove <name> |
| Config file location | ~/.goto.json |