Command-line workflow
The rent command is the front door to a Rent project. You use it to create an application, generate the client,
inspect the interpreted schema, review database changes, browse local data, and apply migrations.
The everyday loop
Create a complete application with SQLite, a starter entity, generated code, and project configuration:
rent new social-app
cd social-app
rent doctor
rent migrate dev --name initial
cargo runOr add the entities you already know you need to an existing Rent project:
rent init User Post Commentrent init regenerates the typed client immediately. After editing rent/schema.rsl, regenerate it:
rent generate
cargo checkDuring active schema work, keep generation running in another terminal:
rent devReview how Rent interpreted the schema:
rent describePost
Table: posts
Fields:
id: int
title: string (1 validator(s))
Relations:
author: User (one, required)Classify the proposed database work without changing anything:
rent migrate preflightFor local development, create, apply, and verify the migration in one command:
rent migrate dev --name create_blogFor a controlled deployment, preview the SQL, create a reviewable migration file, and apply that exact file:
rent migrate diff
rent migrate plan --name create_blog
rent migrate validate
rent migrate applyMigration: create_blog
Created ./rent/migrations/20260910023750_create_blog.sql
Changes 3 operations
Checksum 84ec0a3f7d1b9c5e2a8f4d6b0c3e7a9f1d5b8c2e4a6f0d3b7c9e1a5f8d2b4c6e
Valid: 1 migration verified.
Applied 20260910023750_create_blog (3 statements)When a deployment needs an authored backfill rather than a schema diff, create an editable migration and seal it after writing the SQL:
rent migrate create --name backfill_post_summaries
# Edit the timestamped backfill_post_summaries migration.
rent migrate seal
rent migrate validateThe next drift check should be empty. That fixed point proves the live database matches the desired catalog:
rent migrate driftVerified: No schema drift.Browse the resulting development data in a local, read-only web interface:
rent studioStudio binds only to your loopback interface. Enable cell editing deliberately with --allow-writes.
If the schema declares PostgreSQL extensions, check the destination server before planning their lifecycle:
rent extension check --provider self-hosted
rent extension statusWhere to go deeper
The complete CLI guide gives each command its own page:
rent initrent newrent generaterent devrent completionsrent db pullrent studiorent doctorrent seedrent describerent validaterent formatrent fixrent migrate preflightrent migrate devrent migrate diffrent migrate planrent migrate createrent migrate sealrent migrate applyrent migrate resetrent migrate statusrent migrate historyrent migrate validaterent migrate driftrent migrate repairrent extension checkrent extension statusrent extension init
Those pages include complete options, multiple scenarios, expected output, and safety behavior.