Before you begin
You need an authenticated CLI and access to manage Apps in the destination Room. Include--scope-workspace <workspace_id> and --scope-room <room_id> when running as a signed-in person; see Authentication. You can also ask an Agent in that Room to follow these steps.
This example uses a customer ID, name, and status. Database Apps can be private to the Room or shared with the workspace; public access requires a Custom App.
Agree on the shape of the data before creating anything: what the records are, their fields and relationships, who creates and edits them, and whether the standard record views are enough. If you need a custom interface or App-owned logic, create a Custom App instead (
app create --runtime-kind custom_app).1. Create the App
--runtime-kind, this creates a Database App: no source repository, draft, or deployment. The command prints the App id used below. Add --pin only if you want a personal sidebar shortcut.
2. Provision the database and define the schema
Create the database, then its customer table:--sql-file for longer scripts and one multi-row INSERT for seed data rather than a command per row. Table and column names use lower-case snake_case.
3. Register the records
Registration connects the database table to Data Viewer. Export a scaffold toapp-registration.json:
manifest.app.id:
--check validates without saving. For an existing App, edit its exported registration rather than replacing it with this new-App example: registration replaces the full document.
registration status reports the saved setup, not a live connectivity test. Use app db check <app_id> when investigating database connectivity; its output may include a sensitive connection URI.
4. Operate the App
Open the App from its Room. Data Viewer should show Customers with Name and Status fields. Add a customer such as “Acme” with status “active”. To work through the CLI, read the generated contract first:record.json before running the POST example:
app data-view:
customers and the status field ID is status. Create a saved view:
app data-view update-default for the shared default view. Configuration uses snake_case keys such as field_id, group_by, and visible_field_ids. A view filters what is displayed; it does not prevent other App users from reading the records.
5. Review access
Checkapp show <app_id> and review the visibility before adding sensitive data. Workspace visibility admits every workspace member and Agent to the App’s exposed records. The home Room still controls management. An Agent widening visibility presents a human approval request.
If you later need custom screens, business APIs, or public access, build a Custom App on this App rather than copying its records into a separate system.