Skip to main content

Clone repos from an organization by languge used in the repo

Project description

Clone GitHub namespace

Clone an organization's repos.

Clone an organization's repos. Clone all repos in an organization or some by language used.

    $ clone-org -o kubernetes-client -p https -f ~/dev/kub-client-repos -l python,go

A common situation that folks find themselves in when starting to work with an organization is the ability to check out all the code and essentially familiarize themselves with the code base and even grep the code base looking for things. clone-org is designed to lessen the pain and give you a one-stop clone the organization toolkit. This module queries the GitHub graphql endpoint.

Clone-org uses the installed version of git on your machine and executes shell commands.

Currently, clone-org only supports GitHub and other cloud providers will be tested in the future.

For https remotes

You must have 'GITHUB_TOKEN' defined in your environment for the organization to be queried. The clone may be optionally either https or ssh

For ssh remotes

You must have your ssh keys set up in current shell.

Installing

    $ pip install clone-org

A Simple Example

    $ clone-org -o kubernetes-client -p https -f ~/dev/kub-client-repos

Help

    $ clone-org -h
usage: clone-org [-h] [-o ORGANIZATION] [-l LANGUAGES] [-p {https,ssh}]
                 [-f FOLDER] [-c] [-d] [-v]

Clone an organization's repos. A common situation that folks find themselves in when starting to work with an organization is the ability to check out all the code and essentially familiarize themselves with the code base and even grep the code base looking for things. clone-org is designed to lessen the pain and give you a one-stop clone the organization toolkit. This module queries the GitHub graphql endpoint.

Clone-org uses the installed version of git on your machine and executes shell commands.

Currently, clone-org only supports GitHub and other cloud providers will be tested in the future.

For https remotes

You must have 'GITHUB_TOKEN' defined in your environment for the organization to be queried. The clone may be optionally either https or ssh

For ssh remotes

You must have your ssh keys set up in current shell.

options:
  -h, --help            show this help message and exit
  -o ORGANIZATION, --organization ORGANIZATION
                        The organization in Github that you wish to clone all
                        the repositories for
  -l LANGUAGES, --languages LANGUAGES
                        Github classes languages with well known names such as
                        Python, Go, shell etc. You may pass a filter -l python
                        and it will compare it to the given primary language
                        assigned to the repo. Comma separated strings such as
                        python,java,javascript are also accepted. Names are
                        defined by github in the github/linguist repo.
  -p {https,ssh}, --protocol {https,ssh}
                        The protocol to use either https , which will require
                        GITHUB_TOKEN to be defined in your environment
                        variables. Or ssh which will require that you have
                        your ssh keys set up in current shell.
  -f FOLDER, --folder FOLDER
                        The target folder should be a fully qualified name and
                        the directory structures tested are OSx and Linux. An
                        example would be -f /home/Users/alice/dev/
  -c, --create          To create the target folder set this flag and the
                        directory structure will be created if possible An
                        example would be clone-org -o your_org_name -p https
                        -f ~/temp/my_repos -c
  -d, --dry-run         The user may simply wish to query the organization
                        before cloning. The dry run option will print out the
                        repositories in the organization specified and exit.
  -v, --version         Print version and exit

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

clone_org-1.0.5.tar.gz (77.7 kB view details)

Uploaded Source

Built Distribution

clone_org-1.0.5-py3-none-any.whl (81.0 kB view details)

Uploaded Python 3

File details

Details for the file clone_org-1.0.5.tar.gz.

File metadata

  • Download URL: clone_org-1.0.5.tar.gz
  • Upload date:
  • Size: 77.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.9.3-76060903-generic

File hashes

Hashes for clone_org-1.0.5.tar.gz
Algorithm Hash digest
SHA256 0bfcbfdc72352ac21dadd9592a31d668348e3c40bd39ec5d336c41cb26d8632c
MD5 235da8f8e82c9bf981a3a7ddddbb372c
BLAKE2b-256 27171968832b4033ca8fe70d3c40ff98e7107ea1c46c07d4835575f862dcfc65

See more details on using hashes here.

File details

Details for the file clone_org-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: clone_org-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 81.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.9.3-76060903-generic

File hashes

Hashes for clone_org-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 45eb6061a62135fb6531ac951a9c380b39f76216e55b6951159157a6c13e6a9f
MD5 ac2367ed65ccb3b9db67e0f672f1741a
BLAKE2b-256 9a7760cfec4514f4ac21db9eeb45651d097f6d6aecdf6a2a19b9f205f70ac45f

See more details on using hashes here.

Supported by

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