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

@nextdevx/cli

v0.2.2

Published

CLI for @nextdevx package setup and migrations

Readme

@nextdevx/cli

Command-line interface for initializing @nextdevx packages in your Next.js project. Automatically generates configuration files, API routes, and Prisma schema additions.

Features

  • Interactive Setup - Guided prompts for selecting packages and auth provider
  • Code Generation - Generates provider configuration, API routes, and boilerplate
  • Auth Provider Support - Pre-configured adapters for Supabase, Clerk, and NextAuth
  • Prisma Integration - Outputs necessary schema additions for database packages
  • App Router Detection - Validates project structure before generating files

Installation

You can run the CLI without installation using npx:

npx @nextdevx/cli init

Or install globally:

npm install -g @nextdevx/cli
# Then run:
nextstack init

Commands

nextstack init

Initialize @nextdevx in your project. This command:

  1. Detects your Next.js project structure
  2. Prompts you to select which packages to install
  3. Prompts for your auth provider (Supabase, Clerk, or NextAuth)
  4. Generates all necessary files
npx @nextdevx/cli init

Example Output:

@nextdevx initialization

Detected: App Router

? Which packages do you want to install? (Press <space> to select)
❯ ◉ @nextdevx/devtools - Dev mode indicator, dev-login page
  ◯ @nextdevx/feedback - Feedback system with element picker
  ◯ @nextdevx/whats-new - Changelog with voting
  ◉ @nextdevx/theme - Theme provider (light/dark/system)
  ◯ @nextdevx/audit - Audit logging system

? Which auth provider are you using?
❯ Supabase
  Clerk
  NextAuth

Generating files...

  ✓ lib/nextstack-provider.tsx
  ✓ app/api/dev/info/route.ts

✓ Generated 2 files!

Add these dependencies to your package.json:
  "dependencies": {
    "@nextdevx/core": "^0.2.0",
    "@nextdevx/devtools": "^0.2.0",
    "@nextdevx/theme": "^0.2.0",
  }

Next steps:
1. Run pnpm install
2. Add the Prisma schema additions shown above (if any)
3. Run npx prisma generate && npx prisma db push
4. Import Providers from lib/nextstack-provider.tsx in your layout

nextstack add <package>

Add a single @nextdevx package to your existing setup.

npx @nextdevx/cli add feedback
npx @nextdevx/cli add whats-new
npx @nextdevx/cli add audit
npx @nextdevx/cli add devtools
npx @nextdevx/cli add theme

Available Packages:

| Package | Description | Requires DB | |---------|-------------|-------------| | devtools | Dev mode indicator, dev-login page | No | | feedback | Feedback system with element picker | Yes | | whats-new | Changelog with voting | Yes | | theme | Theme provider (light/dark/system) | No | | audit | Audit logging system | Yes |

Example:

npx @nextdevx/cli add feedback
Adding @nextdevx/feedback

Detected: App Router

? Which auth provider are you using? Supabase

Generating files...

  ✓ app/api/feedback/route.ts
  ✓ app/api/feedback/upload/route.ts

Add this Prisma schema:
  // Copy to prisma/schema.prisma
  model Feedback {
    id                  String    @id @default(cuid())
    message             String    @db.Text
    ...
  }

✓ Generated 2 files!

Add this dependency to your package.json:
  "@nextdevx/feedback": "^0.2.0"

Next steps:
1. Run pnpm install
2. Add the Prisma schema additions shown above
3. Run npx prisma generate && npx prisma db push
4. Import and use the components in your app

Generated Files

Provider File

The init command generates a provider file that configures all @nextdevx packages:

// lib/nextstack-provider.tsx
'use client'

import { NextstackProvider } from '@nextdevx/core'
import { createSupabaseAuthAdapter } from '@nextdevx/core/auth/supabase'
import { ThemeProvider } from '@nextdevx/theme'
import { FeedbackProvider } from '@nextdevx/feedback'
import { supabase } from './supabase'
import { prisma } from './prisma'

export function Providers({ children }: { children: React.ReactNode }) {
  const authAdapter = createSupabaseAuthAdapter({ client: supabase })

  return (
    <NextstackProvider
      config={{
        auth: authAdapter,
        prisma,
        multiTenancy: { enabled: false, getOrganizationId: async () => null },
      }}
    >
      <ThemeProvider>
        <FeedbackProvider>
          {children}
        </FeedbackProvider>
      </ThemeProvider>
    </NextstackProvider>
  )
}

API Routes

Generates API routes for packages that need them:

  • devtools: app/api/dev/info/route.ts
  • feedback: app/api/feedback/route.ts, app/api/feedback/upload/route.ts
  • whats-new: app/api/whats-new/route.ts, app/api/whats-new/[id]/vote/route.ts
  • audit: app/api/admin/audit/route.ts

Requirements

  • Next.js 14+ with App Router
  • Prisma (for database packages)
  • Node.js 18+

Auth Provider Configuration

The CLI generates auth adapter configuration based on your selection:

Supabase

import { createSupabaseAuthAdapter } from '@nextdevx/core/auth/supabase'
import { supabase } from './supabase'

const authAdapter = createSupabaseAuthAdapter({
  client: supabase,
  adminRoles: ['admin'],
})

Clerk

import { createClerkAuthAdapter } from '@nextdevx/core/auth/clerk'

const authAdapter = createClerkAuthAdapter({
  adminRoles: ['org:admin'],
})

NextAuth

import { createNextAuthAdapter } from '@nextdevx/core/auth/next-auth'

const authAdapter = createNextAuthAdapter({
  adminRoles: ['admin'],
})

Manual Installation

If you prefer not to use the CLI, you can manually install packages:

# Install core (required)
npm install @nextdevx/core

# Install desired packages
npm install @nextdevx/devtools
npm install @nextdevx/feedback
npm install @nextdevx/whats-new
npm install @nextdevx/theme
npm install @nextdevx/audit

Then follow the README instructions for each package to configure providers and API routes.

Troubleshooting

"Could not detect Next.js App Router structure"

The CLI looks for an app/ directory in your project root. Make sure you're running the command from your Next.js project root.

"Pages Router detected"

@nextdevx packages require the App Router. If you're using Pages Router, you'll need to migrate to App Router first or configure components manually.

Generated files already exist

The CLI will prompt before overwriting existing files. You can safely decline and manually merge the generated code.

Dependencies

The CLI uses these libraries:

  • commander - CLI argument parsing
  • prompts - Interactive prompts
  • picocolors - Colored terminal output

License

MIT