Skip to content

MohamedHamed19m/gh-bridge

Repository files navigation

🌉 gh-bridge

A robust, Pythonic wrapper around the GitHub CLI (gh), engineered specifically for AI Agents (like Claude, Gemini, and GPT) and high-automation environments.

Tests Python Version Managed by uv

gh-bridge Architecture

🎯 Why gh-bridge?

In many Enterprise environments, security policies often restrict Personal Access Tokens. gh-bridge solves this by acting as a Pythonic wrapper for the GitHub CLI (gh), leveraging your existing authenticated CLI session to navigate SAML/SSO requirements seamlessly.

  • SAML/SSO Compatibility: Inherits your browser-based SSO session.
  • Zero Credential Management: Uses the local system's secure credential store.
  • AI-Native Output: Parses CLI output into structured JSON/TOON for LLM context windows.

🛠️ Key Features

  • 📊 Branch Analytics: Analyze activity and health metrics.
  • 🔍 Feature Tracer: Search logic across multiple repositories.
  • 🤖 PR Review: Automated review suggestions and summaries.
  • 👤 User Activity: Trace a developer's recent progress and intent.
  • 📂 Repo Contextualizer: "Big Picture" view for AI agents.

🚀 Quick Start

Prerequisites

  1. GitHub CLI installed and authenticated (gh auth login).
  2. uv installed.

Installation

git clone https://github.com/MohamedHamed19m/gh-bridge
cd gh-bridge
uv sync --all-extras

📖 Documentation

Detailed usage guides are available for both CLI and Library users:

🏗️ Project Structure

src/gh_wrapper/
├── cli/            # CLI implementation (Typer)
├── core/           # Core framework (Executor, Cache)
├── commands/       # Low-level API Wrappers
├── features/       # High-level logic (Tracer, Analytics)
└── models/         # Pydantic data models

🧪 Testing

# Run all tests (requires authenticated gh CLI)
$env:RUN_INTEGRATION_TESTS='1'; uv run pytest

🤝 Contributing

Contributions are welcome! Please ensure all PRs pass the ruff linting and mypy type checks.

Created by MohamedHamed19m

About

A Pythonic GitHub CLI wrapper for AI Agents. Simplifies PR reviews, repository tracing, and context gathering for LLMs (Claude, GPT, Gemini). Supports SAML/SSO.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages