Rent command line
The rent command handles project setup and database lifecycle work. Run it from the project root so its default rent/schema.rsl, rent/generated, and rent/migrations paths resolve correctly.
rent --helpRust-native entity framework
Usage: rent [OPTIONS] <COMMAND>
Commands:
new Create a complete local Rent application
init Create schema declarations for one or more entities
generate Generate the statically typed client source tree
dev Generate immediately and keep the typed client synchronized while the schema changes
seed Run the application's database seed binary
describe Print the normalized schema description
validate Validate an RSL schema and its semantic model
format Canonically format an RSL schema
fix Convert ordered legacy entity types into stable global-ID ranges
migrate Inspect, plan, or apply database migrations
extension Create and validate `PostgreSQL` extension packs
db Inspect or manage a live database
studio Browse and optionally edit a local development database in a web interface
doctor Validate project configuration, schema, generated code, migrations, Cargo, and optional database access
completions Generate a shell completion script
help Print this message or the help of the given subcommand(s)
Options:
--root <ROOT> Project directory used to resolve relative paths [default: .]
-h, --help Print help
-V, --version Print versionTypical project workflow
rent newcreates a complete local application.rent initadds models to the central RSL schema.rent db pullcan create entities from an existing database.rent validatechecks grammar and semantic correctness.rent formatcanonicalizes the authored schema.rent generategenerates the typed Rust client once.rent devkeeps that client synchronized while the schema changes.rent doctorchecks that the project is internally consistent.rent seedruns application-owned development or reference-data setup.rent describegives you a quick, reviewable schema summary.rent migrate preflightclassifies every proposed change.rent migrate devplans, applies, and verifies a local schema edit.rent migrate diffpreviews the database changes.rent migrate planwrites a checksummed migration for review.rent migrate validateverifies the committed directory.rent migrate applyexecutes the exact reviewed files.rent migrate statusandrent migrate driftverify deployment state.rent studiobrowses the live development data without writing SQL.
rent migrate history reads the durable journal. rent migrate repair is reserved for operator-controlled dirty-state recovery.
rent migrate reset proves a development database can be rebuilt from reviewed history. rent fix is for applications adopting global IDs with existing data.
Use rent migrate create and
rent migrate seal for authored data backfills that cannot be derived from the
RSL schema.
rent extension check verifies that a PostgreSQL environment can satisfy the schema, rent extension status inspects installed extension objects, and rent extension init scaffolds a reusable extension pack.
Shared options
Pass --root before the subcommand when the project is not the current directory:
rent --root services/api generateDatabase commands first use an explicit --database-url, then DATABASE_URL from the process environment, then
DATABASE_URL from the project-root .env. A generated SQLite project works without additional configuration:
rent migrate diffUse --database-url for a deliberate one-command override. URL schemes select PostgreSQL, MySQL/MariaDB, or SQLite
automatically. Use --dialect only when the URL cannot express the correct backend.
Relative SQLite filenames resolve against --root (the current directory when omitted), regardless of
whether the URL comes from a flag, environment variable, .env, or the default. Absolute filenames and
in-memory URLs are unchanged. This keeps migrations and their database together when running from a parent
directory, for example rent --root services/social migrate dev --name add_comments.
Install tab completion with rent completions.