Cookbook Router
@cookbook/router-cli

@cookbook/router-cli API

Command-line and programmatic APIs for configuration, static route loading, generation, validation, manifests, and bundler integration.

Package role

@cookbook/router-cli turns route sources into validated physical artifacts. It also exports the same engine used by every bundler plugin. There is one generation pipeline, not six plugins with six interpretations of your route tree.

Binary

The package installs two binary names that resolve to the same entrypoint:

cookbook-router <command> [options]
cbr <command> [options]

Commands are init, generate, manifest, and validate. generate --watch invokes the exported watch engine.

Public API groups

Import boundary

All documented imports come from the package root:

import { generateRouterArtifacts, type CliRouteOptions } from '@cookbook/router-cli';

Internal source paths are not public API. A helper existing in src/ is not permission to depend on it.

On this page