PHPackages                             srwiez/grpc-protoset - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. srwiez/grpc-protoset

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

srwiez/grpc-protoset
====================

Convert a protoset file to a directory of .proto files

v1.0.2(1mo ago)43931MITPHPPHP ^8.3CI passing

Since Nov 24Pushed 4w ago1 watchersCompare

[ Source](https://github.com/SRWieZ/grpc-protoset)[ Packagist](https://packagist.org/packages/srwiez/grpc-protoset)[ GitHub Sponsors](https://github.com/SRWieZ)[ RSS](/packages/srwiez-grpc-protoset/feed)WikiDiscussions main Synced today

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

gRPC Protoset Converter
=======================

[](#grpc-protoset-converter)

[![Latest Stable Version](https://camo.githubusercontent.com/555c1f747fe9b445b2088491b3f6141b6e85bcf2c5ee497a4fe6fc2f180f3e53/68747470733a2f2f706f7365722e707567782e6f72672f73727769657a2f677270632d70726f746f7365742f76)](https://packagist.org/packages/srwiez/grpc-protoset)[![Total Downloads](https://camo.githubusercontent.com/995541f0e0e106ce4b50d1b615c62130190fd9439c09a21b6cc4c1e4c97a4122/68747470733a2f2f706f7365722e707567782e6f72672f73727769657a2f677270632d70726f746f7365742f646f776e6c6f616473)](https://packagist.org/packages/srwiez/grpc-protoset)[![License](https://camo.githubusercontent.com/d9b84cd7c085ae5966bdfee1627f10681222fbdf02223c8b2e889a3aff94a9ed/68747470733a2f2f706f7365722e707567782e6f72672f73727769657a2f677270632d70726f746f7365742f6c6963656e7365)](https://packagist.org/packages/srwiez/grpc-protoset)[![PHP Version Require](https://camo.githubusercontent.com/d2486dd854cf593027dafe24f54ca9b1877b0114a5979cb34f62f354334ec16e/68747470733a2f2f706f7365722e707567782e6f72672f73727769657a2f677270632d70726f746f7365742f726571756972652f706870)](https://packagist.org/packages/srwiez/grpc-protoset)

A simple PHP library to convert a protoset file to proto files.

If you're here, you likely attempted to use a gRPC API and need to generate a PHP client. However, you may be stuck because you have a protoset file instead of a proto file.

This library will assist you in converting the protoset file to proto files.

It works well with gRPC servers that have the reflection service enabled. To learn more, check out the use case example below.

🚀 Installation
--------------

[](#-installation)

```
composer require srwiez/grpc-protoset
```

📚 Usage
-------

[](#-usage)

Either use the `ProtosetConverter` class directly.

```
use SRWieZ\GrpcProtoset\ProtosetConverter;

$protoset = new ProtosetConverter();
$protoset->setOutputDir('./proto');
$protoset->convert('starlink.protoset');
```

or use the script provided by the package.

```
php cli/converter.php "starlink.protoset" ./proto
```

or if you have installed the package globally, you can use the following command:

```
protoset-converter "starlink.protoset" ./proto
```

🎁 Use case example (Starlink)
-----------------------------

[](#-use-case-example-starlink)

How to generate a PHP client for the Starlink API.

You will need to install the following dependencies:

```
brew install protobuf
brew install grpc
brew install grpcurl
```

First, get the protoset file from your Starlink device.

```
grpcurl -plaintext -protoset-out "starlink.protoset" "192.168.100.1:9200" describe SpaceX.API.Device.Device
```

Then, convert the protoset file to proto files.

```
protoset-converter "starlink.protoset" ./proto
```

Finally, generate the PHP client.

```
protoc --php_out=./generated/ proto/spacex/api/device/device.proto
```

Bonus, edit your composer.json file to autoload the generated PHP client.

```
{
    "autoload": {
        "psr-4": {
          "SpaceX\\API\\": "generated/SpaceX/API",
          "GPBMetadata\\Spacex\\Api\\": "generated/GPBMetadata/Spacex/Api"
        }
    }
}
```

📋 TODO
------

[](#-todo)

Contributions are welcome!

- Write tests by using the starlink protoset file

🤝 Contributing
--------------

[](#-contributing)

Clone the project and run `composer update` to install the dependencies.

Before pushing your changes, run `composer qa`.

This will run [pint](http://github.com/laravel/pint) (code style), [phpstan](http://github.com/phpstan/phpstan) (static analysis), and [pest](http://github.com/pestphp/pest) (tests).

👥 Credits
---------

[](#-credits)

gRPC Protoset Converter was created by Eser DENIZ.

The following projects inspired this library and served as a reference:

-
-
-

📝 License
---------

[](#-license)

gRPC Protoset Converter is licensed under the MIT License. See LICENSE for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance93

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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 ~270 days

Total

3

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/735894a4f6e39aa85e3d136abc9cf0be92da593d88731382384185293cbfe965?d=identicon)[SRWieZ](/maintainers/SRWieZ)

---

Top Contributors

[![SRWieZ](https://avatars.githubusercontent.com/u/1408020?v=4)](https://github.com/SRWieZ "SRWieZ (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

grpcphpstarlink

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/srwiez-grpc-protoset/health.svg)

```
[![Health](https://phpackages.com/badges/srwiez-grpc-protoset/health.svg)](https://phpackages.com/packages/srwiez-grpc-protoset)
```

###  Alternatives

[google/gax

Google API Core for PHP

267116.3M567](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

175117.7M73](/packages/google-common-protos)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[googleads/google-ads-php

Google Ads API client for PHP

3508.5M12](/packages/googleads-google-ads-php)[clarifai/clarifai-php-grpc

Clarifai PHP gRPC client

1229.6k](/packages/clarifai-clarifai-php-grpc)[volcengine/volc-sdk-php

Volcengine SDK for PHP

35129.1k5](/packages/volcengine-volc-sdk-php)

PHPackages © 2026

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