Back to browse
GitHub Repository

Process, transform and query JSON/YAML/TOML, from the shell.

8 starsRust

Dop, Awk-like processing for JSON/YAML/TOML with Lua

by dhuan_·Mar 27, 2026·2 points·1 comment

AI Analysis

MidNiche Gem

jq and yq already do this—Lua embedding is nice but doesn't justify switching from established tools.

Strengths
  • Single 800kb binary with embedded Lua means no separate runtime installation required.
  • Automatic format detection between JSON, YAML, and TOML simplifies pipeline construction.
Weaknesses
  • jq has massive ecosystem, documentation, and community—hard to justify switching to unknown tool.
  • Lua scripting adds complexity when jq's native filter language handles most common transformations.
Target Audience

DevOps engineers and developers working with structured data in shell pipelines

Similar To

jq · yq · mlr

Post Description

dop reads JSON, YAML, or TOML from stdin, walks the structure field by field, and lets you transform values with Lua. It can also query nested paths and convert between formats.

It weights just 800kb and you don't need Lua installed in your pc.

A few examples:

echo '{"list":[1,2,3]}' | dop -e ' if type(VALUE) == "number" then set(VALUE * 2) end ' # => {"list":[2,4,6]}

echo '{"data":{"some_list":[1,2,3]}}' | dop -q data.some_list # => [1,2,3]

What I wanted was: - something simpler to reason about for non-trivial transforms - one tool for JSON/YAML/TOML - embedded scripting without needing Lua installed separately

Repo: https://github.com/dhuan/dop

Any feedback is welcome.

Similar Projects