npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@authrim/setup

v0.1.141

Published

CLI tool for setting up Authrim OIDC Provider on Cloudflare Workers

Readme

@authrim/setup

CLI and Web UI for deploying Authrim OIDC Provider to Cloudflare Workers.

npm version License

Quick Start

# Web UI (recommended)
npx @authrim/setup

# CLI mode
npx @authrim/setup --cli

# Manage existing environments only
npx @authrim/setup manage

Supported Languages

The setup tool supports the following 11 languages:

| Code | Language | Native Name | |------|----------|-------------| | en | English | English | | ja | Japanese | 日本語 | | zh-CN | Chinese (Simplified) | 简体中文 | | zh-TW | Chinese (Traditional) | 繁體中文 | | es | Spanish | Español | | pt | Portuguese | Português | | fr | French | Français | | de | German | Deutsch | | ko | Korean | 한국어 | | ru | Russian | Русский | | id | Indonesian | Bahasa Indonesia |

Language is automatically detected from your system locale or browser settings. You can also specify a language manually:

# CLI: Use --lang option
npx @authrim/setup --lang=ja

# Web UI: Use ?lang query parameter
# http://localhost:3456/?lang=ja

Requirements

  • Node.js >= 20.0.0
  • Wrangler CLI installed and authenticated
  • Cloudflare Workers Paid plan

Commands

init (default)

npx @authrim/setup [options]

Options:
  --cli              CLI mode instead of Web UI
  --lang <code>      Language (en, ja, zh-CN, etc.)
  --config <path>    Load existing configuration
  --env <name>       Environment name (prod, staging, dev)

manage

Manage existing environments (no source code required):

npx @authrim/setup manage

deploy

npx @authrim/setup deploy [options]

Options:
  -c, --config <path>  Config file path
  -e, --env <env>      Environment name
  --component <name>   Deploy single component
  --dry-run            Preview without deploying
  --skip-secrets       Skip secrets upload
  -y, --yes            Skip confirmation (CI/CD)

delete

npx @authrim/setup delete [options]

Options:
  --env <name>    Environment to delete
  -y, --yes       Skip confirmation (CI/CD)
  --no-workers    Keep Workers
  --no-d1         Keep D1 databases
  --no-kv         Keep KV namespaces

info

npx @authrim/setup info [options]

Options:
  --env <name>    Environment name
  --json          JSON output (for scripting)
  --d1            D1 info only
  --workers       Worker info only

config

npx @authrim/setup config [options]

Options:
  --show       Show configuration
  --validate   Validate configuration
  --json       JSON output

Configuration Structure

Authrim uses a unified directory structure for each environment:

project/
└── .authrim/
    └── {env}/              # e.g., prod, staging, dev
        ├── config.json     # Environment settings
        ├── lock.json       # Provisioned resource IDs
        ├── version.txt     # Setup tool version
        ├── keys/           # Cryptographic keys (gitignored)
        └── wrangler/       # Generated wrangler configs

Configuration Files

| File | Description | |------|-------------| | .authrim/{env}/config.json | Environment settings | | .authrim/{env}/lock.json | Provisioned resource IDs | | .authrim/{env}/keys/ | Cryptographic keys (gitignored) |

Components

| Component | Description | |-----------|-------------| | api | Core OIDC API (required) | | loginUi | Login/consent UI | | adminUi | Admin dashboard | | saml | SAML 2.0 IdP | | async | Email, webhooks | | vc | Verifiable Credentials | | bridge | Social login (Google, GitHub, etc.) | | policy | ReBAC Policy Engine |

Resource Naming

| Type | Pattern | Example | |------|---------|---------| | Workers | {env}-ar-{component} | prod-ar-auth | | D1 | {env}-authrim-{type}-db | prod-authrim-core-db | | KV | {env}-{NAME} | prod-CLIENTS_CACHE |

CI/CD

# Deploy without prompts
npx @authrim/setup deploy --env prod --yes

# Delete environment
npx @authrim/setup delete --env staging --yes

# Get info as JSON
npx @authrim/setup info --env prod --json | jq '.d1[0].databaseSize'

Environment variables:

  • CLOUDFLARE_API_TOKEN - API token
  • CLOUDFLARE_ACCOUNT_ID - Account ID
  • AUTHRIM_LANG - Default language (e.g., ja, en)

Troubleshooting

Wrangler not installed

npm install -g wrangler
wrangler login

Lock file not found

npx @authrim/setup init --env prod

Service Bindings error

Deploy missing components first, or disable them in configuration. The ar-router must be deployed last.

License

Apache License 2.0