Skip to content

Set up get.auths.dev install script #95

@bordumb

Description

@bordumb

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 via uname, 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 at get.auths.dev.
  • deploy/get-auths-dev/wrangler.toml — Wrangler config for the worker.

How the install script works

  1. Detects platform: uname -slinux/macos, uname -mx86_64/aarch64
  2. Maps to existing release asset names: auths-{os}-{arch}.tar.gz
  3. Resolves latest version via GitHub Releases API (or honors AUTHS_VERSION env var)
  4. Downloads archive + .sha256 sidecar, verifies checksum
  5. Extracts auths, auths-sign, auths-verify to ~/.auths/bin/ (configurable via AUTHS_INSTALL_DIR)
  6. 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.dev

3. Attach the custom domain

In the Cloudflare dashboard:

  1. Go to Workers & Pagesget-auths-dev
  2. Click SettingsTriggersCustom Domains
  3. Click Add Custom Domain and enter get.auths.dev
  4. Cloudflare will automatically create the DNS record in your auths.dev zone

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/health

5. (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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions