macOS x64 binary distribution package for the moon repository management tool
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
Commands for maintaining the moon workspace, managing artifacts, and keeping moon itself up to date.
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:
Update moon to the latest available version.
moon upgradeAlias: moon up
Usage Examples:
# Upgrade to latest version
moon upgrade
# Use short alias
moon upUpgrade Process:
Moon automatically manages various caches for optimal performance:
Build Cache:
Dependency Cache:
Tool Cache:
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 settingsMonitor 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 versionsBefore 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"Moon provides debug commands for inspecting internal state and troubleshooting issues.
Display loaded moon configuration and environment settings.
moon debug configThis command shows:
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 toolchainDisplay information about VCS (Version Control System) integration and settings.
moon debug vcsThis command shows:
Usage Examples:
# Show VCS debug information
moon debug vcs
# Use in CI/CD for debugging
moon debug vcs > vcs-debug.logNote: 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.
Cache Corruption:
# Clear all caches and rebuild
moon clean --lifetime "0"
moon setup
moon run build --forceTool Installation Issues:
# Reinstall tools
moon teardown
moon setup
# Check tool status
moon toolchain info nodePermission Problems:
# Fix permissions on moon directories
chmod -R 755 ~/.moon/
chmod -R 755 .moon/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 nodeOptimize 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"Check for available updates:
# Current version
moon --version
# Check for updates (done automatically by upgrade)
moon upgradeMoon 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 compatibleIf 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.0Automate 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 --allInclude 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 --versionMonitor 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