Skip to main content

CLI tool to find git repositories.

Project description

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.

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

find-git-repos-1.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

find_git_repos-1.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: find-git-repos-1.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for find-git-repos-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ec6d1fe1081597caa0140d515bc9bf05ee9cabfd4c12475b0a5e1c09d43c2c56
MD5 72c400053f8af8c81391aa0bf51f6d55
BLAKE2b-256 3e1e22cc52d20c1a457e499c6e2487e1f251de04862f909808ad20cbd72eb337

See more details on using hashes here.

File details

Details for the file find_git_repos-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: find_git_repos-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for find_git_repos-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dee8370249cb86145a8a4bdb554ae0b3368a5d04594479d5d1320946fe9e748
MD5 de5cff5eb0c621a5bb60af4273e410e5
BLAKE2b-256 fea9bb37ba092500fe9c163c0b3dde9edc318dcd04d047c21aaee8c75b5c6f0c

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