MAML cli tool. mx pretty-prints, queries, and edits MAML files.
npm i -g mxOr run without installing:
npx mx data.mamlmx [file] [code...]
Pipe input or pass a file:
cat data.maml | mx
mx data.mamlDrill into data with dot notation:
.prop access property
.prop.nested nested access
.[0] array index
.items[2].name mixed access
mx data.maml .users[0].name
cat data.maml | mx .config.server.portAssign a MAML value to any path:
mx data.maml '.config.port = 8080'
mx data.maml '.users[0].roles = ["admin", "dev"]'Edits print to stdout. Add save to write back to the file:
mx data.maml '.config.port = 8080' save