Archive public Git Repos and Gists from GitHub
Project description
githubtakeout
Archive Git Repos and Gists from GitHub
- Copyright (c) 2015-2025 Corey Goldberg
- License: MIT
- Development: GitHub
- Download/Install: PyPI
About:
githubtakeout is a data export tool for archiving Git repositories hosted on GitHub.
It clones a user's repos and creates an archive of each.
It supports public/private repos and public/secret gists. By default, it doesn't save
commit history or branches (.git directory), or Gist repositories (both can be enabled
with command line options).
When you run the program, archives of your repos will be saved in a directory named
backups inside your current working directory, unless a different location is specified
using the --dir option.
Archives are saved in compressed zip format (.zip) by default, but can also be saved
as tarballs (.tar.gz) using the --format=tar option.
Requirements:
- Python 3.12+
- Git 1.7+
- Python packages:
- GitPython
- PyGithub
Installation:
Install from PyPI:
pip install githubtakeout
Authentication:
By default, githubtakeout will only retrieve an account's public repos. To access
private repos and secret gists, you need to authenticate.
First, you must create a personal access token
on Github (either a fine-grained or classic personal access token). Once you have a token, you can set the GITHUB_TOKEN environment variable:
$ export GITHUB_TOKEN=<auth token created on GitHub>
If you prefer to be prompted for your token each time you run the program, use the --token argument.
CLI Options:
usage: githubtakeout [-h] [--dir DIR] [--format FORMAT] [--gists] [--history] [--list] [--token] username
positional arguments:
username GitHub username
options:
-h, --help show this help message and exit
--dir DIR output directory
--format FORMAT archive format (tar, zip)
--gists include gists
--history include commit history and branches (.git directory)
--list list repos only
--token prompt for auth toke
Usage Examples:
Install from PyPI with pipx, Run:
pipx install githubtakeout
githubtakeout <github username>
Create/Activate Virtual Environment, Install from PyPI, Run:
python3 -m venv venv
source venv/bin/activate
pip install githubtakeout
githubtakeout <github username>
Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:
git clone git@github.com:cgoldberg/githubtakeout.git
cd ./githubtakeout
python3 -m venv venv
source venv/bin/activate
pip install .
githubtakeout <github username>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file githubtakeout-0.1.6.tar.gz.
File metadata
- Download URL: githubtakeout-0.1.6.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d3f82daa96ad0369bf56e263c849e729200d2b76164dfe13fc72925fbd458d0
|
|
| MD5 |
7ea7f6f1cbedbbc00d74da7dc392b3f2
|
|
| BLAKE2b-256 |
4cd069313f9240f26ec140daadcac77deb014b6bf1fbde2c3f6d5cf057c31222
|
File details
Details for the file githubtakeout-0.1.6-py3-none-any.whl.
File metadata
- Download URL: githubtakeout-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec03763d395c6aed42df0753931f3924aacb924aecd5f9531a46bcb5fe3b107
|
|
| MD5 |
74f46d6ca87d6b9a9c7bae5ca4738350
|
|
| BLAKE2b-256 |
a0440d3078901db3e2bc8fbbdbd8ce23557d22e8de3c5f710d2abaf178c6ac07
|