PHPackages                             potibm/phluesky - 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. [API Development](/categories/api)
4. /
5. potibm/phluesky

ActiveLibrary[API Development](/categories/api)

potibm/phluesky
===============

An small PHP library for posting messages to the bluesky social network using the AT Protocol.

v0.6.1(1y ago)4126.2k↓27.6%8[3 issues](https://github.com/potibm/phluesky/issues)[3 PRs](https://github.com/potibm/phluesky/pulls)2MITPHPPHP ^8.2CI passing

Since Oct 18Pushed 3w ago3 watchersCompare

[ Source](https://github.com/potibm/phluesky)[ Packagist](https://packagist.org/packages/potibm/phluesky)[ RSS](/packages/potibm-phluesky/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (14)Versions (15)Used By (2)

*ph*luesky
==========

[](#phluesky)

[![Latest Version](https://camo.githubusercontent.com/964b051abe77aae2bd397a13a5309bc49964120bb3304e336deb2fb4a6cbdc48/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f706f7469626d2f70686c7565736b792e7376673f7374796c653d666c61742d737175617265)](https://github.com/potibm/phluesky/releases)[![Latest Version on Packagist](https://camo.githubusercontent.com/69fd08dac7b9aeee16007c206250bc4dce215765a7ddc94df06907859d40dac7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f7469626d2f70686c7565736b793f7374796c653d666c61742d737175617265)](https://packagist.org/packages/potibm/phluesky)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Coverage Status](https://camo.githubusercontent.com/d1b915915da6acc0de42412ce8d6379f7f8088d81ee8e66956642ccca8624c07/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f706f7469626d2f70686c7565736b793f7374796c653d666c61742d737175617265)](https://app.codecov.io/gh/potibm/phluesky)

An small PHP library for Bluesky social using the AT Protocol.

Usage
-----

[](#usage)

Install
-------

[](#install)

Installing using composer is suggested

```
composer require potibm/phluesky
```

You will need a PSR-7, PSR-17 and PSR-18 client or adapter from [this list](https://docs.php-http.org/en/latest/clients.html). For development [symfony/http-client](https://packagist.org/packages/symfony/http-client) and [nyholm/psr7](https://packagist.org/packages/nyholm/psr7) are used.

The HTTP service discovery will do the magic. In most cases no additional steps are required.

### Setup and posting a simple message

[](#setup-and-posting-a-simple-message)

```
$api = new \potibm\Bluesky\BlueskyApi('nick.bsky.social', 'abcd-efgh-ijkl-mnop');
$postService = new \potibm\Bluesky\BlueskyPostService($api);

$post = \potibm\Bluesky\Feed\Post::create('✨ example mentioning @atproto.com to share the URL 👨‍❤️‍👨 https://en.wikipedia.org/wiki/CBOR.');

$response = $api->createRecord($post);
```

### Adding mentions and links from post text

[](#adding-mentions-and-links-from-post-text)

```
$post = \potibm\Bluesky\Feed\Post::create('✨ example mentioning @atproto.com to share the URL 👨‍❤️‍👨 https://en.wikipedia.org/wiki/CBOR.');
$post = $postService->addFacetsFromMentionsAndLinks($post);
```

### Adding mentions and links and tags from post text

[](#adding-mentions-and-links-and-tags-from-post-text)

```
$post = \potibm\Bluesky\Feed\Post::create('✨ example mentioning @atproto.com to share the URL 👨‍❤️‍👨 https://en.wikipedia.org/wiki/CBOR. and #HashtagFun');
$post = $postService->addFacetsFromMentionsAndLinksAndTags($post);
```

### Adding images

[](#adding-images)

```
$post = \potibm\Bluesky\Feed\Post::create('example post with image attached');
$post = $postService->addImage(
    $post,
    'image.jpg',
    'alt text'
);
```

### Adding website card embeds

[](#adding-website-card-embeds)

```
$post = \potibm\Bluesky\Feed\Post::create('post which embeds an external URL as a card');
$post = $postService->addWebsiteCard(
    $post,
    'https://example.com',
    'Example website',
    'Example website description',
    'optionalimage.jpg'
);
```

### Reply to a post

[](#reply-to-a-post)

```
$post = \potibm\Bluesky\Feed\Post::create('example of a reply');
$post = $postService->addReply(
    $post,
    'at://did:plc:u5cwb2mwiv2bfq53cjufe6yn/app.bsky.feed.post/3k43tv4rft22g'
);
```

### Quote a post

[](#quote-a-post)

```
$post = \potibm\Bluesky\Feed\Post::create('example of a quote-post');
$post = $postService->addQuote(
    $post,
    'at://did:plc:u5cwb2mwiv2bfq53cjufe6yn/app.bsky.feed.post/3k44deefqdk2g'
);
```

### Handling errors

[](#handling-errors)

While performing requests using the API, exceptions may be thrown.

The exceptions are of the base type `potibm\Bluesky\Exception\Exception`. The exception message will contain details from the API.

```
try {
    $response = $api->createRecord($post);
} catch (\potibm\Bluesky\Exception\HttpRequestException $e) {
    echo 'Error performing request on HTTP level: ' . $e->getMessage();
} catch (\potibm\Bluesky\Exception\AuthenticationErrorException $e) {
    echo 'Unable to authorize: ' . $e->getMessage();
} catch (\potibm\Bluesky\Exception\HttpStatusCodeException $e) {
    echo 'Unable to perform request on API level: ' . $e->getMessage();
} catch (\potibm\Bluesky\Exception\InvalidPayloadException $e) {
    echo 'Received unserializable JSON payload: ' . $e->getMessage();
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/potibm/phluesky/blob/main/LICENSE) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance72

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.5% 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 ~64 days

Recently: every ~134 days

Total

10

Last Release

409d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/395c96139252567c6ac9d1ae83535eea6a27604b378f62cecf66763054395bf3?d=identicon)[potibm](/maintainers/potibm)

---

Top Contributors

[![potibm](https://avatars.githubusercontent.com/u/1888372?v=4)](https://github.com/potibm "potibm (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![martinburch](https://avatars.githubusercontent.com/u/2335284?v=4)](https://github.com/martinburch "martinburch (2 commits)")[![denpen](https://avatars.githubusercontent.com/u/4018688?v=4)](https://github.com/denpen "denpen (1 commits)")[![rknightuk](https://avatars.githubusercontent.com/u/948436?v=4)](https://github.com/rknightuk "rknightuk (1 commits)")

---

Tags

blueskyphpblueskyatprotoat cprotocol

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/potibm-phluesky/health.svg)

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

###  Alternatives

[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.

35789.4k2](/packages/telnyx-telnyx-php)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M318](/packages/openai-php-client)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

9067.8k](/packages/n1ebieski-ksef-php-client)[trycourier/courier

Courier PHP SDK

15660.9k](/packages/trycourier-courier)[anthropic-ai/sdk

Anthropic PHP SDK

163583.3k17](/packages/anthropic-ai-sdk)

PHPackages © 2026

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