• Stars
    star
    185
  • Rank 207,072 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A powerful tool to concurrently clone, pull, or fork user and org repos and gists to create a GitHub archive.

GitHub Archive

A powerful tool to concurrently clone, pull, or fork user and org repos and gists to create a GitHub archive.

Build Status Coverage Status PyPi Licence

Showcase

GitHub Archive is a powerful tool to concurrently clone, pull, or fork repositories or gists from GitHub with incredible flexibility. It's the perfect tool for spinning up a new dev environment, keeping a local copy of your GitHub instance, or quickly pulling in projects from your favorite users and organizations.

The power of GitHub Archive comes in its configuration. Maybe you only want to clone or pull your personal public repos or maybe you want to go all out and include private repos from you and all organizations you belong to along with your gists. GitHub Archive can do it all.

Install

# Install tool
pip3 install github-archive

# Install locally
just install

Usage

Usage:
    github-archive --users justintime50 --clone

Options:
    -h, --help            show this help message and exit
    -t TOKEN, --token TOKEN
                            Provide your GitHub token to authenticate with the GitHub API and gain access to private repos and gists.
    -u USERS, --users USERS
                            Pass a comma separated list of users to get repos for.
    -o ORGS, --orgs ORGS  Pass a comma separated list of orgs to get repos for.
    -g GISTS, --gists GISTS
                            Pass a comma separated list of users to get gists for.
    -s STARS, --stars STARS
                            Pass a comma separated list of users to get starred repos for.
    -v, --view            Pass this flag to view git assets (dry run).
    -c, --clone           Pass this flag to clone git assets.
    -p, --pull            Pass this flag to pull git assets.
    -f, --fork            Pass this flag to fork git assets.
    --include INCLUDE     Pass a comma separated list of repos to filter what is included in the Archive.
    --exclude EXCLUDE     Pass a comma separated list of repos to filter what is excluded from the Archive.
    --forks               Pass this flag to include forked git assets (when cloning or pulling).
    --location LOCATION   The location where you want your GitHub Archive to be stored. Default: /Users/USERNAME/github-archive
    --https               Use HTTPS URLs instead of SSH.
    --timeout TIMEOUT     The number of seconds before a git operation times out. Default: 300
    --threads THREADS     The number of concurrent threads to run. Default: 10
    --base_url BASE_URL   The base URL of your GitHub instance (useful for enterprise users with custom hostnames). Default: https://api.github.com
    --log_level {error,critical,warning,info,debug}
                            The log level used for the tool. Default: info

Automating SSH Passphrase Prompt (Recommended)

To allow the script to run continuosly without requiring your SSH passphrase, you'll need to add your passphrase to the SSH agent. NOTE: Your SSH passphrase will be unloaded upon logout.

# This assumes you've saved your SSH keys to the default location
ssh-add

Notes

SSH Key: By default, you must have an SSH key generated on your local machine and added to your GitHub account as this tool uses the ssh_url to clone/pull. If you'd like to instead use the git_url to clone/pull, you can pass the --https flag which currently requires no authentication. Without using a token/SSH, you will not be able to interact with private git assets. Additionally, GitHub has a hard limit of 60 requests per hour - using the --https option may quickly burn through that unauthenticated limit if you have a large GitHub instance to archive.

Merge Conflicts: Be aware that using GitHub Archive could lead to merge conflicts if you do not commit or stash your changes if using these repos as active development repos instead of simply an archive or one-time clone.

Access: GitHub Archive can only clone or pull git assets that the authenticated user has access to. This means that private repos from another user or org that you don't have access to will not be able to be cloned or pulled.

Development

# Get a comprehensive list of development tools
just --list

# Run the tool locally
venv/bin/python github_archive/cli.py --help

More Repositories

1

python-template

A Python project template to save you time and energy.
Python
78
star
2

homebrew-releaser

Release scripts, binaries, and executables directly to Homebrew via GitHub Actions.
Python
42
star
3

easypost-tools-ui

Create shipping labels, track, insure, and refund packages all from a simple UI.
PHP
25
star
4

pip-tree

Get the dependency tree of your Python virtual environment via Pip.
Python
19
star
5

algorithms

Classic algorithms including Fizz Buzz, Bubble Sort, the Fibonacci Sequence, a Sudoku solver, and more.
Python
16
star
6

diff-tool

Display a diff between two files in HTML.
Python
14
star
7

glass

Minimalist blog featuring syntax highlighting, images, comments, themes, RSS, and SEO out of the box.
PHP
12
star
8

harvey

The lightweight Docker Compose deployment runner.
Python
12
star
9

dad-node

Dummy Address Data (DAD) - Retrieve real addresses from all around the world. (Node Client Library)
JavaScript
10
star
10

os-scripting

A collection of macOS, Linux, Windows, and other operating system scripts that can be used to automate deploying and administering computers.
Shell
10
star
11

github-dark-vscode-emacs-theme

The GitHub Dark Theme from Visual Studio Code ported to Emacs.
Emacs Lisp
10
star
12

alchemist

Update, backup, and administer your Homebrew or Chocolatey instance.
Go
8
star
13

Justintime50

The GitHub README for Justintime50.
8
star
14

pretty-tables

Create pretty tables from headers and rows, perfect for console output.
Python
7
star
15

easypost-tools

A large collection of supplemental tools for the EasyPost API spanning various programming languages.
Python
7
star
16

pullbug

Get bugged via Discord or Slack to merge your GitHub pull requests or close open issues.
Python
5
star
17

nginx-php-docker

A lightweight combined Nginx/PHP-FPM Docker image.
Dockerfile
5
star
18

proxlist

Retrieve free, open-source proxy servers.
Python
5
star
19

labelary

Create PDF's or PNG's from ZPL labels via the Labelary API on the CLI.
JavaScript
5
star
20

pineapple

CSS and Javascript web development library that supplements Bootstrap.
JavaScript
5
star
21

easypost-cli

The EasyPost API on the CLI.
Shell
4
star
22

adventofcode

An advent calendar of coding challenges.
Python
4
star
23

build-project

Boilerplate setup for all your favorite languages and frameworks.
JavaScript
4
star
24

srvinfra

srvinfra is a tool to deploy, update, and maintain services and websites on a server hosted by Docker.
Shell
4
star
25

dots

The simple, flexible, Dotfile manager.
Shell
4
star
26

styles

A collection of style guides and best practices used for my projects and teams.
3
star
27

onepass

1Password CLI wrapper for easy credential retrieval.
Shell
3
star
28

burn-notice

Returning a machine to IT, got let go, or got burned? Delete your data with one command.
Shell
3
star
29

woodchips

The cutest little logger you've ever seen.
Python
3
star
30

forks-sync

Keep all your git forks up to date with the remote default branch.
Python
3
star
31

dad

Dummy Address Data (DAD) - Real addresses from all around the world.
JavaScript
3
star
32

laravel-template

A Laravel project template to save you time and energy.
Just
2
star
33

.github

Default GitHub Community Health Files for all my projects.
2
star
34

justinpaulhammond

My personal website.
PHP
2
star
35

service-stats

Service serves savvy server stats.
Python
2
star
36

dotfiles

My personal dotfiles managed via Dots.
Shell
2
star
37

myelpa

Personal ELPA mirror of installed Emacs packages.
2
star
38

homebrew-formulas

My personal Homebrew tap housing formulas for all my Homebrew projects.
Ruby
2
star
39

mockcmd

Mocks the "exec.Command" interface in Golang.
Go
1
star
40

clienv

Source your environment variables from .env when running CLI commands.
Shell
1
star
41

SwiftSystemSounds

A library of iOS system sounds for Swift packages.
Swift
1
star
42

humble-pi

A collection of Raspberry Pi projects.
Python
1
star
43

roverio

Rover IO is a suite of tools that traverses your directories and performs IO file operations.
Python
1
star
44

crazy-color-clash-site

The website for the Crazy Color Clash iOS game.
1
star
45

zpl-print

Print a ZPL label from a web interface.
PHP
1
star
46

linguist-breakdown

View the language breakdown of your entire GitHub account.
Python
1
star
47

harvey-ui

The UI for the the lightweight Docker Compose deployment platform - Harvey.
PHP
1
star
48

apache-php-docker

A combined Apache/PHP Docker image.
Dockerfile
1
star
49

java-checkstyle-action

Run Java Checkstyle in a command line context via GitHub Actions.
Shell
1
star
50

playground

Here lies scripts, tools, and snippets that don't yet warrant their own repo but are worth storing and sharing for future use, reference, or because they don't belong anywhere else.
Python
1
star
51

website-archive

A collection of projects from early in my web developer career.
PHP
1
star
52

vcrpy-bincon

Convert binary Python VCR cassette responses to human-readable strings.
Python
1
star
53

secure-browser-kiosk

Restart Chrome in incognito mode by prompting the user if they need more time.
Shell
1
star