0
# @moonrepo/core-linux-arm64-musl
1
2
@moonrepo/core-linux-arm64-musl is a platform-specific binary distribution package that provides the moon repository management tool executable compiled for Linux ARM64 systems using musl libc. It serves as an optional dependency for @moonrepo/cli and enables moon's powerful repository management capabilities on ARM64 Linux environments.
3
4
## Package Information
5
6
- **Package Name**: @moonrepo/core-linux-arm64-musl
7
- **Package Type**: npm (binary distribution)
8
- **Language**: Rust (compiled to native binary)
9
- **Platform**: Linux ARM64 (aarch64)
10
- **C Library**: musl libc
11
- **Installation**: `npm install @moonrepo/core-linux-arm64-musl` (typically auto-installed as optional dependency)
12
13
## Core Integration
14
15
This package is designed to be consumed by the main CLI package and provides JavaScript utilities for binary resolution:
16
17
```javascript
18
const { findMoonExe } = require('@moonrepo/cli/utils');
19
20
// Locates the appropriate binary for the current platform
21
const moonBinaryPath = findMoonExe();
22
console.log(moonBinaryPath); // /path/to/node_modules/@moonrepo/core-linux-arm64-musl/moon
23
```
24
25
For direct binary usage:
26
```bash
27
# After installation, the binary is available at:
28
# node_modules/@moonrepo/core-linux-arm64-musl/moon
29
./node_modules/@moonrepo/core-linux-arm64-musl/moon --version
30
```
31
32
### JavaScript API
33
34
```javascript { .api }
35
/**
36
* Locate the moon binary executable for the current platform
37
* Automatically detects platform (linux/macos/windows), architecture (x64/arm64),
38
* and C library (musl/gnu) to find the correct binary package
39
* @returns {string} Absolute path to the moon executable
40
* @throws {Error} If moon executable not found for current platform
41
*/
42
function findMoonExe(): string;
43
```
44
45
## Basic Usage
46
47
The moon binary provides comprehensive repository management capabilities:
48
49
```bash
50
# Initialize moon in a repository
51
moon init
52
53
# Run a task in a specific project
54
moon run app:build
55
# or using moonx alias
56
moonx app:build
57
58
# Run tests across all projects
59
moon run :test
60
61
# Check the health of a project
62
moon check app
63
64
# Run tasks in CI mode
65
moon ci app:build app:test
66
```
67
68
## Architecture
69
70
The moon tool is built on several core concepts:
71
72
- **Repository Management**: Multi-project repository orchestration with workspace-level configuration
73
- **Task System**: Declarative task definitions with dependency management and caching
74
- **Project Graph**: Dependency resolution and execution ordering across projects
75
- **Toolchain Integration**: Automatic tool installation and version management
76
- **Smart Caching**: Content-based caching for build artifacts and task outputs
77
- **Platform Distribution**: Native binaries for optimal performance across different architectures
78
79
## Capabilities
80
81
### Repository Initialization
82
83
Initialize moon in a repository and set up workspace configuration.
84
85
```bash { .api }
86
moon init [tool]
87
88
# Options:
89
# --force Overwrite existing config files
90
# --minimal Generate minimal configurations
91
# --to <path> Destination directory (default: current)
92
# --yes Skip prompts and auto-detect tools
93
94
# Tool options: bun, node, rust, typescript
95
```
96
97
[Repository Setup](./setup.md)
98
99
### Task Execution
100
101
Execute tasks across projects with dependency resolution and caching.
102
103
```bash { .api }
104
moon run <...targets> [-- <args>]
105
# Aliases: moon r, moonx
106
107
# Target formats:
108
# project:task Run specific task in specific project
109
# :task Run task in all projects
110
# #tag:task Run task in projects with tag
111
# task Run task in closest project (based on cwd)
112
113
# Options:
114
# -f, --force Force run ignoring affected status
115
# --dependents Run downstream dependents
116
# -i, --interactive Interactive mode
117
# --query <statement> Filter projects using query language
118
# -s, --summary Display run summary
119
# -u, --updateCache Bypass cache
120
# --no-actions Skip other pipeline actions
121
# -n, --no-bail Continue on failures
122
# --profile <type> Generate profile (cpu, heap)
123
# --affected Only run if affected by changes
124
# --remote Compare against remote for affected
125
# --status <type> Filter by change status
126
# --stdin Accept touched files from stdin
127
```
128
129
[Task Execution](./tasks.md)
130
131
### Project Management
132
133
Manage and inspect projects within the workspace.
134
135
```bash { .api }
136
moon check [...projects]
137
# Alias: moon c
138
139
# Run all build and test tasks for projects
140
# Arguments: project names (optional)
141
# Options:
142
# --all Check all projects
143
# -u, --updateCache Bypass cache
144
# --summary Display run summary
145
```
146
147
[Project Management](./projects.md)
148
149
### Continuous Integration
150
151
Optimized commands for CI/CD environments.
152
153
```bash { .api }
154
moon ci [...targets]
155
156
# CI-optimized task execution with:
157
# - No-bail behavior by default
158
# - Enhanced logging for build systems
159
# - Optimized caching strategies
160
```
161
162
[CI Integration](./ci.md)
163
164
### Toolchain Management
165
166
Commands for managing development toolchain and environment setup.
167
168
```bash { .api }
169
moon setup
170
# Setup the environment by installing all configured tools
171
# Downloads and installs tools defined in toolchain.yml
172
173
moon teardown
174
# Teardown the environment by uninstalling all tools and deleting temp files
175
176
moon bin <tool>
177
# Return absolute path to a tool's binary within the toolchain
178
# Arguments: <tool> - Tool name (node, npm, etc.)
179
# Returns non-zero exit code if tool not configured or installed
180
181
moon upgrade
182
# Alias: moon up
183
# Upgrade moon to the latest available version
184
```
185
186
### Code Generation
187
188
Template-based code generation and scaffolding capabilities.
189
190
```bash { .api }
191
moon generate <template> [dest]
192
# Alias: moon g
193
# Generate and scaffold files from a pre-defined template
194
# Arguments:
195
# <template> Name of template to use
196
# [dest] Destination path (optional)
197
# Options:
198
# --dryRun Show what would be generated without creating files
199
# --force Overwrite existing files if they exist
200
# --template <path> Use template from specific path
201
202
moon templates
203
# List all templates available for code generation
204
```
205
206
### Workspace Query System
207
208
Advanced querying capabilities for workspace analysis.
209
210
```bash { .api }
211
moon query <subcommand>
212
# Query information about moon, the environment, and pipeline
213
# Subcommands:
214
# projects <statement> Query projects using filter criteria
215
# tasks <statement> Query tasks across projects
216
# touched-files Query touched files and their relationships
217
218
# Query operators: &&, ||, !, ()
219
# Project criteria: language=<lang>, projectType=<type>, tag=<tag>,
220
# project~<pattern>, dependsOn=<project>
221
```
222
223
[Advanced Commands](./advanced.md)
224
225
### Workspace Synchronization
226
227
Sync workspace configuration and maintain consistency.
228
229
```bash { .api }
230
moon sync [subcommand]
231
# Sync the workspace to a healthy state
232
# Subcommands:
233
# projects Sync all project configurations
234
# hooks Sync git hooks for workspace
235
# codeowners Sync CODEOWNERS file based on project ownership
236
```
237
238
### Plugin and Extension System
239
240
Execute extensions and manage toolchain plugins.
241
242
```bash { .api }
243
moon ext [args...]
244
# Execute an extension plugin
245
# Arguments: Extension-specific arguments and options
246
247
moon toolchain <subcommand>
248
# Manage toolchain plugins
249
# Subcommands: Various toolchain management operations
250
```
251
252
### Migration and Integration
253
254
Migrate existing projects and integrate with external tools.
255
256
```bash { .api }
257
moon migrate <operation>
258
# Operations for migrating existing projects to moon
259
# Operations:
260
# from-package-json Convert package.json scripts to moon tasks
261
# from-turborepo Migrate from Turborepo configuration
262
# Options:
263
# --skip-touched-files-check Disable check for dirty files
264
265
moon docker <subcommand>
266
# Operations for integrating with Docker and Dockerfile(s)
267
# Subcommands:
268
# scaffold Generate Dockerfile and docker-compose configurations
269
# sync Sync Docker configurations with workspace changes
270
```
271
272
### AI Integration and Debugging
273
274
Advanced integration and debugging capabilities.
275
276
```bash { .api }
277
moon mcp [subcommand]
278
# Start an MCP (model context protocol) server for AI agent requests
279
# Subcommands: Various MCP protocol operations
280
281
moon debug <subcommand>
282
# Debug internals (hidden command)
283
# Subcommands: Various debugging operations
284
```
285
286
### Utility Commands
287
288
Additional utility commands for shell integration and tooling.
289
290
```bash { .api }
291
moon completions <shell>
292
# Generate shell completions for command-line integration
293
# Arguments: <shell> - Target shell (bash, zsh, fish, powershell)
294
295
moon clean
296
# Clean cached artifacts and outputs
297
# Options:
298
# --cache Clean cache directory
299
# --docker Clean Docker-related files
300
```
301
302
## Global Options
303
304
All moon commands support these global options:
305
306
```bash { .api }
307
# Caching
308
--cache <mode> Cache operations mode (off, read, read-write, write)
309
310
# Output Control
311
--color Force colored output
312
--quiet, -q Hide non-important output
313
--theme <theme> Terminal theme (dark, light)
314
315
# Performance
316
--concurrency <n>, -c Maximum thread count
317
--dump Generate trace profile
318
319
# Logging
320
--log <level> Log level (off, error, warn, info, debug, trace, verbose)
321
--logFile <file> Write logs to file
322
323
# General
324
--help Show help
325
--version Show version
326
```
327
328
## Environment Variables
329
330
```bash { .api }
331
# Core Configuration
332
MOON_CACHE Cache mode override
333
MOON_COLOR Color support level (0-3)
334
MOON_CONCURRENCY Thread pool size
335
MOON_LOG Log level
336
MOON_LOG_FILE Log output file
337
MOON_THEME Terminal theme
338
339
# Debugging
340
MOON_DEBUG_PROCESS_ENV Show process environment variables
341
MOON_DEBUG_PROCESS_INPUT Show process input
342
MOON_DEBUG_PROTO_INSTALL Debug proto installation
343
MOON_DEBUG_REMOTE Debug remote caching
344
MOON_DEBUG_WASM Debug WASM plugins
345
346
# VCS Integration
347
MOON_BASE Base revision for affected checks
348
MOON_HEAD Head revision for affected checks
349
350
# Tool Detection
351
MOON_VERSION Moon version (set automatically)
352
```
353
354
## Types
355
356
```typescript { .api }
357
// Platform constraints from package.json
358
interface PlatformConstraints {
359
os: ["linux"];
360
cpu: ["arm64"];
361
libc: ["musl"];
362
}
363
364
// Exit codes
365
type ExitCode = 0 | number; // 0 = success, non-zero = various failures
366
367
// Cache modes
368
type CacheMode = "off" | "read" | "read-write" | "write";
369
370
// Log levels
371
type LogLevel = "off" | "error" | "warn" | "info" | "debug" | "trace" | "verbose";
372
373
// Change status types for affected filtering
374
type ChangeStatus = "all" | "added" | "deleted" | "modified" | "staged" | "unstaged" | "untracked";
375
```