PHPackages                             tournayrelabs/github-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. tournayrelabs/github-sdk-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tournayrelabs/github-sdk-php
============================

PHP SDK for the GitHub REST API, automatically generated from the official OpenAPI specification

v0.1.0(1mo ago)00MITPHPPHP &gt;=8.2

Since Apr 29Pushed 1mo agoCompare

[ Source](https://github.com/TournayreLabs/github-sdk-php)[ Packagist](https://packagist.org/packages/tournayrelabs/github-sdk-php)[ Docs](https://github.com/TournayreLabs/github-sdk-php)[ RSS](/packages/tournayrelabs-github-sdk-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

GitHub PHP SDK
==============

[](#github-php-sdk)

PHP SDK for the [GitHub REST API](https://docs.github.com/en/rest), automatically generated from the [official OpenAPI specification](https://github.com/github/rest-api-description).

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Composer
- Node.js &gt;= 20
- Python 3 (for the auth patch script)

Quick Start
-----------

[](#quick-start)

```
# 1. Install the OpenAPI Generator
make install-openapi-generator

# 2. Fetch the latest GitHub OpenAPI spec and generate the SDK
make fetch-and-generate

# 3. Install PHP dependencies
make install-dependencies
```

Usage
-----

[](#usage)

```
use TournayreLabs\GitHubSDK\Configuration;
use TournayreLabs\GitHubSDK\Api\ReposApi;

$config = Configuration::getDefaultConfiguration()
    ->setAccessToken('your_github_personal_access_token');

$api = new ReposApi(new GuzzleHttp\Client(), $config);

// Get a repository
$repo = $api->reposGet('owner', 'repo');
echo $repo->getFullName();
```

Available Make Targets
----------------------

[](#available-make-targets)

TargetDescription`make fetch-and-generate`Download spec + apply auth + generate SDK **(recommended)**`make fetch-openapi`Download the latest GitHub OpenAPI spec`make update-spec`Alias for `fetch-openapi``make generate-sdk`Generate SDK from an already-downloaded spec`make install-dependencies`Install PHP dependencies`make test`Run PHPUnit tests`make test-coverage`Run tests with HTML coverage report`make clean`Remove generated SDK files`make help`Show all available targetsAuthentication
--------------

[](#authentication)

The SDK supports the following GitHub authentication methods:

- **Personal Access Token (PAT)**: `$config->setAccessToken('ghp_...')`
- **GitHub App JWT**: `$config->setAccessToken('your_jwt_token')`
- **OAuth2 token**: `$config->setAccessToken('gho_...')`

Regenerating the SDK
--------------------

[](#regenerating-the-sdk)

The SDK is generated from the official GitHub OpenAPI specification. To regenerate with the latest API changes:

```
make fetch-and-generate
```

OpenAPI Source
--------------

[](#openapi-source)

The GitHub REST API OpenAPI description is maintained at: [github/rest-api-description](https://github.com/github/rest-api-description)

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/be702ea3d10de6d97d83c32866fc9cfe1830a055e7f8b685c8434ccad40416c1?d=identicon)[atournayre](/maintainers/atournayre)

---

Top Contributors

[![atournayre](https://avatars.githubusercontent.com/u/4262077?v=4)](https://github.com/atournayre "atournayre (3 commits)")

---

Tags

githubgithub-apiopenapiphppsr-18rest-apisdkphpapisdkrestopenapigithub

### Embed Badge

![Health badge](/badges/tournayrelabs-github-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/tournayrelabs-github-sdk-php/health.svg)](https://phpackages.com/packages/tournayrelabs-github-sdk-php)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[retailcrm/api-client-php

PHP client for RetailCRM API

661.1M1](/packages/retailcrm-api-client-php)[claude-php/claude-php-sdk

A universal, framework-agnostic PHP SDK for the Anthropic Claude API with PSR compliance

14440.4k2](/packages/claude-php-claude-php-sdk)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28146.3k](/packages/phpro-http-tools)[voku/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

16185.0k1](/packages/voku-httpful)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
