Reference

moon everyday loop

Install → init → map projects → run targets. Cheat sheet for the setup path (moon v2 docs).

1. Install

2. Init workspace

$ moon init
# optional: moon init --minimal

3. Discover projects

Folders are invisible until listed in .moon/workspace.*projects (required).

# map
projects:
  client: 'apps/client'
  server: 'apps/server'

# globs
projects:
  - 'apps/*'
  - 'packages/*'

# both
projects:
  globs:
    - 'apps/*'
  sources:
    www: 'www'

Inspect: moon project <id>

4. Tasks

5. Run

$ moon run app:build
$ moon run client:dev server:dev
$ moon run :test
$ moon run '~:test'
$ moon run app:build --affected
$ moon run app:build -- --force   # passthrough args after --

moon run builds an action graph, runs deps first (topo), hashes/caches tasks. Default fail-fast.

VCS note

moon needs VCS for hashing/affected. Defaults to git; set vcs.defaultBranch if not master.