CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-moonrepo--core-linux-arm64-musl

Linux ARM64 musl binary distribution 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

advanced.mddocs/

Advanced Commands

Advanced moon capabilities for workspace analysis, toolchain management, and debugging.

Capabilities

Workspace Query System

Query and analyze workspace information using flexible filter criteria.

/**
 * Query projects using flexible filter criteria
 * Supports complex logical expressions and patterns
 */
moon query projects <statement>

# Query Statement Syntax:
# Logical Operators:
# &&               AND operation
# ||               OR operation  
# !                NOT operation
# ()               Grouping

# Filter Criteria:
# language=<lang>       Programming language (javascript, typescript, rust, etc.)
# projectType=<type>    Project type (application, library, tool, etc.)
# tag=<tag>            Project tag
# project~<pattern>     Project name pattern matching
# projectSource~<path>  Source path pattern matching
# hasTask=<task>       Projects that define specific task
# dependsOn=<project>   Projects that depend on specified project

Project Query Examples:

# Find all TypeScript applications  
moon query projects "language=typescript && projectType=application"

# Find projects with specific tag
moon query projects "tag=frontend"

# Find projects matching name pattern
moon query projects "project~*-api"

# Complex query with multiple criteria
moon query projects "(language=javascript || language=typescript) && projectType=library"

# Find projects in specific directory
moon query projects "projectSource~packages/*"

# Find projects with build task
moon query projects "hasTask=build"

# Find projects depending on shared library
moon query projects "dependsOn=shared-lib"

Task Query System

Query tasks across the workspace using filter criteria.

/**
 * Query tasks across projects using filter criteria
 * Find tasks matching specific patterns or properties
 */
moon query tasks <statement>

# Task Query Criteria:
# task=<name>          Task name
# project=<name>       Project containing task
# platform=<platform>  Target platform
# type=<type>          Task type (build, test, lint, etc.)
# hasInput=<pattern>   Tasks with input files matching pattern
# hasOutput=<pattern>  Tasks with output files matching pattern

Task Query Examples:

# Find all build tasks
moon query tasks "task=build"

# Find test tasks in frontend projects
moon query tasks "type=test && project~*frontend*"

# Find tasks with TypeScript inputs
moon query tasks "hasInput=*.ts"

Touched Files Analysis

Analyze which files have been modified and their impact on the workspace.

/**
 * Query touched files and their relationships to projects/tasks
 * Useful for understanding change impact in CI/CD pipelines
 */
moon query touched-files

# Output Information:
# - Modified files with change status
# - Affected projects based on file ownership
# - Impacted tasks that depend on changed files
# - Change status (added, modified, deleted, etc.)

Toolchain Management

Manage development tools and their versions within the workspace.

/**
 * Manage toolchain plugins and tool configurations
 * Controls tool installation, versioning, and lifecycle
 */
moon toolchain <subcommand>

# Common Subcommands:
# list             List all configured tools and their versions
# install <tool>   Install a specific tool
# uninstall <tool> Uninstall a specific tool
# outdated         Check for outdated tool versions
# sync             Synchronize toolchain state

Toolchain Examples:

# List all configured tools
moon toolchain list

# Install Node.js toolchain
moon toolchain install node

# Check for outdated tools
moon toolchain outdated

# Sync toolchain state
moon toolchain sync

Binary Path Resolution

Get absolute paths to tool binaries within the managed toolchain.

/**
 * Return absolute path to a tool's binary within the toolchain
 * Useful for scripting and IDE integration
 */
moon bin <tool>

# Arguments:
# <tool>    Tool name (node, npm, cargo, tsc, etc.)

# Exit Codes:
# 0     Tool found, path printed to stdout
# 1+    Tool not configured or not installed

Binary Path Examples:

# Get Node.js binary path
moon bin node
# Output: /home/user/.moon/tools/node/18.17.0/bin/node

# Get TypeScript compiler path
moon bin tsc
# Output: /home/user/.moon/tools/node/18.17.0/node_modules/.bin/tsc

# Use in scripts
NODE_BIN=$(moon bin node)
$NODE_BIN --version

Migration and Conversion

Migrate existing projects and configurations to moon.

/**
 * Convert existing project configurations to moon format
 * Supports migration from various build tools and package managers
 */
moon migrate <operation>

# Migration Operations:
# from-package-json    Convert package.json scripts to moon tasks
# from-turborepo       Migrate from Turborepo workspace configuration

# Options:
# --skip-touched-files-check    Disable check for uncommitted changes
# --dry-run                    Preview changes without applying them

Migration Examples:

# Migrate from package.json scripts
moon migrate from-package-json

# Convert Turborepo configuration
moon migrate from-turborepo

# Preview migration without changes
moon migrate from-package-json --dry-run

Docker Integration

Generate and manage Docker configurations for moon workspaces.

/**
 * Generate Docker configurations optimized for moon workspaces
 * Creates Dockerfiles and docker-compose files
 */
moon docker <subcommand>

# Subcommands:
# scaffold    Generate Dockerfile and docker-compose configurations
# sync        Update Docker configurations after workspace changes
# prune       Remove unused Docker configurations

Docker Examples:

# Generate Docker configurations
moon docker scaffold

# Update configurations after changes  
moon docker sync

# Clean up unused configurations
moon docker prune

Debugging and Diagnostics

Debug moon internals and diagnose workspace issues.

/**
 * Debug moon internals and workspace configuration
 * Hidden command for troubleshooting and development
 */
moon debug <subcommand>

# Debug Subcommands:
# config       Show resolved configuration
# cache        Inspect cache contents and statistics
# graph        Analyze dependency graphs
# env          Display environment variables and context
# profile      Performance profiling and analysis

Debugging Examples:

# Show resolved workspace configuration
moon debug config

# Inspect cache statistics
moon debug cache

# Analyze project dependency graph
moon debug graph

# Display environment context
moon debug env

AI Integration (MCP)

Start Model Context Protocol server for AI agent integration.

/**
 * Start MCP (Model Context Protocol) server for AI agent requests
 * Enables AI agents to interact with moon workspaces
 */
moon mcp [subcommand]

# MCP Operations:
# start        Start MCP server (default)
# stop         Stop running MCP server
# status       Check MCP server status
# config       Configure MCP server settings

# Options:
# --port <port>        Server port (default: auto-assigned)
# --host <host>        Server host (default: localhost)
# --transport <type>   Transport type (stdio, http, websocket)

MCP Examples:

# Start MCP server with default settings
moon mcp

# Start server on specific port
moon mcp start --port 3000

# Start with HTTP transport
moon mcp start --transport http

# Check server status
moon mcp status

Advanced Usage Patterns

Workspace Analysis Pipeline

# Comprehensive workspace analysis
moon query projects "language=typescript" --json | \
  jq '.[] | .id' | \
  xargs -I {} moon project {} --json | \
  jq '.tasks | keys[]'

# Find affected projects and their tasks
moon query touched-files --json | \
  jq '.affected_projects[]' | \
  xargs -I {} moon run {}:build --affected

CI/CD Integration

# Query for projects with specific CI requirements
moon query projects "hasTask=ci && projectType=application"

# Run only affected tests in CI
moon query touched-files | \
  moon run :test --affected --stdin

# Generate deployment targets
moon query projects "tag=deployable" --json | \
  jq -r '.[].id' | \
  xargs -I {} moon run {}:deploy

Developer Tooling

# Setup development environment
moon toolchain install node typescript
moon setup
moon sync hooks

# Validate workspace health
moon debug config
moon query projects "hasTask=lint" | xargs moon run

Error Handling

Common advanced command scenarios and troubleshooting:

  • Query Syntax Errors: Check logical operators and criteria spelling
  • Toolchain Issues: Use moon debug env to check tool installation status
  • Migration Conflicts: Use --dry-run to preview changes before applying
  • MCP Connection Issues: Check firewall settings and port availability
  • Cache Problems: Use moon debug cache to inspect cache state

docs

advanced.md

ci.md

index.md

projects.md

setup.md

tasks.md

tile.json