Command overview

generated from midad spec --json at build time; not edited by hand

$ midad
usage:
  midad check <file.md> [--json]        type-check, lint and audit permissions
  midad run   <file.md> [--listen ADDR] [--watch] [--json] [command args...]
                                        --watch re-runs the program when a
                                        .md file next to it changes; --json
                                        prints one object, program output in it
  midad build <file.md> [-o OUT] [--json]  bundle interpreter + source into one executable
  midad build <file.md> --native FN [-o OUT]   AOT-compile function FN to a native executable
  midad build <file.md> --native-all [-o OUT] [--backend auto|c|cranelift]
                                      AOT-compile the whole program (exec + functions);
                                      auto uses C when available, else Cranelift
  midad fmt   <path> [--check|--stdout]  a file, or a directory (every .md under it)
  midad explain [CODE] [--json]         what a diagnostic code means and the fix,
                                        or every code when none is named
  midad spec [--json]                   the language: types, every builtin with
                                        its types, the operators, the layout
  midad ast   <file.md>                 dump the AST
  midad vendor <dir> [--into DIR]       copy a library's .md files into a project
                                        and record what was copied (default lib/<name>)
  midad new   <dir>                     write a project that runs, into a new directory

One page per subcommand: check, run, build, fmt, new, vendor, ast, explain, spec.

Exit codes: 0 when there are no errors, 1 when there is at least one, and 2 when the command itself was wrong (a path that does not exist, an unknown flag).

On this page