Getting Started with atrg

Prerequisites

Install the CLI

cargo install atrg-cli

Create a Project

atrg new my-app
cd my-app

This creates a ready-to-run AT Protocol API project with:

Run the Dev Server

atrg dev

Your API server is now running at http://localhost:3000/.

Verify It Works

# Health check
curl http://localhost:3000/
# → {"name":"my-app","status":"ok"}

# Readiness probe
curl http://localhost:3000/readyz
# → {"ok":true,"database":"connected",...}

# 404 returns JSON
curl http://localhost:3000/nonexistent
# → {"error":"not_found","message":"Not found"}

Configuration

Edit atrg.toml to configure your application:

[app]
name = "my-app"
host = "127.0.0.1"
port = 3000
secret_key = "change-this-in-production"
cors_origins = ["http://localhost:5173"]

[auth]
client_id = "http://localhost:3000/client-metadata.json"
redirect_uri = "http://localhost:3000/auth/callback"

[database]
url = "sqlite://atrg.db"

> Tip: Additional optional sections are available: [jetstream], [firehose], [feed_generator], [labeler], [rate_limit]. See the full configuration reference for details.

Next Steps