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

maintenance.mddocs/

Maintenance & Utilities

Commands for maintaining the moon workspace, managing artifacts, and keeping moon itself up to date.

Capabilities

Clean Workspace

Remove stale or invalid artifacts from the workspace to free up disk space and ensure a clean state.

moon clean [--lifetime <DURATION>]

Options:

  • --lifetime <DURATION> - Maximum age of cached artifacts to keep (default: "7 days")

Usage Examples:

# Clean with default 7-day lifetime
moon clean

# Clean artifacts older than 3 days
moon clean --lifetime "3 days"

# Clean all artifacts (immediate cleanup)
moon clean --lifetime "0 seconds"

# Clean artifacts older than 2 weeks
moon clean --lifetime "14 days"

# Clean with different time units
moon clean --lifetime "24 hours"
moon clean --lifetime "1 week"
moon clean --lifetime "30 minutes"

What Gets Cleaned:

  • Stale build caches
  • Unused hash manifests
  • Temporary execution files
  • Old dependency resolution caches
  • Expired remote cache entries
  • Unused toolchain downloads

Upgrade Moon

Update moon to the latest available version.

moon upgrade

Alias: moon up

Usage Examples:

# Upgrade to latest version
moon upgrade

# Use short alias
moon up

Upgrade Process:

  1. Checks for the latest available version
  2. Downloads the new version
  3. Performs backup of current installation
  4. Installs the new version
  5. Migrates configuration if needed
  6. Verifies the installation

Workspace Maintenance

Cache Management

Moon automatically manages various caches for optimal performance:

Build Cache:

  • Stores task output based on input hashes
  • Enables incremental builds
  • Shared across team members via remote cache

Dependency Cache:

  • Caches resolved dependency graphs
  • Speeds up project discovery
  • Updated when configurations change

Tool Cache:

  • Stores downloaded toolchain binaries
  • Avoids re-downloading identical versions
  • Organized by tool and version

Storage Locations

Moon stores data in platform-specific locations:

macOS:

~/.moon/                    # User configuration and data
  ├── cache/               # Build and dependency caches
  ├── tools/               # Downloaded toolchain binaries
  ├── templates/           # User-defined templates
  └── extensions/          # Extension plugins

Workspace-specific:
.moon/                     # Workspace configuration
  ├── cache/              # Local workspace cache
  ├── toolchain.yml       # Tool configurations
  └── workspace.yml       # Workspace settings

Disk Space Management

Monitor and manage moon's disk usage:

# Check cache sizes
du -sh ~/.moon/cache
du -sh .moon/cache

# Clean specific cache types
moon clean --lifetime "1 day"    # Recent cleanup
moon clean --lifetime "0"        # Full cleanup

# Manual cleanup of specific directories
rm -rf ~/.moon/cache/builds/*    # Clear build cache
rm -rf ~/.moon/tools/node/*/     # Clear old Node.js versions

Configuration Backup

Before major changes, backup moon configuration:

# Backup workspace configuration
cp -r .moon/ .moon.backup/

# Backup user configuration  
cp -r ~/.moon/ ~/.moon.backup/

# Version control workspace config
git add .moon/
git commit -m "Update moon configuration"

Debug Commands

Moon provides debug commands for inspecting internal state and troubleshooting issues.

Debug Configuration

Display loaded moon configuration and environment settings.

moon debug config

This command shows:

  • Loaded workspace configuration
  • Toolchain settings and versions
  • Environment variables and paths
  • Cache locations and sizes
  • Project discovery information

Usage Examples:

# Show complete configuration
moon debug config

# Filter for cache information
moon debug config | grep -i cache

# Check tool configurations
moon debug config | grep -i toolchain

Debug VCS Integration

Display information about VCS (Version Control System) integration and settings.

moon debug vcs

This command shows:

  • Git configuration and status
  • VCS hooks configuration
  • Remote repository information
  • Branch and commit details
  • Touch file detection settings

Usage Examples:

# Show VCS debug information
moon debug vcs

# Use in CI/CD for debugging
moon debug vcs > vcs-debug.log

Note: Debug commands are primarily intended for troubleshooting and may produce verbose output. They are useful for understanding moon's internal state and diagnosing configuration issues.

Troubleshooting

Common Issues

Cache Corruption:

# Clear all caches and rebuild
moon clean --lifetime "0"
moon setup
moon run build --force

Tool Installation Issues:

# Reinstall tools
moon teardown
moon setup

# Check tool status
moon toolchain info node

Permission Problems:

# Fix permissions on moon directories
chmod -R 755 ~/.moon/
chmod -R 755 .moon/

Diagnostic Information

Gather diagnostic information for troubleshooting:

# Show moon version and environment
moon --version
moon debug config

# Check workspace health
moon check --all --summary

# Verify tool installations
moon toolchain info node
moon bin node

Performance Optimization

Optimize moon performance:

# Use appropriate concurrency
moon run build --concurrency 8

# Enable remote caching
export MOON_CACHE=readwrite
moon run build

# Clean old caches regularly
moon clean --lifetime "3 days"

Update Management

Version Checking

Check for available updates:

# Current version
moon --version

# Check for updates (done automatically by upgrade)
moon upgrade

Release Notes

Moon upgrade shows relevant changes:

Upgrading moon from v1.39.0 to v1.40.1

New Features:
- Added MCP server support
- Enhanced Docker integration
- Improved query performance

Breaking Changes:
- None

Migration Notes:
- Configuration format unchanged
- Cache format compatible

Rollback

If issues occur after upgrade, rollback:

# Moon automatically creates backups
# Restore from backup (example paths)
cp ~/.moon.backup/bin/moon ~/.moon/bin/moon

# Or reinstall specific version
npm install @moonrepo/cli@1.39.0

Automation

Scheduled Maintenance

Automate regular maintenance tasks:

#!/bin/bash
# weekly-maintenance.sh

# Clean old caches
moon clean --lifetime "1 week"

# Check for updates
moon upgrade

# Verify workspace health
moon check --all

CI/CD Integration

Include maintenance in CI/CD pipelines:

# GitHub Actions example
- name: Clean moon cache
  run: moon clean --lifetime "1 day"

- name: Update moon
  run: moon upgrade

- name: Verify installation
  run: moon --version

Monitoring

Monitor moon workspace health:

# Check cache sizes
moon debug config | grep -i cache

# Monitor build performance
moon run build --summary

# Check tool status
for tool in node npm; do
  echo "$tool: $(moon bin $tool)"
done

docs

environment.md

execution.md

extensions.md

generation.md

graphs.md

index.md

maintenance.md

project-task.md

query.md

toolchain.md

tile.json