Guide
Command-line tools
Since Sprint 23, programs read their arguments and environment — render pipelines become real CLI tools.
fn main() -> Void:
let a = args()
if a.len() != 2:
print("usage: ptc run tool.pt <input> <output>")
return
let mode = env("TOOL_MODE")
print("rendering {a[0]} to {a[1]} (mode: {mode})")$ ptc run tool.pt in.pti out.ppm
Recorded output of the real compiler
args() -> List[Text] holds everything after the file on the ptc run command line — no argv[0] to skip, no separate count, and main keeps its single canonical shape. env(name) -> Option[Text] reads an environment variable; unset is None, never an error. Both names are reserved builtins like print.