Use the CLI

Use the Radiant CLI when you want to edit docs locally and preview changes before you push them.

You do not need the CLI for dashboard editing or writing-agent changes. Use it when your docs live in a repository you can clone and edit on your machine.

Before you start

You need:

  • A local copy of the repository that contains your docs.
  • Node.js and npm available in your terminal.
  • A docs root folder that contains docs.json.

If your docs are in a monorepo, change into the folder that contains docs.json before running the CLI.

Start local preview

From the docs root, run:

npx radiant-docs

The CLI starts a local preview and prints the local URL. Use the URL shown in your terminal. It is usually:

http://localhost:4321

Open that URL in your browser.

Edit and review

While the CLI is running, edit .mdx files, assets, or docs.json. When you save, the CLI syncs the change into the local preview.

The terminal shows changed files as they are synced. Keep the CLI running while you review changes in the browser.

Stop the preview

Press Ctrl+C in the terminal.

What to expect

The first run can take longer because the CLI prepares the local preview and installs preview dependencies. Later runs are faster.

When the preview starts, the CLI watches your docs folder. Save a page, asset, or docs.json change and refresh the browser if the page does not update automatically.

What the CLI does not do

The CLI does not publish your docs, commit files, or push changes. After you review local changes, commit and push them through your normal Git workflow.

Radiant deploys the updated docs after changes reach the connected repository.

Common terminal messages

Run the CLI from the docs root: the folder that contains docs.json.

Fix the JSON syntax in docs.json, then run the CLI again.

This is expected on the first run or after the preview framework updates.

Next steps