Skip to content
ReferenceCommand line

rent studio

Use rent studio to inspect schemas, tables, columns, primary keys, and rows without writing a query. PostgreSQL, MySQL, MariaDB, and SQLite use the same interface.

Open a database

rent studio
Rent Studio

URL    http://127.0.0.1:5555
Mode   read only

Studio opens the default browser and remains attached to the terminal until you press Ctrl+C. The listener always binds to the loopback interface.

Choose another port

rent studio --database-url 'sqlite://rent.db' --port 7331
Rent Studio

URL    http://127.0.0.1:7331
Mode   read only

Use --no-open when a script, development container, or terminal multiplexer should start the server without launching a browser:

rent studio --no-open

Browse as a viewer

rent studio --as 'User:{"tenant_id":"acme","id":"ken"}' --no-open
rent studio --anonymous --tenant acme --no-open

Supplying viewer claims or --anonymous selects read-only viewer mode. Studio loads the configured RSL schema and runs ordinary Rent reads with that viewer's permissions and tenant scope. Only modeled, non-system tables are available. Views and internal grant storage are excluded. Query errors never fall back to unrestricted SQL. Unselected fields are omitted.

The claims are trusted local debugging inputs. --admin does not bypass tenancy. Delegation uses the same independent actor and represented claims as permissions explain. Schemas without permissions can still use tenant-scoped browsing. Schemas without either feature use ordinary modeled reads. Application-owned Rust privacy policies require the configured generated client.

Viewer mode rejects --allow-writes, and its server rejects edits. See the viewer example for the complete flow.

Enable editing

Studio is read-only unless --allow-writes is present:

rent studio --allow-writes
Rent Studio

URL    http://127.0.0.1:5555
Mode   editing enabled

An edit must name a catalog-known column and provide every field in the table's primary key. The update is parameterized and must affect exactly one row. Tables without a primary key cannot be edited.

Options

  • --database-url <URL> deliberately overrides the project .env or DATABASE_URL environment variable.
  • --dialect <postgres|mysql|sqlite> overrides URL-based dialect inference.
  • --port <PORT> selects the loopback port. The default is 5555.
  • --no-open leaves browser navigation to you.
  • --allow-writes enables primary-key-targeted cell updates in local administrator mode.
  • --schema <PATH> selects the viewer schema, otherwise resolved from project configuration or rent/schema.rsl.
  • --as <MODEL:KEY> selects a subject, including a complete JSON object for compound keys.
  • --anonymous explicitly selects a viewer without a subject. It conflicts with --as.
  • --tenant <KEY> supplies tenant scope when it cannot be inferred from the subject key.
  • --group <MODEL:KEY> and --admin supply trusted actor claims.
  • --on-behalf-of <MODEL:KEY>, --represented-group <MODEL:KEY> and --represented-admin supply independent represented-subject claims.