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
| Option | Purpose |
|---|---|
-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-clearScreen | Allow or disable Vite screen clearing |
--configLoader <loader> | Configuration loader; support depends on the installed Vite version |
-h, --help | Show help |
-v, --version | Show version |
makoo dev
Starts the dev server. Networking options map to Vite’s server configuration.
| Option | Purpose |
|---|---|
--host [host] | Listen on a host; omit the value to listen on all addresses |
--port <port> | Set the port |
--open [path] / --no-open | Open a browser path on startup, or disable opening |
--strictPort / --no-strictPort | Control whether an occupied port causes exit |
--cors / --no-cors | Control CORS |
--force | Ignore the dependency optimizer cache |
sh
pnpm exec makoo dev --port 5174 --no-openmakoo build
Runs a Vite build. These options map to build.
| Option | Purpose |
|---|---|
--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-minify | Configure minification; supported minifiers depend on Vite |
--manifest [name] | Emit a build manifest, optionally with a filename |
--emptyOutDir / --no-emptyOutDir | Control clearing of the output directory |
-w, --watch | Watch source and rebuild |
sh
pnpm exec makoo build --mode staging --outDir release --sourcemap --no-minifymakoo preview
Serves existing output without running a build.
| Option | Purpose |
|---|---|
--host [host] | Listen on a host; omit the value to listen on all addresses |
--port <port> | Set the port |
--open [path] / --no-open | Open a browser path on startup, or disable opening |
--strictPort / --no-strictPort | Control 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 4174Related APIs
- Vite plugins:
makoo()andmakooDev(); CDN configuration. - Configuration types: MakooOptions, CliConfig, AppConfig, MonkeyConfig, MonkeyServerConfig, MonkeyBuildConfig.
- Userscript APIs and GM types.