GithubHelp home page GithubHelp logo

bculberson / bulkclone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbarratt/bulkclone

0.0 1.0 0.0 345 KB

Go CLI tool to clone an organization's repositories in bulk (using the Github API)

Go 100.00%

bulkclone's Introduction

BulkClone

Simple go tool to that, given an org name, makes a shallow clone all the repositories inside it.

This can be useful if you're exploring an organization's codebase, for doing backups, or ... probably other things? I wrote this joining a new company and wanting to look at languages/style choices in some depth.

This includes any repos for an organization you have access to (public or private).

Requires

  • GITHUB_TOKEN env var to be set

  • org name on the cli

  • path to clone into (will be created if needed)

    ./bulkclone yourorg ~/work/clones/yourorg

It will try and detect already-cloned repositories and skip them, so you can run it periodically to fetch fresh repos.

Getting a token

  1. Go to the github token page
  2. Click 'Generate new Token'
  3. Check the first box (repo Full control of private repositories)
  4. Store the token somewhere secure (maybe your 1Password or LastPass vault?)
  5. Set the GITHUB_TOKEN environment variable

Future improvements

To be fair, I just wrote this to fill a need, and probably won't hack on it further. The hacky CLI versions of this tool don't work with high repo counts.

But if it almost-works for you, PR's welcome!

Some things that could be improved:

  • Optional/flagged deep vs shallow cloning
  • Parallelism of clones (right now it's one at a time, github can probably handle a bit more read i/o)
  • Overall progress indication ("repo 12 of 27...")

bulkclone's People

Contributors

jbarratt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.