A MoonBit-native incremental task runner for small builds, codegen workflows, and local CI orchestration.
Dependencies
moon update
moon check --fmt --deny-warn --target native
moon fmt --check
moon info
moon test --deny-warn --target native
moon run --target native cmd/main -- stats
moon run --target native cmd/main -- audit[tasks.bundle]
cmd = 'python -c "print(\"bundle\")"'
deps = ["generate"]
inputs = ["src/schema.json"]
outputs = ["dist/bundle.txt"]
phony = false
desc = "Build the bundle"moonforge list [--file PATH]
moonforge graph [TASK] [--file PATH]
moonforge explain [TASK] [--file PATH]
moonforge stats [--file PATH]
moonforge audit [--file PATH]
moonforge clean [--file PATH]
moonforge doctor [--file PATH]
moonforge run [TASK] [--file PATH] [-j N]pub struct AuditFinding {
severity : AuditSeverity
code : AuditCode
task : String
related_task : String?
path : String?
message : String
} derive(Eq, Debug)pub struct BenchmarkSpec {
name : String
task_count : Int
depth : Int
fanout : Int
shape : BenchmarkShape
} derive(Eq, Debug)pub(all) enum CliCommand {
Help
List(config_path~ : String)
Graph(config_path~ : String, target~ : String?)
Explain(config_path~ : String, target~ : String?)
Stats(config_path~ : String)
Audit(config_path~ : String)
Clean(config_path~ : String)
Doctor(config_path~ : String)
Run(config_path~ : String, target~ : String?, jobs~ : Int)
} derive(Debug)pub struct ProjectStats {
default_target : String
total_tasks : Int
root_tasks : Int
leaf_tasks : Int
phony_tasks : Int
concrete_tasks : Int
tasks_with_inputs : Int
tasks_with_outputs : Int
total_declared_inputs : Int
total_declared_outputs : Int
max_depth : Int
duplicate_outputs : Int
overlapping_outputs : Int
missing_inputs : Int
unreachable_tasks : Int
} derive(Debug)pub struct RunMetrics {
total_tasks : Int
executed_tasks : Int
skipped_tasks : Int
total_duration_ms : Int
average_duration_ms : Int
cache_hit_percent : Int
longest_task : String?
longest_duration_ms : Int
} derive(Debug)pub struct TaskPlan {
task : Task
reason : PlanReason
should_run : Bool
command_hash : String
input_hash : String
} derive(Debug)fn make_plan(project : Project, cache : CacheSnapshot, target : String?) -> (Array[String], Array[Array[String]], Array[TaskPlan]) raise MoonforgeErrorasync fn run_target(project : Project, target : String?, jobs? : Int) -> RunSummary raise MoonforgeErrorfn task_levels(project : Project, order : Array[String]) -> Array[Array[String]] raise MoonforgeErrorA MoonBit-native incremental task runner for small builds, codegen workflows, and local CI orchestration.
Dependencies