moon

repository·master·Indexed 11 days ago

https://github.com/moonrepo/moon

A high-performance repository management and orchestration tool written in Rust. moon streamlines the developer experience in web ecosystems by providing smart hashing for deterministic builds, remote caching, integrated toolchain management, and a project dependency graph. It includes a CLI, a VS Code extension for task visualization, and utilities for report processing and TypeScript type safety.

Tokens
317.6K
Snippets
1.3K
Records
1.8K
Agent score
81%

What's inside moon

  1. What is @moonrepo/visualizer?

    master
    @moonrepo/visualizer is a tool designed to provide a visual representation of your project graph and dependency graph within a moon workspace. It helps developers understand the relationships and dependencies between different tasks and projects managed by moon.
  2. Overview of moon features

    master

    moon is a build system and repo management tool designed to streamline development in the web ecosystem. Key capabilities include:

    Management

    • Smart hashing: Ensures deterministic and reproducible builds by collecting inputs from multiple sources.
    • Remote caching: Persists builds and hashes across teammates and CI/CD.
    • Integrated toolchain: Automatically manages versions for Node.js and other tools.
    • Multi-platform: Supports Linux, macOS, and Windows.

    Organization

    • Project graph: Maps dependency and dependent relationships.
    • Code generation: Scaffolds new applications and libraries.
    • Dependency workspaces: Works alongside package manager workspaces.
    • Code ownership: Manages owners, maintainers, and generates CODEOWNERS.

    Orchestration

    • Dependency graph: Optimizes performance by understanding task relationships.
    • Action pipeline: Executes actions in parallel/order using a thread pool.
    • Action distribution: Distributes actions across multiple machines.
    • Incremental builds: Rebuilds only what has changed via smart hashing.

    Notification

    • Flakiness detection: Automatic retries for flaky builds.
    • Webhook events: Triggers webhooks for pipeline events.
    • Terminal notifications: Build status updates directly in the terminal.
    • Git hooks: Manages Git hooks to enforce workflows.
  3. What is moon?

    master

    moon is a repository management, organization, orchestration, and notification tool for the web ecosystem, written in Rust. It is designed to sit between high-complexity build systems like Bazel and low-complexity script runners (like make or just).

    Key benefits include:

    • Increased productivity: High performance and low memory usage via Rust.
    • Incremental adoption: Can be adopted project-by-project or task-by-task.
    • Reduced task confusion: Access tasks via moon <project_name> <task_name> instead of managing complex root scripts.
    • Version consistency: Ensures the same versions of languages and dependency managers are used across all developer environments.
    • Built-in automation: Automatically handles dependency installation (node_modules), project dependency syncing, and TypeScript project reference syncing.
  4. Overview of WASM toolchain plugin APIs

    master

    The moon WASM toolchain plugin API is organized into three tiers of functionality, allowing developers to implement varying levels of toolchain management and integration.

    • Tier 1: Focuses on core toolchain registration, initialization, version detection, configuration, and Docker-related lifecycle management (metadata, pruning, scaffolding) and workspace/project synchronization.
    • Tier 2: Focuses on extending the project graph, commands, tasks, and scripts, as well as dependency management (installing, locating roots, parsing locks/manifests) and environment setup.
    • Tier 3: Focuses on low-level tool management, including registering tools, handling installation (prebuilt downloads or native installs), archive unpacking, locating executables, and version resolution/loading.
  5. What is proto?

    master

    proto is a pluggable version manager and unified toolchain. It allows you to download, install, and manage multiple tools—such as programming languages, package managers, or custom implementations via plugins—through a single CLI interface.

    Key features include:

    • High Performance: Built with Rust and WASM.
    • Multi-language: A single CLI for all languages.
    • Cross-platform: Consistent experience across macOS, Linux, and Windows.
    • Contextual version detection: Automatically ensures the correct tool version is used based on context.
    • Security: Includes checksum verification to ensure tools come from trusted sources.
    • Pluggable architecture: Supports custom tooling via plugins.
  6. Use @moonrepo/types for TypeScript development

    master
    The @moonrepo/types package provides reusable TypeScript definitions for moon projects, tasks, and configurations. Use this package when building tools, plugins, or integrations that need to interact with moon's configuration schema or project structures with full type safety.
  7. Understand moon v1.7 configuration and error improvements

    master

    Starting with version 1.7, moon introduced a rewritten configuration system powered by schematic. This update provides several key improvements for developers managing moon configuration files:

    • Strict Parsing: moon now performs strict parsing using serde. If you include unknown fields or provide invalid value types in your configuration, moon will return a descriptive error message identifying the specific failure and the file that failed to parse. This helps catch typos and incorrectly nested settings.
    • Recursive Validation: Instead of stopping at the first error, moon now aggregates all validation errors. This includes errors from deeply nested fields, allowing you to see all configuration issues at once rather than fixing them one by one.
    • Enhanced Error Reporting: moon uses the miette crate to render all errors and diagnostics. This provides a much better developer experience with improved formatting and, in some cases, code frames that point to the exact location of the error within your configuration files (e.g., in JSON files).
  8. Core features of moon

    master

    moon provides capabilities across four main pillars:

    Management

    • Smart hashing: Ensures deterministic and reproducible builds by collecting inputs from multiple sources.
    • Remote caching: Shares builds, hashes, and caches between teammates and CI/CD environments.
    • Integrated toolchain: Automatically manages and installs explicit tool versions (e.g., Node.js) to ensure environment consistency.
    • Multi-platform: Supports Linux, macOS, and Windows.

    Organization

    • Project graph: Maps dependency and dependent relationships between projects.
    • Code generation: Scaffolds new applications, libraries, and tooling.
    • Dependency workspaces: Integrates with package manager workspaces to maintain distinct dependency trees.
    • Code ownership: Manages owners, maintainers, and support channels, and can generate CODEOWNERS files.

    Orchestration

    • Dependency graph: Optimizes performance by understanding task dependencies.
    • Action pipeline: Executes actions in parallel and in order using a thread pool.
    • Action distribution: Distributes actions across multiple machines for higher throughput.
    • Incremental builds: Uses smart hashing to only rebuild projects that have changed.

    Notification

    • Flakiness detection: Automatically retries builds to mitigate flaky results.
    • Webhook events: Sends webhooks for pipeline events (useful for metrics).
    • Terminal notifications: Provides build status updates directly in your terminal.
    • Git hooks: Manages Git hooks to enforce contributor workflows.
  9. New features in proto v0.28

    master

    The v0.28 release includes several quality-of-life improvements:

    • Upgrade Notifications: proto will now display a message when your current installation is out of date.
    • Enhanced Error Messages: Error reporting has been improved to include specific information related to the plugin that failed.
    • Improved State Logic: The "last used at" logic has been updated to prevent race conditions with the tool manifest.