moon
$ moon Official Low Riskmoon is a polyglot monorepo task runner and build system written in Rust that models project graphs, dependency-aware task pipelines, and toolchain pins. Agents can inspect projects, tasks, and affected targets in JSON via moon query and execute deterministic builds with moon run and moon ci.
brew install moon moon evaluates local workspace graphs, runs incremental task hashes, and executes repo commands directly; CLI invocations are faster and more reliable than an MCP wrapper.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Provides moon query projects --json, moon query tasks --json, moon query affected --json, --color=false, and CI-oriented moon ci.
moon querysubcommands emit structured--jsongraphs- Supports
NO_COLOR=1and non-interactive CI execution
moon query inspects affected scopes safely before running tasks, and build caches live in .moon/cache/ unless remote caching is configured.
moon query affected --jsonpreviews impacted targets without executing side effects
Single Rust binary installable via Homebrew, @moonrepo/cli npm wrapper, or GitHub releases across macOS, Linux, and Windows.
- Available via
brew install moonandnpm install -g @moonrepo/cli
Content-hashed incremental caching and affected-target filtering dramatically shorten monorepo test and lint loops.
- Fine-grained task graph hashing skips unchanged packages
Actively maintained by moonrepo (moonrepo/moon) under MIT license with frequent releases.
- Official
moonrepo/moonrepository under MIT license
Well-structured documentation at moonrepo.dev/docs covering CLI flags, YAML schemas, and CI recipes.
- Comprehensive CLI and workspace config docs at moonrepo.dev/docs
Security, Auth & Guardrails
Local execution needs no auth; optional remote caching (unstable_remote / Bazel REAPI) reads tokens from environment variables or .moon/workspace.yml.
MIT open-source CLI; free to use locally, with optional self-hosted or third-party remote cache storage.
# moon Agent Rules - Query `moon query projects --json` or `moon query tasks --json` before guessing task names. - Use `moon query affected --json` to scope checks and pass `--color=false` or `NO_COLOR=1` in automation.
Agent-Ready Command Recipes
Safe Read-Only Queries
moon query projects --json
Returns every configured project, root path, language, and dependency edges in structured JSON.
moon query affected --json
Lists tasks impacted by current git changes without running them.
Controlled Writes & Previews
moon ci :test --color=false
Executes affected :test targets deterministically with ANSI colors disabled for clean agent logs.
Strengths for Agents
- +
moon query projects --jsonandmoon query affected --jsongive agents exact monorepo topology before running tasks. - + Content-hashed caching and
moon ciminimize redundant test runs across large repositories. - + Single Rust binary works across Node, Rust, Python, Go, and polyglot workspaces.
Caveats & Pitfalls
- ! Requires
.moon/workspace.ymlandmoon.ymlproject configuration to unlock graph features. - ! Task execution stdout from underlying tools remains unstructured text.