website/docs/setup-workspace.mdx
import HeaderLabel from '@site/src/components/Docs/HeaderLabel'; import NextSteps from '@site/src/components/NextSteps';
<HeaderLabel text="2 min" />Once moon has been installed, we must setup the workspace,
which is denoted by the .moon folder (or .config/moon) — this is known as the workspace root.
The workspace is in charge of:
Let's scaffold and initialize moon in a repository with the moon init command.
This should typically be ran at the root, but can be nested within a directory.
$ moon init
When executed, the following operations will be applied.
.moon folder with a .moon/workspace.* configuration file..gitignore.:::info
If you're investigating moon, or merely want to prototype, you can use moon init --minimal to
quickly initialize and create minimal configuration files.
:::
Looking to migrate from Nx or Turborepo to moon? Use our
moon ext migrate-nx or
moon ext migrate-turborepo commands for a (somewhat)
seamless migration!
These extensions will convert your existing configuration files to moon's format as best as possible, but is not a requirement.
moon requires a version control system (VCS) to be present for functionality like file diffing,
hashing, and revision comparison. The VCS and its default branch can be configured through the
vcs setting.
vcs:
client: 'git'
defaultBranch: 'master'
moon defaults to
gitand the settings above, so feel free to skip this.
<NextSteps links={[ { icon: 'new-project', label: 'Create a project', url: './create-project' }, { icon: 'workspace-config', label: ( <span> Configure <code>.moon/workspace.*</code> further </span> ), url: './config/workspace', }, { icon: 'workspace', label: 'Learn about the workspace', url: './concepts/workspace' }, ]} />