Skip to main content

Fork or sync a repo, or clone a user or org on GitHub to GitHub

Project description

superfork

Release Build status License

Fork or sync a repo or user/organization's repos on GitHub to GitHub

Features

  • From the command line, you want to fork a repo to a account you control on GitHub

Let's say your GitHub username is mona and you want to fork the repo willf/superfork to your account

uv run superfork mona willf/superfork
  • From the command line, you want to sync or fork all of the repos of a user or organization to an account you control on GitHub

Let's say your GitHub username is mona and you want to sync all of the repos of the user willf to your account

uv run superfork mona willf

You can specify multiple users or organizations to sync

uv run superfork mona willf willf2 willf/superfork

Note: To avoid overwhelming GitHub (and thus hitting API limits), this program will only attempt to fork a repo every 30 seconds. If you are syncing a large number of repos, it may take a while to complete.

THe command has the following options:

  • --sync: Sync when repository already exists (default)
  • --no-sync: Don't sync when repository already exists
  • --include-private: Include private repositories (of course, you need to be able to access the private repos)
  • --include-forks: Include repositories which were originally forked (default: don't include)
  • --include-dot-github: Include .github repository if found (default: don't include)
  • --dry-run: Don't actually do anything, but check status of repositories
  • --without-sleeping: Don't sleep between requests (default: sleep 30 seconds between fork requests)

Only use --without-sleeping if you just have a few forks to do, otherwise you may hit GitHub (undocumented) API limits.

Installation

  1. Install uv
  2. Clone this repo
  3. Change to the repo directory

Currently, you need to run the command from the repo directory

$ cd superfork
$ uv run superfork --help
Usage: superfork [OPTIONS] TO [SOURCE]...

  [TO]: destination user or organization

  [SOURCE]: source user or organization, or repository (one or more)

  A valid GITHUB_TOKEN must be set in the environment, or in a .env file in
  the current directory, or in a .env file in the user's home directory.

  To get a GITHUB_TOKEN, see https://docs.github.com/en/authentication

Options:
  --sync / --no-sync    Sync when repository already exists  [default: sync]
  --include-private     Include private repositories
  --include-forks       Include repositories which were originally forked
  --include-dot-github  Include .github repository if found
  --dry-run             Don't actually do anything, but check status of repositories
  --without-sleeping    Don't sleep between requests
  --help                Show this message 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

superfork-0.0.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superfork-0.0.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file superfork-0.0.2.tar.gz.

File metadata

  • Download URL: superfork-0.0.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for superfork-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a22a8ff5fa9b10f1dc16c56d93e0d26822c0ffe5c50014078eb723240f8c6a6f
MD5 a5b598864f0718f663386df857ab43c4
BLAKE2b-256 9b55b51abc57658031b327029be6103d8394b778adaac6f214803a7549f25144

See more details on using hashes here.

File details

Details for the file superfork-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: superfork-0.0.2-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.0

File hashes

Hashes for superfork-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e4e29717b3faf4500868e6c4b3a1051c4a5cde48af32d35030585db2c2c6e1c
MD5 a9655e811a44b4e618107ae4886a2693
BLAKE2b-256 4dd66cfd565f554f9e908273531fd2bcbdb15c6b9b87b35e91ed1cd3839eefcd

See more details on using hashes here.

Supported by

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