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.3.tar.gz (123.6 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.3-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for git_fork_recon-0.1.3.tar.gz
Algorithm Hash digest
SHA256 58c2dad2015ac6b0bd3b441e6a0af9b41076f8efa79ceec012597843223415ca
MD5 08513f4ab3621ce1f1541e990e5fa215
BLAKE2b-256 c092cebc1c19b6b52be69827dcefe19c027accb640cfd43d17c86f1d37db962c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_fork_recon-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48d08a3895e511bb1d6dc4f1897f1a33b10f33ef1219dcecc0cdb3979f040fee
MD5 c8c1c13a1d8b0875b0fe9c5d96460c7b
BLAKE2b-256 413c5b938771c57a0c76d3c805b771d2f195bc64bc567146ff506d50e5815e17

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