@cnippet-helm/cli
v0.5.0
Published
CLI — init, add-resource, eject, doctor
Downloads
739
Readme
@cnippet-helm/cli
CLI for Admin Kit — scaffold a new admin panel, add resources, eject components for customization, and diagnose configuration problems.
Usage
No install required — use npx:
npx @cnippet-helm/cli <command>Commands
init — Set up Admin Kit in an existing Next.js + Prisma project
npx @cnippet-helm/cli initInteractively:
- Detects your package manager (pnpm / npm / yarn / bun)
- Checks Next.js and Prisma are present
- Prompts for auth provider (Better Auth or none)
- Prompts for storage provider (local / Vercel Blob / none)
- Installs required packages
- Scaffolds
src/lib/admin.config.ts,src/app/admin/[[...admin]]/page.tsx, andlayout.tsx - Optionally appends
AdminAuditLogmodel toprisma/schema.prisma
add-resource — Add a Prisma model to the admin panel
npx @cnippet-helm/cli add-resourcePrompts for model name, display label, list columns, searchable fields, and permission stubs. Patches admin.config.ts in place.
doctor — Diagnose configuration problems
npx @cnippet-helm/cli doctorRuns 8 checks: package.json, Next.js version, Prisma schema, @cnippet-helm/core, @cnippet-helm/ui, admin.config.ts location, AdminAuditLog model, App Router directory. Prints a fix hint for every failure.
eject — Copy components locally for customization
npx @cnippet-helm/cli ejectCopies selected component groups (UI primitives / form fields / list view) into src/components/helm/ so you can modify them freely. Ejected files are no longer managed by Admin Kit.
Requirements
- Node.js >= 20
- Next.js >= 15 with App Router
- Prisma >= 6
See the Admin Kit docs for full usage.
