PHPackages                             yggverse/gemini - 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. yggverse/gemini

ActiveLibrary

yggverse/gemini
===============

PHP 8 Library for Gemini Protocol

1.0.1(1y ago)0120MITPHP

Since Feb 26Pushed 1y ago3 watchersCompare

[ Source](https://github.com/YGGverse/gemini-php)[ Packagist](https://packagist.org/packages/yggverse/gemini)[ Docs](https://github.com/yggverse/gemini-php)[ RSS](/packages/yggverse-gemini/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (15)Used By (0)

gemini-php
==========

[](#gemini-php)

PHP 8 Library for [Gemini Protocol](https://geminiprotocol.net)

*For optimization reasons, some experimental features like `Dokuwiki` and `GTK3/Pango` was dropped from `1.0.0` release, but available in [previous versions](https://github.com/YGGverse/gemini-php/releases/tag/0.10.1). `Gemtext` component re-implemented as separated library (see [Extras](#extras))*

Extras
------

[](#extras)

- [gemtext-php](https://github.com/YGGverse/gemtext-php) - Object-oriented PHP 8 library for Gemini / Gemtext operations

Usage
-----

[](#usage)

```
composer require yggverse/gemini

```

Client
------

[](#client)

PHP interface for Gemini protocol queries by TLS socket connection

### Request

[](#request)

```
$request = new \Yggverse\Gemini\Client\Request(
    'gemini://yggverse.cities.yesterweb.org:1965/index.gmi'
);
```

**Resolved request (SNI)**

For direct connection provide resolved IP as the second argument

```
$request = new \Yggverse\Gemini\Client\Request(
    'gemini://yggverse.cities.yesterweb.org:1965/index.gmi' // target URL
    '68.133.1.71' // resolved IP, skip to use system-wide resolver
);
```

Alternatively, use `setResolvedHost` method of `Request` object before `getResponse`

#### Request::setResolvedHost

[](#requestsetresolvedhost)

```
$request->setResolvedHost(
    '68.133.1.71'
)
```

- to resolve network address with PHP, take a look on the [net-php](https://github.com/YGGverse/net-php) library!

#### Request::getResolvedHost

[](#requestgetresolvedhost)

Get resolved host back

#### Request::setHost

[](#requestsethost)

#### Request::getHost

[](#requestgethost)

#### Request::setPort

[](#requestsetport)

#### Request::getPort

[](#requestgetport)

#### Request::setPath

[](#requestsetpath)

#### Request::getPath

[](#requestgetpath)

#### Request::setQuery

[](#requestsetquery)

#### Request::getQuery

[](#requestgetquery)

#### Request::getResponse

[](#requestgetresponse)

Execute requested URL and return raw response

```
var_dump(
    $request->getResponse()
);
```

#### Request::getOptions

[](#requestgetoptions)

#### Request::setOptions

[](#requestsetoptions)

```
$request = new \Yggverse\Gemini\Client\Request(
    'gemini://yggverse.cities.yesterweb.org',
    '68.133.1.71' // make direct request to the resolved host
);

$request->setOptions(
    [
        'ssl' =>
        [
            'peer_name'        => 'yggverse.cities.yesterweb.org', // SNI
            'verify_peer'      => false,
            'verify_peer_name' => false
        ]
    ]
);
```

### Response

[](#response)

This class provides additional features for the raw response operations

```
$response = new \Yggverse\Gemini\Client\Response(
    $request->getResponse()
);
```

#### Response::setCode

[](#responsesetcode)

#### Response::getCode

[](#responsegetcode)

#### Response::setMeta

[](#responsesetmeta)

#### Response::getMeta

[](#responsegetmeta)

#### Response::setBody

[](#responsesetbody)

#### Response::getBody

[](#responsegetbody)

```
var_dump(
    $response->getBody()
);
```

Integrations
------------

[](#integrations)

- [gemini-dl](https://github.com/YGGverse/gemini-dl) - CLI Batch downloader for Gemini Protocol
- [Yo!](https://github.com/YGGverse/Yo/tree/gemini) - Crawler for different networks
- [Yoda](https://github.com/YGGverse/Yoda) - PHP-GTK browser for Gemini Protocol
- [β-Doku](https://github.com/YGGverse/bdoku) - DokuWiki Satellite for Gemini Protocol

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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 ~10 days

Recently: every ~21 days

Total

14

Last Release

680d ago

Major Versions

0.10.1 → 1.0.02024-06-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/67b0f652ebac064d26ca06ba5fd4271fab0ac5482d6c2d4865b8f3697721bc31?d=identicon)[d47081](/maintainers/d47081)

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

---

Top Contributors

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

---

Tags

1965composergeminigemini-apigemini-clientgemini-librarygemini-phpgemini-php-apigemini-protocollibrarysockettlsresponserequestclientGeminiyggversegemini-protocol

### Embed Badge

![Health badge](/badges/yggverse-gemini/health.svg)

```
[![Health](https://phpackages.com/badges/yggverse-gemini/health.svg)](https://phpackages.com/packages/yggverse-gemini)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[fig/http-message-util

Utility classes and constants for use with PSR-7 (psr/http-message)

39489.0M274](/packages/fig-http-message-util)[nette/http

🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.

48819.2M541](/packages/nette-http)[aplus/http-client

Aplus Framework HTTP Client Library

2161.6M1](/packages/aplus-http-client)

PHPackages © 2026

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