Command-line tool for querying, modifying, and transforming structured data files (JSON, YAML, TOML, XML, CSV)
Dasel is a command-line tool and Go library for querying and manipulating structured data across multiple formats including JSON, YAML, TOML, XML, CSV, HCL, and INI. It provides a unified query syntax that works consistently across all supported formats, allowing users to select, modify, and transform data without learning format-specific tools.
The tool supports in-place modifications through direct value updates, insertions, and deletions using expressions like foo.bar = "new_value". Advanced features include recursive descent searches with ..key syntax, conditional searches with search() functions, and bulk operations using each() for applying transformations across arrays or objects. Dasel can also convert between formats seamlessly, making it useful for data pipeline tasks.
Dasel targets developers, DevOps engineers, and anyone working with structured configuration files or data transformation tasks. Its script-friendly design integrates well with shell pipelines, while the Go library interface allows embedding in applications. The consistent syntax across formats eliminates the need to learn multiple query languages for different data types.
# via Homebrew
brew install dasel
# via Go Install
go install github.com/tomwright/dasel/v3/cmd/dasel@master