r/coolgithubprojects • u/Sno_w_olf • 5h ago
I got tired of typing cd ../../.. so I built a tool that finds folders by name
github.comIt's called hpt (pronounced "hopped", but with a t instead of the d, ig). You type `hpt api` from anywhere and it takes you to the folder called api.
It indexes the folders under your home directory when you install it, or other locations if you set them. zoxide depends on how often you've visited a folder, while hpt can find one you've never cd'd into.
It looks for an exact name first, then prefix, substring and fuzzy matches, so `hpt zbra` finds `zebra-crossing`. If there are several matches, you get a list to pick from with the keyboard or mouse.
A background watcher keeps the index up to date. I tested it with 1,000,000 folders: a new folder showed up in about 240 ms and an exact lookup took about 5 ms. It only indexes folders, and it skips things like node_modules and .git.
You can also use it to open things:
hpt code api # open api in VS Code
hpt nano . # run nano in the current folder
hpt claude api web # start Claude Code in both, a tab or window each
hpt resume api # continue the last coding agent session in api
hpt ignore AppData # stop indexing folders with this name
hpt - # previous folder, same as cd -
To add your own command, put one line in a text file. For example, `idea` makes `hpt idea api` open the folder in IntelliJ.
It works on Windows, macOS and Linux with PowerShell, bash, zsh and fish. The installer doesn't need admin rights, and it tells you what it will change before doing anything. There's no telemetry. It's written in Go and MIT licensed.