AT Protocol Development Environment#
A Nix-based development environment for running AT Protocol services (PDS, PLC, Caddy proxy, and MailHog).
Prerequisites#
Make sure to add these lines to your /etc/hosts file:
127.0.0.1 pds.example.org
127.0.0.1 plc.example.org
127.0.0.1 relay.example.org
Generate SSL certificates before first use:
nix run .#generate-certs
Quick Start#
-
Enter the development environment:
nix develop -
Start all services in tmux:
nix run .#allThis will start all services in a single-column tmux pane layout:
- Pane 0: PLC server
- Pane 1: PDS server
- Pane 2: Caddy proxy
- Pane 3: AT Protocol Relay
-
Create an invite code:
scripts/create-invite.sh -
Create a user account:
goat account create \ --pds-host=https://pds.example.org:8443 \ --password=password \ --email=hello@example.org \ --invite-code=pds-example-org:8443-xyldq-yrhxc \ --handle=edouard.pds.example.orgExpected output:
Success! DID: did:plc:pzvsc3jwfjwidojtpbxv4rdd Handle: edouard.pds.example.org -
Verify the DID is registered:
goat --plc-host=https://plc.example.org data did:plc:pzvsc3jwfjwidojtpbxv4rdd -
Login to your account:
goat account login \ --username=edouard.pds.example.org \ --app-password=password \ --pds-host=https://pds.example.org:8443 -
Create your first post:
goat bsky post "hello world!"
Services#
- Bluesky PDS: https://pds.example.org:8443
- DID PLC: https://plc.example.org:8444
- AT Protocol Relay: https://relay.example.org:8445
- MailHog: http://localhost:8025
Available Tools#
goat- AT Protocol CLI toolcurl,jq- HTTP and JSON utilitiestmux- Terminal multiplexer
Management Commands#
tmux attach -t atproto- Attach to the services sessiontmux kill-session -t atproto- Stop all servicesnix run .#mailhog- Start MailHog (run separately if needed)nix run .#generate-certs- Generate SSL certificates