A simple tool to find git repositories in configured directories using fzf with tmux integration, and open them in tmux sessions.
Caution
THIS TOOL IS AI GENERATED
While I have tested it, read through the code and am using it myself, I do not guarantee anything about this tool. It seems to work quite well and appears like it is somewhat stable, but if it blows up, it blows up.
- Find Git Repositories: Searches configured directories for git repositories
- Interactive Selection: Uses fzf with tmux integration (
fzf --tmux) for selection - Session Management: Creates a new tmux session or switches to an existing one for the selected repository
bashtmuxfzfgit
Debian/Ubuntu:
sudo apt install tmux fzf gitArch Linux:
sudo pacman -S tmux fzf gitmacOS (Homebrew):
brew install tmux fzf git- Clone this repository or download the
tmux-git-finderscript - Make it executable:
chmod +x tmux-git-finder - Move it to a directory in your PATH, e.g.,
mv tmux-git-finder ~/.local/bin/
Copy the example config file to your config directory:
mkdir -p ~/.config/tmux-git-finder
cp config.example ~/.config/tmux-git-finder/configThen edit the config file to customize your settings.
# Directories to search for git repositories
SEARCH_PATHS=("$HOME/projects" "$HOME/work")
# Maximum depth to search for repositories (default: 3)
MAX_DEPTH=3tmux-git-finderThis will:
- Find all git repositories in configured directories
- Present an fzf selection interface (in tmux popup)
- On selection, create a new tmux session or switch to an existing one
tmux-git-finder --listLists all found git repositories without opening them.
tmux-git-finder --helpAdd to your ~/.tmux.conf:
bind-key g display-popup -E -w 80% -h 60% "tmux-git-finder"Now press prefix + g to launch the finder in a popup.
Add to your ~/.bashrc or ~/.zshrc:
alias tgf='tmux-git-finder'MIT License - see LICENSE file for details