Skip to main content

Installation

Install the SDK and the driver for your database.

Postgres

pnpm add @biref/scanner pg

MySQL / MariaDB

pnpm add @biref/scanner mysql2

Requirements

  • Node.js 20+
  • Your own database driver (pg for Postgres, mysql2 for MySQL). The SDK has zero runtime dependencies and never imports the driver itself.
  • TypeScript 5.7+ recommended for full type narrowing support

Package manager

Any package manager works:

# pnpm
pnpm add @biref/scanner pg

# npm
npm install @biref/scanner pg

# yarn
yarn add @biref/scanner pg

The biref CLI is installed under node_modules/.bin:

pnpm exec biref gen --url postgres://localhost/mydb