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 🙏

© 2025 – Pkg Stats / Ryan Hefner

authpilot

v1.0.6

Published

A modern CLI tool to bootstrap authentication into your Next.js applications — **fast**, **secure**, and **configurable**.

Readme

AuthPilot

A modern CLI tool to bootstrap authentication into your Next.js applications — fast, secure, and configurable.

AuthPilot handles your Prisma setup, NextAuth configuration, environment variables, and even dashboard scaffolding — all with a single command.

npm version

Features

  • Next.js project support – Supports Next.js 16
  • One-command setup – Initialize complete authentication with a single npx authpilot init.
  • Database-ready – Instantly connects and configures PostgreSQL via Prisma.
  • NextAuth v5 integration – Automatically installs and configures NextAuth (beta) with Prisma adapter.
  • Multi-provider support – Choose from Google, GitHub, Discord, LinkedIn, Twitter, and more.
  • Auto environment setup – Updates your .env file with required variables during setup.
  • File scaffolding – Generates all necessary auth files (auth.config.ts, middleware.ts, API routes, hooks, etc.).
  • TypeScript first – All generated files come with full TypeScript support.
  • Safe regeneration – Re-run authpilot init anytime without breaking existing configs.
  • Production ready – Creates a fully functional authentication system out of the box.

Quick Start

Prerequisites

  • Node.js 18+
  • Next.js 16 project in typescript (Works seamlessly with both App Router and src directory structures)
  • npm, yarn, or pnpm

Dependencies

AuthPilot automatically installs and configures the following core dependencies during setup:

  • prisma – ORM for defining and managing your database schema.
  • @prisma/client – Auto-generated Prisma client for database queries.
  • next-auth@beta – Authentication library for Next.js (v5 beta).
  • @auth/prisma-adapter – Prisma adapter for integrating NextAuth with your database.
  • lucide-react – Modern React icon library used in the generated Dashboard UI.

Step-by-Step Guide

In the root of you Next.js project execute this

# Using npm
npx authpilot init

# Using pnpm
pnpm dlx authpilot init

# Using yarn
yarn dlx authpilot init

# Using bun
bunx authpilot init

Pick Your Database :

AuthPilot will ask you to select the database you want to use:

◆  Pick Your Database
│  ○ PostgeSQL
│  ○ MongoDB

Select Authentication Providers

You’ll be prompted to select which authentication providers you’d like to enable:

◆  Select the authentication providers you want to use:
│  ◼ Google (recommended)
│  ◻ GitHub
│  ◻ FaceBook
│  ◻ Discord
│  ◻ LinkedIn
│  ◻ Reddit
│  ◻ Twitter
│  ◻ Twitch

Use the spacebar to toggle selections.

Prisma Initialization

Once you’ve chosen your providers, AuthPilot automatically initializes Prisma for you:

✔ Prisma initialized successfully!

If prompted to overwrite your existing schema.prisma, you can choose Yes to allow AuthPilot to update it:

◇  Do you want to overwrite your schema.prisma file?
│  Yes
✔ Updated schema.prisma!

Configure Your Database URL

Next, provide your DATABASE_URL — typically found in your database provider’s dashboard (like Monogdb, Neon, Supabase, or Railway):

◇  Enter your DATABASE_URL:
│  postgresql://username:password@host/dbname?sslmode=require
✔ Updated .env with DATABASE_URL!

AuthPilot will automatically update your .env file with the connection string.

Prisma Generation & Migration

AuthPilot handles Prisma generation and migration for you.

If the generation fails, AuthPilot will offer to reset your database (warning: this will delete existing data):

◇  Database migration failed. Do you want to RESET the database?
│  Yes
✔ Generated Prisma client!

Installing Dependencies

AuthPilot installs the latest versions of NextAuth v5 (beta) and Prisma Adapter:

✔ Installed Next-Auth v5(beta) & Prisma Adapter

File Generation

AuthPilot scaffolds all required authentication files automatically:

✔ Created auth.config.ts & actions/auth file!
✔ Created auth.ts & api/auth/[...nextauth]/routes.ts file!
✔ Created middleware.ts file!
✔ Updated layout.tsx with SessionProvider!
✔ Created Dashboard & Current User Hook!

Your project is now fully configured for authentication.

Make sure your .env file includes the following keys:

DATABASE_URL="your_postgres_connection_string"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your_generated_secret"
GOOGLE_CLIENT_ID="your_google_client_id"
GOOGLE_CLIENT_SECRET="your_google_client_secret"

Depending on the providers you select, AuthPilot will prompt you to add additional environment variables.

Final Steps

Once everything is generated, AuthPilot will display:

└  ℹ Your Project Setup is ready

You can now start your development server:

npm run dev

License

This project is licensed under the MIT License - see the LICENSE file for details.

Built By

Keep Building !!