Skip to main content
Any Framework

CLI tool for Rhinox – schema migrations, status checks, and database management.

Published
Apr 9, 2026
7mo ago
Total Downloads
3.0K
3,020

Install

dotnet add package Rhinox.Cli --version 0.0.24-alpha

No framework information available.

README

Rhinox.Cli

A .NET global tool for managing PostgreSQL schema migrations with Rhinox.

Install

dotnet tool install --global Rhinox.Cli

Commands

rhinox migrate plan

Preview pending schema changes without writing any files.

rhinox migrate plan --schema-dir db/schema --migrations-dir db/migrations

rhinox migrate generate

Generate a migration SQL file from detected schema changes.

rhinox migrate generate --schema-dir db/schema --migrations-dir db/migrations --name "add_user_phone"

rhinox migrate apply

Apply pending migrations to a PostgreSQL database. Uses a PostgreSQL advisory lock to prevent concurrent applies.

rhinox migrate apply --connection "Host=localhost;Database=mydb;Username=postgres;Password=secret" --migrations-dir db/migrations

Apply up to a specific migration:

rhinox migrate apply --connection "..." --migrations-dir db/migrations --target "20260319"

rhinox migrate status

Show which migrations have been applied and which are pending.

rhinox migrate status --connection "Host=localhost;Database=mydb;Username=postgres;Password=secret" --migrations-dir db/migrations

Options

Option Description Default
--connection PostgreSQL connection string (required for apply/status) β€”
--schema-dir Directory containing schema definition files db/schema
--migrations-dir Directory containing migration SQL files db/migrations
--name Custom migration name (for plan/generate) auto-generated
--target Apply up to a specific migration prefix (for apply) all pending

How it works

  1. Define your schema in .sql files under db/schema/
  2. Run rhinox migrate generate to diff the schema against existing migrations and produce a new migration file
  3. Review the generated SQL β€” destructive operations are marked with -- DESTRUCTIVE
  4. Run rhinox migrate apply to execute pending migrations inside transactions with checksum verification

Migrations are tracked in a _rhinox_migrations table created automatically in your database.

License

MIT

Changes from Previous Version

No structural changes between v0.0.23-alpha and v0.0.24-alpha.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.