Skip to main content


The moon init [dest] command will initialize moon into a repository and scaffold config files by creating a .moon folder. By default moon will enable the following supported languages when a certain file exists, or we'll prompt you to decide.

  • node enabled when package.json exists.
  • rust enabled when Cargo.toml exists.
  • typescript enabled when tsconfig.json exists.

Furthermore, we'll also attempt to detect applicable language versions, dependency managers, and other ecosystem related settings.

$ moon init

# In another directory
$ moon init ./app

The command can also be used to initialize a specific tool after moon has already been initialized. Perfect for adopting a new language into the workspace.

$ moon init --tool typescript


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


  • --force - Overwrite existing config files if they exist.
  • --minimal - Generate minimal configurations and sane defaults.
  • --tool - Individual tool to initialize and configure.
    • Accepts: node, rust, typescript
  • --yes - Skip all prompts and enables tools based on file detection.