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:
npx lunaria --helppnpm lunaria --helpyarn lunaria --helpThis command will display the following message in your 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.Commands
Section titled “Commands”lunaria build
Section titled “lunaria build”Builds your dashboard and status to disk. By default, the files will be output in dist/lunaria, named index.html and status.json respectively.
Options
Section titled “Options”--force
Section titled “--force”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.
lunaria init
Section titled “lunaria init”Initializes Lunaria in your project, prompting you with a few questions and setting up a new lunaria.config.mjs file.
lunaria preview
Section titled “lunaria preview”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.
Options
Section titled “Options”--port <number>
Section titled “--port <number>”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.
Global Options
Section titled “Global Options”--help
Section titled “--help”Prints the help message.
--config <path>
Section titled “--config <path>”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.