PHPackages                             potherca/flysystem-github - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. potherca/flysystem-github

ActiveLibrary[File &amp; Storage](/categories/file-storage)

potherca/flysystem-github
=========================

Flysystem adapter for Github

v0.3.0(10y ago)116526[2 issues](https://github.com/Potherca/flysystem-github/issues)[1 PRs](https://github.com/Potherca/flysystem-github/pulls)1MITPHPPHP &gt;=5.4CI failing

Since May 11Pushed 1y ago3 watchersCompare

[ Source](https://github.com/Potherca/flysystem-github)[ Packagist](https://packagist.org/packages/potherca/flysystem-github)[ Docs](https://github.com/potherca/flysystem-github)[ RSS](/packages/potherca-flysystem-github/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (7)Versions (7)Used By (1)

Flysystem Adapter for Github
============================

[](#flysystem-adapter-for-github)

[![Latest Version](https://camo.githubusercontent.com/b28cd33f02de3dbf3a2078823f8243a9269022e3ac7097b1227d72b4d20a5095/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f706f7468657263612f666c7973797374656d2d6769746875622e737667)](https://github.com/potherca/flysystem-github/releases)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/0b076c3e063f1d5354d6c66216e142e732dbe4bf49121042f558744990fbe32c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f506f7468657263612f666c7973797374656d2d6769746875622e737667)](https://travis-ci.org/Potherca/flysystem-github)[![Coverage Status](https://camo.githubusercontent.com/ecf92c1882e6323361bcbad327d9ea2a7d8f36bce840c3bb151673cbbe900f08/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f706f7468657263612f666c7973797374656d2d6769746875622f62616467652e737667)](https://coveralls.io/github/potherca/flysystem-github)[![Quality Score](https://camo.githubusercontent.com/521f345cdfa00e633cbe717cdd736ef73bee94978099088e1df9d7e62610a002/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f706f7468657263612f666c7973797374656d2d6769746875622e737667)](https://scrutinizer-ci.com/g/potherca/flysystem-github)[![Total Downloads](https://camo.githubusercontent.com/528db9b2ff39f022d0f87cb0415d298d3e723edc0d991d9c732e36d600bb64dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f7468657263612f666c7973797374656d2d6769746875622e737667)](https://packagist.org/packages/potherca/flysystem-github)

Install
-------

[](#install)

Via Composer

```
$ composer require potherca/flysystem-github
```

Usage
-----

[](#usage)

The Github adapter can be used *without* credentials to do read-only actions on public repositories. To avoid reaching the Github API limit, to save changes, or to read from private repositories, credentials are required.

Caching can be utilized to save traffic or to postpone reaching the Github API limit.

### Basic Usage

[](#basic-usage)

```
use Github\Client;
use League\Flysystem\Filesystem;
use Potherca\Flysystem\Github\Api;
use Potherca\Flysystem\Github\GithubAdapter;
use Potherca\Flysystem\Github\Settings;

$project = 'thephpleague/flysystem';

$settings = new Settings($project);

$api = new Api(new Client(), $settings);
$adapter = new GithubAdapter($api);
$filesystem = new Filesystem($adapter);
```

### Authentication

[](#authentication)

```
use Github\Client;
use League\Flysystem\Filesystem;
use Potherca\Flysystem\Github\Api;
use Potherca\Flysystem\Github\GithubAdapter;
use Potherca\Flysystem\Github\Settings;

$project = 'thephpleague/flysystem';
$credentials = [Settings::AUTHENTICATE_USING_TOKEN, '83347e315b8bb4790a48ed6953a5ad9e825b4e10'];
// or $authentications = [Settings::AUTHENTICATE_USING_PASSWORD, $username, $password];

$settings = new Settings($project, $credentials);

$api = new Api(new Client(), $settings);
$adapter = new GithubAdapter($api);
$filesystem = new Filesystem($adapter);
```

### Cache Usage

[](#cache-usage)

```
use Github\Client;
use Github\HttpClient\CachedHttpClient as CachedClient;
use Github\HttpClient\Cache\FilesystemCache as Cache;
use League\Flysystem\Filesystem;
use Potherca\Flysystem\Github\Api;
use Potherca\Flysystem\Github\GithubAdapter;
use Potherca\Flysystem\Github\Settings;

$project = 'thephpleague/flysystem';

$settings = new Settings($project);

$cache = new Cache('/tmp/github-api-cache')
$cacheClient = new CachedClient();
$cacheClient->setCache($cache);

$api = new Api($cacheClient, $settings);
$adapter = new GithubAdapter($api);
$filesystem = new Filesystem($adapter);
```

Testing
-------

[](#testing)

The unit-tests can be run with the following command:

```
$ composer test
```

To run integration tests, which use the Github API, a [Github API token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) might be needed (to stop the tests hitting the API Limit). An API key can be added by setting it in the environment as `GITHUB_API_KEY` or by creating an `.env` file in the integration tests directory and setting it there. See `tests/integration-tests/.env.example` for an example.

To run the integration test, run the following command (this will also run the unit-tests):

```
$ composer test-all
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Change Log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for details.

Credits
-------

[](#credits)

- [Potherca](https://github.com/potherca)
- [Contributors](https://github.com/Potherca/flysystem-github/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 73% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.2% 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

Every ~114 days

Total

4

Last Release

3702d ago

PHP version history (3 changes)0.0.0PHP &gt;=5.3.0

v0.2.0PHP &gt;=5.5

v0.3.0PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/195757?v=4)[Ben Peachey](/maintainers/potherca)[@Potherca](https://github.com/Potherca)

---

Top Contributors

[![Potherca](https://avatars.githubusercontent.com/u/195757?v=4)](https://github.com/Potherca "Potherca (127 commits)")[![arjank](https://avatars.githubusercontent.com/u/457006?v=4)](https://github.com/arjank "arjank (1 commits)")

---

Tags

filesystemflysystemflysystem-adapterpackagistphppothercaFlysystemadaptergithubpothercaflysystem-githubflysystem-adapter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/potherca-flysystem-github/health.svg)

```
[![Health](https://phpackages.com/badges/potherca-flysystem-github/health.svg)](https://phpackages.com/packages/potherca-flysystem-github)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k277.8M952](/packages/league-flysystem-aws-s3-v3)[shitware-ltd/flysystem-msgraph

A Flysystem 3.0 adapter for Sharepoint 365 / OneDrive using Microsoft Graph API with support for uploading large files

19429.9k4](/packages/shitware-ltd-flysystem-msgraph)[taffovelikoff/imagekit-adapter

Flysystem adapter for ImageKit.

1424.3k](/packages/taffovelikoff-imagekit-adapter)

PHPackages © 2026

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