Skip to content

Lunaria CLI

Lunaria comes with the built-in lunaria command-line interface (CLI) program to help you use Lunaria from your terminal window.

Use the CLI by running one of the commands listed below, optionally including any options to modify the command’s default behavior.

You can check all the available commands and global options by typing lunaria --help in your terminal:

Terminal window
npx lunaria --help

This command will display the following message in your terminal window:

Terminal window
lunaria [command] [...options]
Commands
build Build your dashboard and status to disk.
init Initialize Lunaria in your project.
preview Preview your built dashboard locally.
Global Options
--help Show this help message.
--config <path> Specify the location of your config file.

Builds your dashboard and status to disk. By default, the files will be output in dist/lunaria, named index.html and status.json respectively.

Ignores the cached git data and builds the status from scratch.

This option is recommended when you suspect the cached data is stale, e.g. after rewriting the history of your branch.

Initializes Lunaria in your project, prompting you with a few questions and setting up a new lunaria.config.mjs file.

Starts a local server to serve your latest localization dashboard built by lunaria build.

This command is not meant for being used in production. For production hosting, see our specific deploy instructions.

Specifies which port to open the preview server on. By default, 3000 will be used. If 3000 or your specified port isn’t available, a random available port will be used instead.

Prints the help message.

Specifies the path to Lunaria’s configuration file relative to the project’s root. By default, Lunaria looks for a lunaria.config.mjs, lunaria.config.js, lunaria.config.ts, lunaria.config.mts, lunaria.config.cjs, or lunaria.config.cts file at the root of the project, in this order.

Use this option if you wish to locate your configuration file in other directory or with a different name.