Reference
Packages and API
The six npm packages behind rndl, what each exports, and the dependency policy that keeps the toolkit lean.
Most people only ever install the CLI. The toolkit is split into focused packages so you can build your own tooling on the same foundations.
| Package | Purpose |
|---|---|
react-native-deeplink-devtools | The rndl CLI: routes, validate, open, interactive, typegen |
@deeplink-devtools/core | Route-table model, matchers, validators (pure TS, no RN deps) |
@deeplink-devtools/adapter-expo-router | Builds a route table from an Expo Router app/ directory |
@deeplink-devtools/adapter-react-navigation | Builds a route table from a React Navigation linking config |
@deeplink-devtools/runtime | Tiny in-app reporter for live deep-link debugging (dev-only) |
@deeplink-devtools/typegen | Generates typed route helpers from your route table |
Every export in every package is documented with TSDoc, so the details are in your editor.
@deeplink-devtools/core
The pure TypeScript core: no React Native dependency, so it runs anywhere, including CI.
npm install @deeplink-devtools/core- Route model:
RouteTable,Route,Param,Diagnostic. - Validators:
validateAasaandvalidateAssetlinks, pure functions over aFetchedDocumentseam (the caller does the network fetch), plustoSariffor a SARIF 2.1.0 report. - URL building:
buildRouteUrl,normalizePrefix. - Dev-transport protocol:
parseReporterMessage,DEFAULT_REPORTER_PORT, and the reporter message types shared by the CLI and the runtime package.
@deeplink-devtools/adapter-expo-router
import { buildRouteTable } from '@deeplink-devtools/adapter-expo-router';
const { table, diagnostics } = buildRouteTable('src/app');Walks an Expo Router app directory and returns a normalized RouteTable plus diagnostics. See
rndl routes for the conventions it understands.
@deeplink-devtools/adapter-react-navigation
import { scanLinkingModule } from '@deeplink-devtools/adapter-react-navigation';
const { table, diagnostics } = await scanLinkingModule('src/navigation/linking.ts#linking', {
cwd: process.cwd(),
});Executes a linking module under Node (TypeScript and ESM handled by jiti) and walks
config.screens into a RouteTable.
@deeplink-devtools/runtime
The in-app reporter. See Runtime reporter for the hooks, options, and the production no-op guarantee.
@deeplink-devtools/typegen
The code generator behind rndl typegen. If you are building your own tooling, it exports the
pure generator:
import { generateDeepLinkTypes } from '@deeplink-devtools/typegen';
import type { RouteTable } from '@deeplink-devtools/core';
const source: string = generateDeepLinkTypes(routeTable, { defaultPrefix: 'myapp://' });See rndl typegen for what the generated module looks like.
Dependency policy
The toolkit has a zero-dependency bias; every runtime dependency is justified:
- The CLI uses commander (argument parsing),
ws (the dev-transport WebSocket server), and
@clack/prompts (the
interactiveTUI). - The React Navigation adapter uses jiti to execute TypeScript/ESM linking modules.
validateuses Node's built-infetch, so there is no HTTP dependency.- The runtime package ships no runtime dependencies of its own;
react,react-native, andexpo-routerare peers (the last optional).