Registry / database / rhinozug-cli

rhinozug-cli

JSON →
library0.1.9jsnpmunverified

A database migration CLI tool built by Rhinogram for managing PostgreSQL schema changes programmatically. Version 0.1.9 is the latest stable release; release cadence is irregular. It wraps Knex.js to provide an opinionated migration workflow with 'up' and 'down' commands, timestamped migration files, and custom templates. Unlike standalone tools like Knex CLI, Rhinozug is designed as a global npm package and uses a project-local initialization (`rz init`) to create config and migration directories. It is intended primarily for Rhinogram's internal use, but is publicly available on npm.

npm install rhinozug-cli
INSTALL
IMPORT
SIG · RHINOZUG-CLI
R
rhinozug-cli
databasejavascriptv0.1.9
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rz init
npx rhinozug-cli init
npm run rz init
The CLI is installed globally; use 'npx rhinozug-cli' to run commands without global install.
rz create:migration
rz create:migration my_migration
rz create:migration my-migration
Migration names are used as filenames; avoid hyphens or special characters.
rz up
rz up
rz migrate:up
There is no 'migrate' subcommand; use 'up' and 'down' directly.
rz down
rz down -t 20220314120000_migration.js
rz down --target migration.js
Use -t (not --target) and specify the full migration filename.

Demonstrates installing globally, initializing a project, creating a migration, running it, and listing migration status.

npm install -g rhinozug-cli mkdir my-project && cd my-project npm init -y rz init rz create:migration add_users_table # Edit migrations/20220314120000_add_users_table.js: # exports.up = (knex) => knex.schema.createTable('users', (t) => { t.increments(); t.string('name'); }); # exports.down = (knex) => knex.schema.dropTable('users'); rz up rz list:m
rz --version
Debug
Known issues
gotchaThe 'rz' alias may conflict with other tools that use 'rz' command.
fix
Use 'rhinozug' instead of 'rz' or check for existing 'rz' command.
affects: all
gotchaMigrations must be idempotent: the 'down' must exactly undo the 'up'.
fix
Always test 'rz down' immediately after 'rz up' to ensure database state is restored.
affects: all
gotchaIf the project does not have a package.json, 'rz init' will fail.
fix
Run 'npm init -y' before 'rz init'.
affects: all
gotchaThe target file in 'rz up -t' must be the full filename including timestamp.
fix
Use the exact migration filename as shown in 'rz list:m'.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'rhinozug-cli'
The package is not installed globally or you are not using npx.
fix
Run 'npm install -g rhinozug-cli' or use 'npx rhinozug-cli <command>'.
rz: command not found
The global bin path is not in your PATH or the package was not installed globally.
fix
Install globally: 'npm install -g rhinozug-cli'. Check PATH or call 'npx rhinozug-cli'.
Error: ENOENT: no such file or directory, open 'config/migration.template'
'rz init' has not been run in the current project.
fix
Run 'rz init' from the project root.
Upgrade
Version history
0.1.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
18
OpenAI (training)
1
Resources