Skip to content

CLI Overview

The Nevr CLI is your primary tool for developing, managing the database, and generating code.

Installation

The CLI is included with the nevr package. You typically run it via npx:

bash
npx nevr <command> [options]

Global Options

OptionDescription
-V, --versionOutput the version number
-h, --helpDisplay help for command

Commands

Development

  • nevr dev - Start the development workflow (generate + push + dev server).

Code Generation

  • nevr generate - Generate Prisma schema and client code from your entities.

Database Management

Configuration

Most commands look for a nevr.config.ts (or .js, .mjs) file in your project root or src/ folder.

typescript
// nevr.config.ts
import { nevr } from "nevr"
import { user } from "./entities/user"
import { prisma } from "nevr/drivers/prisma"

// Export valid configuration
export default nevr({
  entities: [user],
  driver: prisma(db),
})

You can specify a custom config path with -c or --config:

bash
npx nevr generate -c ./config/custom.ts

Released under the MIT License.