publish-php/atproto-standard-site

Focused PHP client for standard.site lexicons on the AT Protocol

Maintainers

Package info

github.com/publish-php/atproto-standard-site

pkg:composer/publish-php/atproto-standard-site

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-07-27 13:13 UTC

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

  • Publicationsite.standard.publication record
  • Documentsite.standard.document record
  • BlobRef — Blob reference for cover images and icons
  • Color / BasicTheme — Publication theme metadata

Services

  • Record — Create, update, delete, and fetch records
  • Blob — Upload binary blobs (cover images, icons)
  • Identity — Resolve handles to DIDs

License

MIT