aturi.to
Universal links for the ATmosphere
Integration Guide
Add universal sharing to your ATProto application in minutes
URL Structure
aturi.to uses a simple, predictable URL pattern based on ATProto URIs:
For profiles:
aturi.to/[handle or did]Example: aturi.to/alice.bsky.social
For records (posts, lists, etc.):
aturi.to/[handle or did]/[collection]/[rkey]Example: aturi.to/alice.bsky.social/app.bsky.feed.post/3k7qw...
Code Examples
JavaScript/TypeScript
// Convert AT URI to aturi.to link (or your custom domain)
function toAturiLink(atUri: string, domain: string = 'aturi.to'): string {
// at://alice.bsky.social/app.bsky.feed.post/3k7qw...
const uri = atUri.replace('at://', '');
return `https://${domain}/${uri}`;
}
// Usage with aturi.to
const atUri = "at://alice.bsky.social/app.bsky.feed.post/3k7qw...";
const shareLink = toAturiLink(atUri);
// https://aturi.to/alice.bsky.social/app.bsky.feed.post/3k7qw...
// Usage with custom domain
const customLink = toAturiLink(atUri, 'myshare.app');
// https://myshare.app/alice.bsky.social/app.bsky.feed.post/3k7qw...React Component
import { Share2 } from 'lucide-react';
interface ShareButtonProps {
atUri: string;
domain?: string; // Optional custom domain
}
function ShareButton({ atUri, domain = 'aturi.to' }: ShareButtonProps) {
const shareUrl = `https://${domain}/${atUri.replace('at://', '')}`;
const handleShare = async () => {
if (navigator.share) {
await navigator.share({ url: shareUrl });
} else {
await navigator.clipboard.writeText(shareUrl);
}
};
return (
<button onClick={handleShare}>
<Share2 size={16} />
Share via {domain}
</button>
);
}Python
def to_aturi_link(at_uri: str, domain: str = 'aturi.to') -> str:
"""
Convert AT URI to aturi.to link (or custom domain)
Args:
at_uri: The ATProto URI (e.g., 'at://alice.bsky.social/...')
domain: The domain to use (default: 'aturi.to')
Returns:
The shareable URL
"""
uri = at_uri.replace('at://', '')
return f'https://{domain}/{uri}'
# Usage with aturi.to
at_uri = "at://alice.bsky.social/app.bsky.feed.post/3k7qw..."
share_link = to_aturi_link(at_uri)
# https://aturi.to/alice.bsky.social/app.bsky.feed.post/3k7qw...
# Usage with custom domain
custom_link = to_aturi_link(at_uri, 'myshare.app')
# https://myshare.app/alice.bsky.social/app.bsky.feed.post/3k7qw...Use Cases
Share Buttons
Add a “Share via aturi.to” button next to posts, letting users share content that anyone can view on their preferred platform.
Embedded Links
Use aturi.to links in documentation, email newsletters, or anywhere you want flexible, platform-agnostic sharing.
QR Codes
Generate QR codes from aturi.to links for physical media, letting people scan and choose their viewing platform.
Cross-Platform Notifications
Send notifications with aturi.to links that work regardless of which client the recipient prefers.
Custom Domain Support
All of the above code examples support custom domains! If you're running your own fork, just pass your domain as a parameter.
Want to Run Your Own Instance?
Fork aturi.to for:
- Community-specific instances with custom branding
- Regional optimization for better performance
- Custom platform lists for your audience
- Full control over your infrastructure
GPL v3 License
If you fork aturi.to, you must keep it open source under GPL v3. This ensures the software remains free for everyone and all derivatives stay open. Attribution to the original project is appreciated and helps the ecosystem grow.
Questions or Feedback?
aturi.to is a community tool for the ATProto ecosystem. Feel free to reach out with suggestions or bug reports.