gitmyhub

try

Shell ★ 3.7k updated 1mo ago

fresh directories for every vibe

Try is a small command-line tool for developers who constantly spin up throwaway project directories for experiments and then lose track of them. The problem it solves is familiar: you start a quick test, name the folder something generic like "test" or "redis-thing", and a few weeks later you cannot remember what you called it or where it lives. Try gives all those experiments a single home folder and a fast fuzzy search interface so you can jump back to any of them in seconds.

When you type "try" followed by a keyword, it shows a list of matching directories ranked by how recently you used them and how closely the name matches your search. You can navigate the list with arrow keys and press enter to jump into the chosen directory. If no match exists, it creates a new one with today's date prepended to the name, so every experiment gets a timestamp automatically. You can also use it to clone a Git repository directly into a properly named dated folder, or to create a Git worktree off your current repository.

The whole tool is a single Ruby file with no external dependencies. Ruby comes preinstalled on macOS, and on other systems it is easy to add. Installation is either through RubyGems (one command), Homebrew, or by downloading the single file directly. After that you add one line to your shell config to enable the "try" command, and it works from any terminal session.

Configuration is minimal: you can set an environment variable to choose where your experiments live. The default is a folder called "tries" inside your home directory. The tool is released under the MIT license, so you can modify and redistribute it freely.