Website • Tutorial • Live demo • CLI version • Compile-to-JS version
Emuto is a small language for manipulating and restructuring JSON and other data files. Emuto is inspired by jq and GraphQL
- Transform and query data structures
- Integrate with unix commands in the command line
- Conversions between different file formats
- Supported input formats: JSON, text, csv, tsv, dsv
- Supported output formats: JSON, text
- Available as a Webpack loader
npm install -g emuto emuto-cli
For Arch Linux users, also available as an AUR package
yarn add --dev emuto emuto-loader
Read more in the Webpack guide
curl my_file.json | emuto 'length'
curl https://hacker-news.firebaseio.com/v0/user/kantord.json -s | emuto '$.karma'
ls | emuto -i=raw '$[0:-1]'
cat package.json | emuto -c '$.dependencies | keys | length'
cat package.json | emuto -c '$.scripts | keys | join " · "'
curl https://api.github.com/repos/stedolan/jq/commits |\
emuto -c 'map ($ => $ { commit { message } committer { login } } )'
restructure.emu
#! emuto -s
$
| map ($ => $ { commit { message } committer { login } } )
| map ($ => {
"committer": $.committer.login,
"message": $.commit.message,
})
Calling your script
curl https://api.github.com/repos/stedolan/jq/commits | ./restructure.emu
Read our contributing guide to learn about our development process, how to create bugfixes and improvements, and how to build and test your changes to emuto.