-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Wire up curl -fsSL https://get.auths.dev | sh so users can install auths with one command. The install script and Cloudflare Worker code are already written and waiting to be merged.
Files
scripts/install.sh— Universal install script. Detects OS/arch viauname, fetches the latest release from GitHub Releases, verifies SHA256 checksums, and installs to~/.auths/bin/.deploy/get-auths-dev/src/worker.js— Cloudflare Worker that serves the install script atget.auths.dev.deploy/get-auths-dev/wrangler.toml— Wrangler config for the worker.
How the install script works
- Detects platform:
uname -s→linux/macos,uname -m→x86_64/aarch64 - Maps to existing release asset names:
auths-{os}-{arch}.tar.gz - Resolves latest version via GitHub Releases API (or honors
AUTHS_VERSIONenv var) - Downloads archive +
.sha256sidecar, verifies checksum - Extracts
auths,auths-sign,auths-verifyto~/.auths/bin/(configurable viaAUTHS_INSTALL_DIR) - Prints PATH setup instructions if needed
Gracefully errors on macOS x86_64 (no pre-built binary) with Homebrew/cargo fallback instructions.
Setup steps
1. Merge the install script and worker code
Push the branch containing scripts/install.sh and deploy/get-auths-dev/ and merge to main.
2. Deploy the Cloudflare Worker
Prerequisites: Wrangler CLI and a Cloudflare account with the auths.dev zone.
cd deploy/get-auths-dev
npx wrangler login # One-time auth
npx wrangler deploy # Deploys to get-auths-dev.{account}.workers.dev3. Attach the custom domain
In the Cloudflare dashboard:
- Go to Workers & Pages → get-auths-dev
- Click Settings → Triggers → Custom Domains
- Click Add Custom Domain and enter
get.auths.dev - Cloudflare will automatically create the DNS record in your
auths.devzone
Alternatively via wrangler.toml (uncomment the routes section and redeploy):
[routes]
routes = [{ pattern = "get.auths.dev", zone_name = "auths.dev" }]4. Verify
# Should print the install script
curl -fsSL https://get.auths.dev
# Full install
curl -fsSL https://get.auths.dev | sh
# Specific version
AUTHS_VERSION=v0.0.1-rc.9 curl -fsSL https://get.auths.dev | sh
# Health check
curl https://get.auths.dev/health5. (Optional) Add CI to auto-deploy the worker
Add a GitHub Actions workflow that runs npx wrangler deploy on changes to deploy/get-auths-dev/. Requires a CLOUDFLARE_API_TOKEN secret with Workers deploy permissions.
Cost
$0 — Cloudflare Workers free tier (100k requests/day) + GitHub Releases (no egress limits on asset downloads).