Skip to main content

init

The moon init [dest] command will initialize moon into a repository and scaffold config files by creating a .moon folder. By default, moon will automatically infer the Node.js version, package manager, and potential projects based on existing files.

$ moon init

# In another directory
$ moon init ./app

Arguments

  • [dest] - Destination to initialize and scaffold into. Defaults to . (current working directory).

Options

  • --force - Overwrite existing config files if they exist.
  • --inheritProjects <as> - Sets the default value on whether to inherit projects from package.json workspaces. Supports:
    • none - Do not inherit projects.
    • globs-list - Inherit globs as-is and configure as a list.
    • projects-map - Glob the file system for projects and configure as a map.
  • --packageManager <type> - Sets the default value for which package manager to use, if none were detected.
    • Types: npm, pnpm, yarn
  • --yes - Skip all prompts and use default values.