publish-php / atproto-standard-site
Focused PHP client for standard.site lexicons on the AT Protocol
Package info
github.com/publish-php/atproto-standard-site
pkg:composer/publish-php/atproto-standard-site
Requires
- php: ^8.3
- guzzlehttp/guzzle: ^7.9
- psr/log: ^3.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.9
- phpunit/phpunit: ^12.0
This package is auto-updated.
Last update: 2026-07-27 13:30:31 UTC
README
A focused PHP client for the standard.site lexicons on the AT Protocol.
What this is
A lightweight library for creating and managing site.standard.publication and site.standard.document records on an AT Protocol PDS. It handles the seven XRPC endpoints needed for standard.site — nothing more, nothing less.
Not a general-purpose AT Protocol SDK. If you need firehose subscriptions, repository sync, or federation, look at socialweb-php/atproto instead.
Requirements
- PHP 8.3+
- Guzzle HTTP client (or any PSR-18 compatible client)
Installation
composer require publish-php/atproto-standard-site
Quick start
use PublishPhp\AtprotoStandardSite\Client; use PublishPhp\AtprotoStandardSite\Model\Publication; use PublishPhp\AtprotoStandardSite\Service\Record; // Create a client with your Bluesky app password $client = new Client( identifier: 'yourdomain.com', // handle or email appPassword: 'xxxx-xxxx-xxxx-xxxx', // app password from Bluesky settings ); // Create the service $records = new Record($client); // Create a publication record $pubUri = $records->createPublication(new Publication( url: 'https://yourdomain.com', name: 'My Blog', description: 'A blog about things.', )); // Create a document record use PublishPhp\AtprotoStandardSite\Model\Document; $docUri = $records->createDocument(new Document( site: $pubUri, // reference the publication title: 'My First Post', publishedAt: '2024-01-20T14:30:00.000Z', path: '/blog/my-first-post', textContent: 'Full text of the article...', tags: ['introduction', 'blog'], ));
Authentication
This library uses Bluesky app passwords for authentication. Generate one at Settings → App Passwords in Bluesky.
App passwords can read and write repository records but cannot change account settings, passwords, or enable/disable 2FA. For scope-limited OAuth access (restricted to site.standard.* records only), a future version will support AIP or native AT Protocol OAuth.
API
Client
The XRPC HTTP transport. Authenticates via com.atproto.server.createSession and caches the JWT.
Models
Publication—site.standard.publicationrecordDocument—site.standard.documentrecordBlobRef— Blob reference for cover images and iconsColor/BasicTheme— Publication theme metadata
Services
Record— Create, update, delete, and fetch recordsBlob— Upload binary blobs (cover images, icons)Identity— Resolve handles to DIDs
License
MIT