rozenite-realm-devtools
v0.3.0
Published
Rozenite DevTools plugin for inspecting Realm databases in React Native apps
Maintainers
Readme
rozenite-realm-devtools
A read-only Rozenite panel for inspecting Realm databases inside React Native DevTools.
Features
- Runtime schema and row inspection
- Realm Query Language filtering
- Per-schema query and page state
- Per-schema column picker, remembered across reloads
- Fixed 100-row pagination
- Compact linked-object primary keys
- Clickable object, list, and set links
- Live updates and production no-op entry point
- Live schema updates after migrations
Install
First enable Rozenite in the app, then install the plugin from GitHub:
npm install -D github:gustavomts/rozenite-realm-devtools#v0.1.5Pass the open Realm instance near the database provider:
import { useRealmDevTools } from 'rozenite-realm-devtools';
function DatabaseProvider({ children }) {
const realm = useRealm();
useRealmDevTools(realm);
return children;
}Include the plugin in the Rozenite Metro configuration and open React Native DevTools:
withRozenite(config, {
enabled: process.env.WITH_ROZENITE === 'true',
include: ['rozenite-realm-devtools'],
});WITH_ROZENITE=true npm startThe Realm panel lists every queryable schema. Select one and enter a Realm Query Language expression such as:
name CONTAINS[c] "john"API
useRealmDevTools(realm: Realm | null | undefined): voidThe inspector is read-only. It supports one open Realm, updates the active page after Realm changes, truncates displayed strings after 500 characters, and shows at most 20 linked primary keys per list cell.
Agent tools
When a Rozenite Agent session is active, the plugin exposes two read-only tools:
listSchemaslists queryable schemas, properties, and row counts.queryRealmruns an optional Realm Query Language filter and returns one 100-row page. Secret-like properties are redacted.
License
MIT
