PHPackages                             radiergummi/flysystem-github-storage - 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. radiergummi/flysystem-github-storage

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

radiergummi/flysystem-github-storage
====================================

A GitHub Storage filesystem for Flysystem.

v1.0.1(6y ago)42401MITPHPPHP &gt;=7.2CI failing

Since Feb 19Pushed 6y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

GitHub Adapter for Flysystem
============================

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

[![Latest Version](https://camo.githubusercontent.com/b304b90a17613ed95018830cfdb32ebfb65502f4a9a76529c13b78e6abd71c9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616469657267756d6d692f666c7973797374656d2d6769746875622d73746f726167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/radiergummi/flysystem-github-storage)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/534cf7e0036d2c0047006c5655feb4d0672dd0bc563920a152903167e5b982c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616469657267756d6d692f666c7973797374656d2d6769746875622d73746f726167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/radiergummi/flysystem-github-storage)

This is a GitHub adapter for [Flysystem](https://github.com/thephpleague/flysystem). It allows you to use a GitHub repository as a storage backend for Flysystem.
It uses the [Contents API](https://developer.github.com/v3/repos/contents/) of the GitHub API, version 3.

> This adapter was heavily influenced by the marvelous work of [Roy Voetman](https://github.com/RoyVoetman) on his [Gitlab Adapter](https://github.com/RoyVoetman/flysystem-gitlab-storage). Make sure to check it out if you need a Gitlab integration instead.

Installation
------------

[](#installation)

```
composer require radiergummi/flysystem-github-storage
```

Usage
-----

[](#usage)

To use the GitHub storage with Flysystem, you'll need to create a client:

```
use Radiergummi\FlysystemGitHub\Client;

$token = getenv('YOUR_GITHUB_ACCESS_TOKEN');
$repository = getenv('YOUR_GITHUB_REPOSITORY')
$client = new Client($token, $repository);
```

You can then pass that client to the adapter:

```
use Radiergummi\FlysystemGitHub\GitHubAdapter;

$adapter = new GitHubAdapter($client);
```

...and finally, create a Filesystem instance:

```
use League\Flysystem\Filesystem;

$filesystem = new Filesystem($adapter);
```

Check out the [Flysystem documentation](https://flysystem.thephpleague.com/api) for filesystem usage information.

Advanced usage
--------------

[](#advanced-usage)

The library allows additional constructor arguments for the client:

ArgumentDefaultDescription`string $token`-Your access token. Must have the `repo` scope.`string $repository`-Name of the repository, including the owner, eg. `acme/repo-name`.`string $branch``master`Name of the branch in your repository.`string $baseurl``https://api.github.com`Base URL of the API to use. Pass `null` to use the default.`\Guzzle\Client $guzzleClient`-Guzzle client to use for the connection. Check the [Custom HTTP Client section](#custom-http-client).Custom HTTP Client
------------------

[](#custom-http-client)

You can optionally pass a custom Guzzle client for the library to use. If you do so, make sure to add the following default headers:

- `authorization`: Should contain your access token, eg. `'authorization' => "token {$token}"`.
- `content-type`: Should contain the desired API version, eg. `'content-type' => "application/vnd.github.v3+json"`.

Contributions
-------------

[](#contributions)

Contributions are welcome! The test suite could be expanded and the error handling be improved - alas, the Flysystem library does not support a sensible exception system but relies on 90s-style `false` return values. While there's no way around that, I'm sure one could improve the situation.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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

Every ~0 days

Total

2

Last Release

2280d ago

PHP version history (2 changes)v1.0.0PHP 7.2

v1.0.1PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![Radiergummi](https://avatars.githubusercontent.com/u/6115429?v=4)](https://github.com/Radiergummi "Radiergummi (1 commits)")

---

Tags

Flysystemgithubflysystem-githubradiergummi

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[masbug/flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual&lt;=&gt;display path translation

2631.7M14](/packages/masbug-flysystem-google-drive-ext)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[shitware-ltd/flysystem-msgraph

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

19360.4k3](/packages/shitware-ltd-flysystem-msgraph)[jacekbarecki/flysystem-onedrive

OneDrive adapter for the flysystem filesystem abstraction library

2429.9k](/packages/jacekbarecki-flysystem-onedrive)[jerodev/flysystem-v3-smb-adapter

SMB adapter for Flysystem v3

1289.9k1](/packages/jerodev-flysystem-v3-smb-adapter)

PHPackages © 2026

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