Skip to main content

Analyse the network of forked git repositories

Project description

Git fork recon

Analyse the network of forked git repositories, summarise changes and innovations in forked repositories.

Features

  • Intelligent analysis of fork networks using LLM-powered summaries
  • Filters and prioritizes forks based on number of commits ahead of parent, starts, recent activity, PRs. Ignores forks with no changes.
  • Local caching of git repositories and forks as remotes
  • Detailed Markdown reports with:
    • Repository overview
    • Analysis of significant forks
    • Commit details and statistics
    • Links to GitHub commits and repositories
    • Overall summary of changes and innovations highlighting the most interesting forks

Installation

pip install git-fork-recon

Installation (development)

Using uv (recommended):

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create and activate a new virtual environment (optional but recommended)
uv venv
source .venv/bin/activate

# Install the package in editable mode
uv pip install -e .

Configuration

The following environment variables are required (can be provided via .env file):

  • GITHUB_TOKEN: GitHub API token for (public read-only) repository metadata access
  • OPENROUTER_API_KEY or OPENAI_API_KEY: API key for an OpenAI-compatible LLM provider
  • CACHE_DIR (optional): Directory for caching repository data (defaults to ~/.cache/git-fork-recon)

Running

# Activate the virtual environment if you haven't already
# source .venv/bin/activate

git-fork-recon https://github.com/martinpacesa/BindCraft

Output is generated as {username}-{repo}-forks.md by default (use -o to specify a different file name, -o - to print to stdout).

Options

$ git-fork-recon --help
                                                                                                          
 Usage: git-fork-recon [OPTIONS] REPO_URL                                                                               
                                                                                                                        
 Analyze a GitHub repository's fork network and generate a summary report.                                              
                                                                                                                        
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    repo_url      TEXT  URL of the GitHub repository to analyze [default: None] [required]                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --output              -o      PATH     Output file path (defaults to {repo_name}-forks.md) [default: None]           │
│ --active-within               TEXT     Only consider forks with activity within this time period (e.g. '1 hour', '2  │
│                                        days', '6 months', '1 year')                                                  │
│                                        [default: None]                                                               │
│ --env-file                    PATH     Path to .env file [default: None]                                             │
│ --model                       TEXT     OpenRouter model to use (overrides MODEL env var) [default: None]             │
│ --context-length              INTEGER  Override model context length (overrides CONTEXT_LENGTH env var)              │
│                                        [default: None]                                                               │
│ --api-base-url                TEXT     OpenAI-compatible API base URL [default: None]                                │
│ --api-key-env-var             TEXT     Environment variable containing the API key [default: None]                   │
│ --parallel            -p      INTEGER  Number of parallel requests [default: 5]                                      │
│ --verbose             -v               Enable verbose logging                                                        │
│ --clear-cache                          Clear cached repository data before analysis                                  │
│ --max-forks                   INTEGER  Maximum number of forks to analyze after ranking [default: None]              │
│ --install-completion                   Install completion for the current shell.                                     │
│ --show-completion                      Show completion for the current shell, to copy it or customize the            │
│                                        installation.                                                                 │
│ --help                                 Show this message and exit.                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Running with Docker

Build the image:

docker build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) -t git-fork-recon .

Run the analysis (replace the repository URL with your target):

# Create cache directory with correct permissions
mkdir -p "${HOME}/.cache/git-fork-recon"

docker run --rm \
  -v "$(pwd):/app" \
  -v "${HOME}/.cache/git-fork-recon:/app/.cache" \
  --env-file .env \
  --user "$(id -u):$(id -g)" \
  git-fork-recon \
  "https://github.com/martinpacesa/BindCraft"

See also

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

git_fork_recon-0.1.2.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

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

git_fork_recon-0.1.2-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file git_fork_recon-0.1.2.tar.gz.

File metadata

  • Download URL: git_fork_recon-0.1.2.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.4

File hashes

Hashes for git_fork_recon-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a37b92ee36d8084b846e5dd871d1fe7cb77d697106151b1a750754c83596eb4f
MD5 c614c44468a962b438bb082a5add4e17
BLAKE2b-256 6670ab37d2674e8cb64731a091efb484276bd271674a065e25e8fe5a34ed48d4

See more details on using hashes here.

File details

Details for the file git_fork_recon-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for git_fork_recon-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d2800472a8e5cface26cd29968f969a9421caebca1fcaf3f1c619a0e4d6d80c
MD5 caed465448233fef80f1329bcbc375c2
BLAKE2b-256 b4b14a97eba62a8171f74f327d50f555ce2fb22ed8333eefcf7fdcb88ddc06dd

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