Skip to content

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.

PackagePurpose
react-native-deeplink-devtoolsThe rndl CLI: routes, validate, open, interactive, typegen
@deeplink-devtools/coreRoute-table model, matchers, validators (pure TS, no RN deps)
@deeplink-devtools/adapter-expo-routerBuilds a route table from an Expo Router app/ directory
@deeplink-devtools/adapter-react-navigationBuilds a route table from a React Navigation linking config
@deeplink-devtools/runtimeTiny in-app reporter for live deep-link debugging (dev-only)
@deeplink-devtools/typegenGenerates typed route helpers from your route table

Every export in every package is documented with TSDoc, so the details are in your editor.

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: validateAasa and validateAssetlinks, pure functions over a FetchedDocument seam (the caller does the network fetch), plus toSarif for 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.
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.

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.

The in-app reporter. See Runtime reporter for the hooks, options, and the production no-op guarantee.

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 interactive TUI).
  • The React Navigation adapter uses jiti to execute TypeScript/ESM linking modules.
  • validate uses Node's built-in fetch, so there is no HTTP dependency.
  • The runtime package ships no runtime dependencies of its own; react, react-native, and expo-router are peers (the last optional).