Skip to main content

CLI tool to find git repositories.

Project description

A simple CLI tool for finding git repositories.

Installation

pip install git-find-repos

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

Usage

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

git-find-repos

Alternatively, you can run git-find-repos as if it were a subcommand of git:

git find-repos

You can also pass a directory to search:

git find-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 git-find-repos to fzy for fuzzy matching.

function repo {
    initial_query=$1
    dest=$(git-find-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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-find-repos-2.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

git_find_repos-2.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file git-find-repos-2.1.0.tar.gz.

File metadata

  • Download URL: git-find-repos-2.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for git-find-repos-2.1.0.tar.gz
Algorithm Hash digest
SHA256 197ccf00ac9e5bd999d23bfd3d14a38f148f1a1919c88bfec316e2e330202ee2
MD5 2b35035a1c766b95e3811aae53d1a8d5
BLAKE2b-256 8055b93741dcd4d53521b774543b2d117ee785cb950a5a2f86b51fae1b87ed93

See more details on using hashes here.

File details

Details for the file git_find_repos-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: git_find_repos-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for git_find_repos-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c433117c8ae44cd61053cf15306fdc2224b086ea4fd56a58a958b093ab3d6084
MD5 0647b2856526b71fc690945450e34ec8
BLAKE2b-256 b94fb63b01a6ac7d490b959e31d06d9df692a56e40dc2241b6fbadecb357ea1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page