{"id":13617704,"url":"https://github.com/mgedmin/ghcloneall","last_synced_at":"2025-08-04T16:44:50.107Z","repository":{"id":44159053,"uuid":"45742324","full_name":"mgedmin/ghcloneall","owner":"mgedmin","description":"Script to clone/update all user/organization repos from GitHub","archived":false,"fork":false,"pushed_at":"2025-01-20T12:25:59.000Z","size":173,"stargazers_count":37,"open_issues_count":4,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T11:08:21.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ghcloneall","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgedmin.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"mgedmin"}},"created_at":"2015-11-07T15:38:55.000Z","updated_at":"2025-02-01T00:33:07.000Z","dependencies_parsed_at":"2023-01-25T02:45:12.197Z","dependency_job_id":"ac5fa844-958d-46da-981f-4fbcd3243253","html_url":"https://github.com/mgedmin/ghcloneall","commit_stats":{"total_commits":209,"total_committers":5,"mean_commits":41.8,"dds":0.08133971291866027,"last_synced_commit":"091ec61bda6f29eaeede6b6a5b5c8515461d9dd4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgedmin%2Fghcloneall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgedmin%2Fghcloneall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgedmin%2Fghcloneall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgedmin%2Fghcloneall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgedmin","download_url":"https://codeload.github.com/mgedmin/ghcloneall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:46.559Z","updated_at":"2025-04-07T12:06:45.475Z","avatar_url":"https://github.com/mgedmin.png","language":"Python","funding_links":["https://ko-fi.com/mgedmin"],"categories":["Python"],"sub_categories":[],"readme":"ghcloneall\n==========\n\n.. image:: https://github.com/mgedmin/ghcloneall/actions/workflows/build.yml/badge.svg?branch=master\n    :target: https://github.com/mgedmin/ghcloneall/actions\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/mgedmin/ghcloneall?branch=master\u0026svg=true\n    :target: https://ci.appveyor.com/project/mgedmin/ghcloneall\n\n\nIt's a script to clone/update all repos for a user/organization from GitHub.\n\nTarget audience: maintainers of large collections of projects (for example,\nZopeFoundation members).\n\n\nUsage examples\n--------------\n\nFirst ``pip install ghcloneall``.\n\nClone all mgedmin's vim plugins::\n\n    mkdir ~/src/vim-plugins\n    cd ~/src/vim-plugins\n    ghcloneall --init --user mgedmin --pattern '*.vim'\n    ghcloneall\n\nClone all mgedmin's gists::\n\n    mkdir ~/src/gists\n    cd ~/src/gists\n    ghcloneall --init --user mgedmin --gists\n    ghcloneall\n\nClone all ZopeFoundation repositories::\n\n    mkdir ~/src/zf\n    cd ~/src/zf\n    ghcloneall --init --org ZopeFoundation\n    ghcloneall\n\nHere's a screencast of the above (running a slightly older version so the\nscript name differs):\n\n.. image:: https://asciinema.org/a/29651.png\n   :alt: asciicast\n   :width: 582\n   :height: 380\n   :align: center\n   :target: https://asciinema.org/a/29651\n\n\nDetails\n-------\n\nWhat it does:\n\n- clones repositories you don't have locally\n- pulls changes for repositories you already have locally\n- warns you about local changes and other unexpected situations:\n\n  - unknown files in the tree (in --verbose mode only)\n  - staged but not committed changes\n  - uncommitted (and unstaged changes)\n  - non-default branch checked out\n  - committed changes that haven't been pushed to default branch\n  - remote URL pointing to an unexpected location (in --verbose mode only)\n\nYou can ask it to not change any files on disk and just look for pending\nchanges by running ``ghcloneall --dry-run``.  This will also make the\ncheck faster!\n\n\nSynopsis\n--------\n\n.. [[[cog\n..   import cog, subprocess, textwrap, os\n..   os.environ['COLUMNS'] = '80'  # consistent line wrapping\n..   helptext = subprocess.run(['ghcloneall', '--help'],\n..                             capture_output=True, text=True).stdout\n..   cog.outl('\\nOther command-line options::\\n')\n..   cog.outl('    $ ghcloneall --help')\n..   cog.outl(textwrap.indent(helptext, '    '))\n.. ]]]\n\nOther command-line options::\n\n    $ ghcloneall --help\n    usage: ghcloneall [-h] [--version] [-c CONCURRENCY] [-n] [-q] [-v]\n                      [--start-from REPO] [--organization ORGANIZATION]\n                      [--user USER] [--github-token GITHUB_TOKEN] [--gists]\n                      [--repositories] [--pattern PATTERN] [--include-forks]\n                      [--exclude-forks] [--include-archived] [--exclude-archived]\n                      [--include-private] [--exclude-private] [--include-disabled]\n                      [--exclude-disabled] [--init] [--http-cache DBNAME]\n                      [--no-http-cache]\n\n    Clone/update all user/org repositories from GitHub.\n\n    options:\n      -h, --help            show this help message and exit\n      --version             show program's version number and exit\n      -c CONCURRENCY, --concurrency CONCURRENCY\n                            set concurrency level (default: 4)\n      -n, --dry-run         don't pull/clone, just print what would be done\n      -q, --quiet           terser output\n      -v, --verbose         perform additional checks\n      --start-from REPO     skip all repositories that come before REPO\n                            alphabetically\n      --organization ORGANIZATION\n                            specify the GitHub organization\n      --user USER           specify the GitHub user\n      --github-token GITHUB_TOKEN\n                            specify the GitHub token\n      --gists               clone user's gists\n      --repositories        clone user's or organisation's repositories (default)\n      --pattern PATTERN     specify repository name glob pattern to filter\n      --include-forks       include repositories forked from other users/orgs\n      --exclude-forks       exclude repositories forked from other users/orgs\n                            (default)\n      --include-archived    include archived repositories\n      --exclude-archived    exclude archived repositories (default)\n      --include-private     include private repositories (default when a github\n                            token is provided)\n      --exclude-private     exclude private repositories\n      --include-disabled    include disabled repositories (default)\n      --exclude-disabled    exclude disabled repositories\n      --init                create a .ghcloneallrc from command-line arguments\n      --http-cache DBNAME   cache HTTP requests on disk in an sqlite database for\n                            5 minutes (default: .httpcache)\n      --no-http-cache       disable HTTP disk caching\n\n.. [[[end]]]\n\n\nConfiguration file\n------------------\n\nThe script looks for ``.ghcloneallrc`` in the current working directory, which\nshould look like this::\n\n    [ghcloneall]\n    # Provide either github_user or github_org, but not both\n    # github_org = ZopeFoundation\n    github_user = mgedmin\n    pattern = *.vim\n    # Provide github token for authentication\n    # github_token = \u003cmy-github-token\u003e\n    # You can also uncomment and change these if you wish\n    # gists = False\n    # include_forks = False\n    # include_archived = False\n    # Listing private repositories requires a valid github_token\n    # include_private = True\n    # include_disabled = True\n\nYou can create one with ``ghcloneall --init --{user,org} X [--pattern Y]\n[--{include,exclude}-{forks,archived,private,disabled}] [--gists|--repos]``.\n\n\nTips\n----\n\nFor best results configure SSH persistence to speed up git pulls -- in your\n``~/.ssh/config``::\n\n    Host github.com\n    ControlMaster auto\n    ControlPersist yes\n    ControlPath ~/.ssh/control-%r@%h-%p\n\nIt takes about 80 seconds to run ``git pull`` on all 382 ZopeFoundation\nrepos on my laptop with this kind of setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgedmin%2Fghcloneall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgedmin%2Fghcloneall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgedmin%2Fghcloneall/lists"}