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

@chimerai/cli

v1.2.189

Published

CLI wizard for ChimerAI starter kit — scaffold auth, RBAC, AI chat, billing and more into any Next.js project

Readme

@chimerai/cli

Interactive CLI wizard for ChimerAI starter kit. Quickly scaffold RBAC, authentication, chat interfaces, and more.

Installation

Global Installation

pnpm add -g @chimerai/cli

One-time Usage (npx)

npx @chimerai/cli init

Commands

chimerai init [feature]

Initialize a new ChimerAI project or add features to an existing one.

Usage:

# Interactive mode - choose features
npx @chimerai/cli init

# Initialize all features (non-interactive)
npx @chimerai/cli init --yes

# Initialize specific feature
npx @chimerai/cli init rbac
npx @chimerai/cli init auth
npx @chimerai/cli init chat

Available Features:

  • rbac - Role-Based Access Control
  • auth - NextAuth authentication
  • chat - AI Chat interface
  • billing - Subscription & billing
  • rag - RAG (Retrieval Augmented Generation)
  • all - All features (default)

Options:

  • -d, --dir <directory> - Target directory (default: current)
  • -y, --yes - Skip prompts, use defaults

chimerai add <component>

Add a specific component to your project.

Usage:

# Add users management table
npx @chimerai/cli add users-table

# Add roles management table
npx @chimerai/cli add roles-table

# Add groups management
npx @chimerai/cli add groups-table

# Add permissions management
npx @chimerai/cli add permissions-table

# Add chat UI
npx @chimerai/cli add chat-ui

Available Components:

  • users-table - User management interface
  • roles-table - Role management interface
  • groups-table - Group management interface
  • permissions-table - Permission management interface
  • chat-ui - AI chat interface

chimerai setup <service>

Configure integrations and services.

Usage:

# Setup database
npx @chimerai/cli setup database

# Setup authentication
npx @chimerai/cli setup auth

# Setup OpenAI
npx @chimerai/cli setup openai

# Setup Anthropic (Claude)
npx @chimerai/cli setup anthropic

# Setup Ollama (local LLMs)
npx @chimerai/cli setup ollama

Available Services:

  • database - Database connection (PostgreSQL, MySQL, SQLite)
  • auth - NextAuth configuration
  • openai - OpenAI API integration
  • anthropic - Anthropic (Claude) API integration
  • ollama - Ollama local LLM integration

chimerai examples

Show usage examples.

Examples

Complete New Project Setup

# 1. Create new Next.js project
npx create-next-app@latest my-app --typescript --tailwind --app

# 2. Navigate to project
cd my-app

# 3. Initialize ChimerAI features
npx @chimerai/cli init

# 4. Configure database
npx @chimerai/cli setup database

# 5. Configure authentication
npx @chimerai/cli setup auth

# 6. Install dependencies
pnpm install

# 7. Push database schema
pnpm db:push

# 8. Start development server
pnpm dev

Add Features to Existing Project

# Add RBAC to existing project
npx @chimerai/cli init rbac

# Add specific components
npx @chimerai/cli add users-table
npx @chimerai/cli add roles-table

# Configure AI providers
npx @chimerai/cli setup openai
npx @chimerai/cli setup anthropic

What Gets Installed

RBAC (init rbac)

  • ✅ @chimerai/admin-ui package
  • ✅ Prisma schema with User, Role, Permission, Group models
  • ✅ API routes for CRUD operations
  • ✅ Admin pages for management

Authentication (init auth)

  • ✅ NextAuth configuration
  • ✅ Session management
  • ✅ Role & permission integration
  • ✅ Protected routes middleware

Chat (init chat)

  • ✅ Chat UI components
  • ✅ AI provider integration
  • ✅ Streaming support
  • ✅ Conversation history

Billing (init billing)

  • ✅ Subscription management
  • ✅ Credit system
  • ✅ Payment integration (Stripe)
  • ✅ Usage tracking

Project Structure After Init

your-project/
├── app/
│   ├── admin/          # Admin pages
│   │   ├── users/
│   │   ├── roles/
│   │   ├── groups/
│   │   └── permissions/
│   └── api/
│       └── admin/      # Admin API routes
│           ├── users/
│           ├── roles/
│           └── groups/
├── lib/
│   ├── auth.ts         # NextAuth config
│   └── prisma.ts       # Prisma client
├── prisma/
│   └── schema.prisma   # Database schema
├── package.json        # Updated with @chimerai packages
└── .env               # Environment variables

Configuration Files

.env

After running setup commands, your .env will contain:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/db"

# Authentication
NEXTAUTH_SECRET="generated-secret"
NEXTAUTH_URL="http://localhost:3000"

# AI Providers
OPENAI_API_KEY="sk-..."
ANTHROPIC_API_KEY="sk-ant-..."
OLLAMA_API_URL="http://localhost:11434"

Development

Build CLI

cd packages/cli
pnpm build

Test Locally

# Link globally
pnpm link --global

# Test commands
chimerai init --help
chimerai add users-table

Watch Mode

pnpm dev

Troubleshooting

Command not found

If chimerai command is not found after global install:

# Reinstall globally
pnpm add -g @chimerai/cli

# Or use npx
npx @chimerai/cli

Permission errors

On Unix systems, you might need to make the CLI executable:

chmod +x ./dist/cli.js

Contributing

The CLI is extensible! Add new commands in src/commands/ and register them in src/cli.ts.

License

MIT