Skip to main content

find-git-repos

A simple CLI tool for finding git repositories.

Installation

pip install find-git-repos

You may wish to install using pipx, which manages a virtual environment for find-git-packages for you.

Usage

find-git-repos will search recursively in the current directory for git repositories when invoked with no arguments:

find-git-repos

Alternatively, you can pass a directory to search:

find-git-repos ~/src

I created this tool to aid navigating between repositories on my computer. I organise respostories in subdirectories corresponding to their HTTPS/SSH URLs on GitHub, Bitbucket and GitLab, e.g.:

  • ~/src/github.com/acroz/pylivy

  • ~/src/bitbucket.org/acroz/other-repo

  • ~/src/gitlab.com/organisation/group/subgroup/repo

To facilitate switching between repos quickly, I define a zsh function in my .zshrc shell configuration file that pipes the output of find-git-repos to fzy for fuzzy matching.

function repo {
    initial_query=$1
    dest=$(find-git-repos ~/src | fzy -q "$initial_query" -l 20) && cd "$HOME/src/$dest"
}

When I need to switch to a repo, I run repo in my shell, type enough of the name to match the repo name, then hit enter to exit fzy and switch to the selected repo.

Metadata

Release files for find-git-repos 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for find-git-repos 1.1.0
File Size Uploaded
find-git-repos-1.1.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for find-git-repos 1.1.0
File Interpreter ABI Platform
find_git_repos-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / find-git-repos-1.1.0.tar.gz

Download URL find-git-repos-1.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ec6d1fe1081597caa0140d515bc9bf05ee9cabfd4c12475b0a5e1c09d43c2c56
BLAKE2b-256 checksum
How to use checksums
3e1e22cc52d20c1a457e499c6e2487e1f251de04862f909808ad20cbd72eb337
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release files / find_git_repos-1.1.0-py3-none-any.whl

Download URL find_git_repos-1.1.0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dee8370249cb86145a8a4bdb554ae0b3368a5d04594479d5d1320946fe9e748
BLAKE2b-256 checksum
How to use checksums
fea9bb37ba092500fe9c163c0b3dde9edc318dcd04d047c21aaee8c75b5c6f0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page