Skip to content

CLI Commands ​

@makoojs/cli provides the makoo command. Use project scripts or pnpm exec makoo. See Local Development and Build and Preview for workflows.

sh
makoo dev [root]
makoo build [root]
makoo preview [root]

[root] is the optional Vite project directory and defaults to the working directory. See Configuration for relative entry resolution in the Makoo plugin.

Omitted options do not override project configuration. Explicit options take precedence. Use --no-... to disable boolean flags; repeated options use the last value.

Common options ​

OptionPurpose
-c, --config <file>Select a Vite configuration file
-m, --mode <mode>Set the mode
--base <path>Set the public base path
-l, --logLevel <level>info / warn / error / silent
--clearScreen / --no-clearScreenAllow or disable Vite screen clearing
--configLoader <loader>Configuration loader; support depends on the installed Vite version
-h, --helpShow help
-v, --versionShow version

makoo dev ​

Starts the dev server. Networking options map to Vite’s server configuration.

OptionPurpose
--host [host]Listen on a host; omit the value to listen on all addresses
--port <port>Set the port
--open [path] / --no-openOpen a browser path on startup, or disable opening
--strictPort / --no-strictPortControl whether an occupied port causes exit
--cors / --no-corsControl CORS
--forceIgnore the dependency optimizer cache
sh
pnpm exec makoo dev --port 5174 --no-open

makoo build ​

Runs a Vite build. These options map to build.

OptionPurpose
--target <target>Build syntax target
--outDir <dir>Output directory
--assetsDir <dir>Asset directory
--assetsInlineLimit <number>Asset inline threshold in bytes
--sourcemap [output]true / false / inline / hidden; no value means true
--minify [minifier] / --no-minifyConfigure minification; supported minifiers depend on Vite
--manifest [name]Emit a build manifest, optionally with a filename
--emptyOutDir / --no-emptyOutDirControl clearing of the output directory
-w, --watchWatch source and rebuild
sh
pnpm exec makoo build --mode staging --outDir release --sourcemap --no-minify

makoo preview ​

Serves existing output without running a build.

OptionPurpose
--host [host]Listen on a host; omit the value to listen on all addresses
--port <port>Set the port
--open [path] / --no-openOpen a browser path on startup, or disable opening
--strictPort / --no-strictPortControl whether an occupied port causes exit
--outDir <dir>Build directory to preview

Networking options map to preview; --outDir maps to build.outDir.

sh
pnpm exec makoo preview --outDir release --port 4174