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

@keyloom/cli

v3.1.3

Published

Keyloom command-line tools: init, migrate, routes, doctor

Downloads

13

Readme

@keyloom/cli

Professional CLI for initializing and maintaining a Keyloom authentication setup.

Install

The CLI is shipped with the monorepo and published as a package. In app repos, install locally and use with npx/pnpm dlx:

pnpm add -D @keyloom/cli
npx keyloom init

Or invoke via node if running from a cloned monorepo build:

node ./packages/cli/dist/keyloom.js --help

Commands

keyloom init

Interactive wizard that sets up a production‑ready auth baseline.

What it does:

  • Detects project type (Next.js App/Pages Router) and TypeScript
  • Installs required deps (uses your package manager)
  • Generates keyloom.config.(ts|js) with your choices
  • Scaffolds API handler and middleware
  • Writes .env.example including AUTH_SECRET, DATABASE_URL, and provider vars
  • Generates migration artifacts for your chosen adapter
  • Runs keyloom routes to create the initial route manifest

Useful flags:

  • --yes non‑interactive defaults
  • --adapter <prisma|drizzle-pg|drizzle-mysql|postgres|mysql2|mongo>
  • --providers <github,google,discord,...>
  • --cwd <path> to target a different project directory

keyloom routes

Scans your project for Keyloom routes and produces a manifest used by the doctor and tooling.

keyloom routes --cwd .

Outputs:

  • .keyloom/routes.generated.ts
  • .keyloom/routes.generated.json

keyloom doctor

Runs environment and configuration checks with actionable guidance.

Checks include:

  • Required env vars (AUTH_SECRET, provider secrets, etc.)
  • Cookie settings and JWT/DB session configuration
  • Presence of route manifest and scaffolded files
  • Package versions and known pitfalls
keyloom doctor --cwd .

keyloom generate

Generates database artifacts (DDL/files) for the selected adapter without applying them.

keyloom generate --cwd .

keyloom migrate

Generates artifacts and then runs the adapter’s migration tool when available.

# Prisma example
keyloom migrate --cwd .
# Drizzle example
keyloom migrate --cwd .

Exit codes

  • 0 on success
  • Non‑zero when an operation fails (installation, generation, or validation)

Troubleshooting

  • Re‑run with --cwd if working in a subdirectory
  • If dependency installation fails, the CLI prints the exact manual command
  • For Prisma, ensure DATABASE_URL is set and prisma is installed

License

MIT