mpkl
Run mpkl through the MoonBit Skills Marketplace when a task needs a quick,
local check of self-contained Pkl source.
Run
Pass the complete module text with --source:
moon runwasm mizchi/pkl/cmd/mpkl -- check --source 'name: String = "Pkl"'
moon runwasm mizchi/pkl/cmd/mpkl -- eval --format json --source 'name = "Pkl"; answer = 6 * 7'
Use one of these commands:
- parse: validate syntax and print ok.
- check: parse and typecheck the module, then print its inferred type.
- eval: evaluate the module and render its value. Select pcf, json,
yaml, properties, plist, textproto, xml, or jsonnet with
--format; the default is pcf.
- format: evaluate the module and emit canonical PCF. Treat this as value
normalization, not as a comment-preserving source formatter.
Read a target file first and pass its contents as one --source argument.
Preserve newlines and quote the argument so the shell does not interpret Pkl
interpolation or punctuation.
Constraints
Use this Wasm command only for self-contained modules. It deliberately does
not read files, access the network, or resolve imports, extends, amends,
package URIs, resources, or environment properties. Use the native mpkl CLI
from the repository when the task needs those capabilities.
Interpret exit codes as follows:
- 0: the requested operation succeeded.
- 1: Pkl parsing, typechecking, or evaluation produced diagnostics.
- 2: the command line is invalid or requests an unsupported operation.