A robust, Pythonic wrapper around the GitHub CLI (gh), engineered specifically for AI Agents (like Claude, Gemini, and GPT) and high-automation environments.
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.
- 📊 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.
- GitHub CLI installed and authenticated (
gh auth login). - uv installed.
git clone https://github.com/MohamedHamed19m/gh-bridge
cd gh-bridge
uv sync --all-extrasDetailed usage guides are available for both CLI and Library users:
- 💻 CLI Usage Guide: How to use the
gh-bridgecommand-line interface. - 🐍 Python API Guide: How to integrate
gh-bridgeinto your Python projects. - 🎨 Visual Demos: Run interactive demo scripts from the
scripts/directory.
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
# Run all tests (requires authenticated gh CLI)
$env:RUN_INTEGRATION_TESTS='1'; uv run pytestContributions are welcome! Please ensure all PRs pass the ruff linting and mypy type checks.
Created by MohamedHamed19m