CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-moonrepo--core-macos-x64

macOS x64 binary distribution package for the moon repository management tool

Pending
Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

extensions.mddocs/

Extensions & Integration

Commands for working with plugins, extensions, and external integrations including Docker, migration tools, and protocol servers.

Capabilities

Execute Extension Plugin

Run an extension plugin with optional arguments passed through.

moon ext <id> [-- args...]

Arguments:

  • id (required) - ID of the extension plugin to execute
  • args (optional) - Arguments to pass through to the extension (after --)

Usage Examples:

# Execute an extension
moon ext deploy

# Execute extension with arguments
moon ext deploy -- --environment production --verbose

# Pass complex arguments
moon ext custom-tool -- --config ./custom.json --output ./dist

MCP Server

Start a Model Context Protocol (MCP) server for AI agent integration.

moon mcp

This command starts an MCP server that allows AI agents to:

  • Query project information
  • Execute moon commands
  • Analyze workspace structure
  • Access build and test results

Usage Examples:

# Start MCP server
moon mcp

# Use in AI agent configuration
# Add to your agent's MCP server list

Docker Integration

Commands for integrating moon projects with Docker and containerization.

moon docker <subcommand>

Subcommands:

Generate Dockerfile

Generate a default Dockerfile for a project based on its configuration and dependencies.

moon docker file <project> [--multi-stage] [--template <TEMPLATE>]

Arguments:

  • project (required) - Project ID to generate Dockerfile for

Options:

  • --multi-stage - Generate multi-stage Dockerfile for optimized builds
  • --template <TEMPLATE> - Use a specific Dockerfile template

Usage Examples:

# Generate basic Dockerfile
moon docker file my-app

# Generate multi-stage Dockerfile
moon docker file my-app --multi-stage

# Use custom template
moon docker file my-app --template node-alpine

Prune Docker Context

Remove extraneous files and folders from Docker build context to optimize build performance.

moon docker prune [--dry-run]

Options:

  • --dry-run - Preview what would be removed without making changes

Usage Examples:

# Remove unnecessary files from Docker context
moon docker prune

# Preview what would be removed
moon docker prune --dry-run

Scaffold Docker Repository

Create a repository skeleton optimized for Docker builds with moon.

moon docker scaffold <name> [--template <TEMPLATE>]

Arguments:

  • name (required) - Name for the new repository

Options:

  • --template <TEMPLATE> - Template to use for scaffolding

Usage Examples:

# Create Docker-optimized repository
moon docker scaffold my-docker-app

# Use specific template
moon docker scaffold my-app --template microservice

Setup Docker Environment

Setup Dockerfile by installing dependencies for necessary projects.

moon docker setup [--projects <PROJECTS>]

Options:

  • --projects <PROJECTS> - Comma-separated list of projects to setup

Usage Examples:

# Setup all project dependencies
moon docker setup

# Setup specific projects
moon docker setup --projects my-app,shared-utils

Migration Tools

Commands for migrating existing projects to use moon.

moon migrate <subcommand> [--skip-touched-files-check]

Global Options:

  • --skip-touched-files-check - Disable the check for modified/dirty files

Subcommands:

Migrate from package.json

Convert package.json scripts and dependencies to moon task configuration.

moon migrate from-package-json [--projects <PROJECTS>] [--skip-scripts <SCRIPTS>] [--task-prefix <PREFIX>]

Options:

  • --projects <PROJECTS> - Comma-separated list of projects to migrate
  • --skip-scripts <SCRIPTS> - Scripts to skip during migration
  • --task-prefix <PREFIX> - Prefix to add to generated task names

Usage Examples:

# Migrate all package.json files
moon migrate from-package-json

# Migrate specific projects
moon migrate from-package-json --projects web-app,api-server

# Skip certain scripts
moon migrate from-package-json --skip-scripts "postinstall,prepare"

# Add prefix to task names
moon migrate from-package-json --task-prefix "npm-"

# Skip dirty file check
moon migrate from-package-json --skip-touched-files-check

Migrate from Turborepo

Convert turbo.json configuration to moon configuration files.

moon migrate from-turborepo [--config <CONFIG>]

Options:

  • --config <CONFIG> - Path to turbo.json file (default: ./turbo.json)

Usage Examples:

# Migrate from default turbo.json
moon migrate from-turborepo

# Migrate from custom config file
moon migrate from-turborepo --config ./custom-turbo.json

# Skip dirty file check
moon migrate from-turborepo --skip-touched-files-check

Extension Development

Creating Extensions

Extensions are standalone executables that integrate with moon:

# Extension directory structure
~/.moon/extensions/
├── deploy/
│   ├── extension.yml      # Extension metadata
│   └── bin/
│       └── deploy         # Executable
└── custom-tool/
    ├── extension.yml
    └── deploy.js          # Node.js script

Extension Configuration

Extensions are configured using extension.yml:

# extension.yml
name: "Deploy Extension"
description: "Deploy applications to cloud providers"
version: "1.0.0"
author: "Development Team"

executable:
  command: "./bin/deploy"
  
arguments:
  - name: "environment"
    description: "Target environment"
    required: true
    
  - name: "verbose"
    description: "Enable verbose output"
    type: "boolean"
    
permissions:
  - "workspace:read"
  - "project:read"
  - "task:execute"

Extension API access

Extensions can access moon data through environment variables:

# Available in extension environment
MOON_WORKSPACE_ROOT=/path/to/workspace
MOON_PROJECT_ROOT=/path/to/project  
MOON_CACHE_DIR=/path/to/cache
MOON_LOG_LEVEL=info

Docker Best Practices

Multi-stage Builds

Moon-generated Dockerfiles support optimized multi-stage builds:

# Generated by moon docker file
FROM node:18-alpine AS dependencies
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production

FROM node:18-alpine AS build  
WORKDIR /app
COPY . .
RUN moon run build

FROM node:18-alpine AS runtime
WORKDIR /app  
COPY --from=dependencies /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
CMD ["node", "dist/index.js"]

Build Context Optimization

Use moon docker prune to optimize build contexts:

# Before pruning
.dockerignore
node_modules/
.git/
docs/
*.md

# After moon docker prune
# Additional patterns added:
.moon/cache/
tmp/
*.log
coverage/

Migration Strategies

Gradual Migration

Migrate projects incrementally:

# Start with a single project
moon migrate from-package-json --projects my-app

# Validate the migration
moon check my-app

# Migrate additional projects
moon migrate from-package-json --projects shared-utils

Script Mapping

Common package.json scripts map to moon tasks:

  • buildbuild task
  • testtest task
  • lintlint task
  • startdev or start task
  • devdev task

Dependency Handling

Moon automatically handles workspace dependencies:

// Before migration (package.json)
{
  "scripts": {
    "build": "tsc",
    "test": "jest"
  },
  "dependencies": {
    "shared-utils": "workspace:*"
  }
}
# After migration (moon.yml)
tasks:
  build:
    command: "tsc"
    deps: ["shared-utils:build"]
    
  test:
    command: "jest"  
    deps: ["~:build"]

docs

environment.md

execution.md

extensions.md

generation.md

graphs.md

index.md

maintenance.md

project-task.md

query.md

toolchain.md

tile.json