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.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_find_repos-2.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file git_find_repos-2.1.1.tar.gz.

File metadata

  • Download URL: git_find_repos-2.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for git_find_repos-2.1.1.tar.gz
Algorithm Hash digest
SHA256 7d4d1b90f33d8e68d78af38b310beafbc2e0bb604ded0cfb92dbb5b5178d5334
MD5 b795afb4c1972282a48904160905d141
BLAKE2b-256 15e0382cc2db030fb19c0c600dab8cb58d6d5ddf6b666b019d07ceb1394e4407

See more details on using hashes here.

File details

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

File metadata

  • Download URL: git_find_repos-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for git_find_repos-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a16bfeab636df32d639f39fbf95bb5fadf29e2f9b59a812687e344c00bb3826
MD5 3725f3a49d87a7a1f55c012c26e380a7
BLAKE2b-256 351285ecb8ed07888be2bf0414299345ffb7aa40a3dbef88f0df3502bad6988d

See more details on using hashes here.

Supported by

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