Skip to content
Getting Started

CLI reference

Create, develop, build, and extend a documentation project.

Creator and runtime

The creator, @lexibase/create-rdx, generates a new directory. The runtime command, rdx, belongs to the installed @lexibase/rdx package and works inside an existing documentation project. You do not need a global RDX installation.

Create a project

pnpm create @lexibase/rdx@latest my-docs

The Yarn creator example uses yarn dlx (Yarn 2+).

Omit the name to get an interactive prompt. The directory name is preserved; the generated package name is normalized to lowercase. Existing directories are not overwritten.

Creator optionEffect
--helpShow usage without creating a project
--versionPrint the creator's version
--skip-installCreate files and leave installation to you

Development and production

Run these from the generated project root:

pnpm dev
pnpm build
pnpm start

dev starts the development server, build prepares a production build, and start serves that build. Stop the development server before building for production.

build checks documentation before preparing or compiling the site. Problems stop the build and include their source file, line and column. See Checking documentation for the checks performed.

The underlying commands are rdx dev, rdx build, and rdx start. They prepare the internal app automatically. Forward Next.js arguments when needed:

pnpm rdx dev --port 3001
pnpm rdx start --hostname 127.0.0.1 --port 3001

Check documentation

pnpm rdx check

Validate static document links, section anchors and local assets without building or preparing the site. Problems include their file, line and column. The command exits with 1 if problems are found and 0 when the content passes. Use rdx check --help for usage. See Checking documentation for scope and examples.

Prepare without starting a server

pnpm rdx prepare

This validates configuration and prepares .rdx/, including public assets and configured plugin preparation. It does not create a documentation snapshot.

Plugins and snapshots

Activate content languages with the optional i18n installer:

pnpm rdx add i18n

It uses lang as the primary language, asks for additional languages and prepares their folders. Use --locales en,es-ES to supply additional languages without a prompt, and --package-manager npm|pnpm|yarn to choose the installer. Later language additions are made in locales and their translation directories. See Languages.

pnpm rdx add versioning
pnpm rdx version 1.0.0
pnpm rdx archive 1.0.0
pnpm rdx unarchive 1.0.0

version, archive, and unarchive are registered only after the versioning plugin is configured. version publishes the ready docs/ content, replacing the published edition of the same major or adding a new major. Superseded URLs redirect to the updated edition. Archiving and restoring update the manifest without modifying snapshot contents. See Plugins and Versioning before creating snapshots. rdx --help lists the built-in command usage.

The installer can be selected explicitly with rdx add versioning --package-manager npm (or pnpm / yarn). Normally RDX detects the package manager from how the command was invoked.