CLI Reference
The mizzling package provides a command-line interface (CLI) for managing your DynamoDB schema, handling migrations, and interacting with your environment.
Installation
Section titled “Installation”bun add -d mizzlingYou can then run it using bun x mizzle.
Commands
Section titled “Commands”Initializes the Mizzle configuration in your project. It creates a mizzle.config.ts file.
bun x mizzle initgenerate
Section titled “generate”Analyzes your entity definitions and generates a new migration snapshot and script.
bun x mizzle generate --name <migration_name>- Options:
-n, --name <name>: Provide a descriptive name for the migration.
Directly applies schema changes to the target DynamoDB environment. This command compares your local schema definitions with the actual state of the DynamoDB tables and applies the necessary CreateTable or UpdateTable operations.
bun x mizzle push- Options:
-y, --yes: Skip the confirmation prompt before applying changes.
Lists all existing DynamoDB tables in your configured environment.
bun x mizzle listAn interactive command that allows you to select and delete DynamoDB tables from your environment. Use with extreme caution.
bun x mizzle dropConfiguration
Section titled “Configuration”The CLI relies on mizzle.config.ts to find your schema definitions and connect to DynamoDB.
import { defineConfig } from "@aurios/mizzling";
export default defineConfig({ schema: "./src/db/schema.ts", out: "./drizzle", driver: "aws-sdk", dbCredentials: { region: "us-east-1", },});