Skip to content

maml-dev/mx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mx

MAML cli tool. mx pretty-prints, queries, and edits MAML files.

Install

npm i -g mx

Or run without installing:

npx mx data.maml

Usage

mx [file] [code...]

Pipe input or pass a file:

cat data.maml | mx
mx data.maml

Query

Drill 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.port

Edit

Assign 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

License

MIT

About

Pretty-print and query MAML

Topics

Resources

License

Stars

Watchers

Forks

Contributors