TomWright/dasel
{ "createdAt": "2020-09-22T10:33:56Z", "defaultBranch": "master", "description": "Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.", "fullName": "TomWright/dasel", "homepage": "https://daseldocs.tomwright.me", "language": "Go", "name": "dasel", "pushedAt": "2025-11-17T07:03:48Z", "stargazersCount": 7689, "topics": [ "cli", "config", "configuration", "data-processing", "data-structures", "data-wrangling", "devops-tools", "go", "golang", "json", "json-processing", "parser", "query", "selector", "toml", "update", "xml", "yaml", "yaml-processor" ], "updatedAt": "2025-11-24T08:19:10Z", "url": "https://github.com/TomWright/dasel"}Dasel (short for Data-Select) is a command-line tool and library for querying, modifying, and transforming data structures such as JSON, YAML, TOML, XML, and CSV.
It provides a consistent, powerful syntax to traverse and update data — making it useful for developers, DevOps, and data wrangling tasks.
Features
Section titled “Features”- Multi-format support: JSON, YAML, TOML, XML, CSV, HCL (with more planned).
- Unified query syntax: Access data in any format with the same selectors.
- Query & search: Extract values, lists, or structures with intuitive syntax.
- Modify in place: Update, insert, or delete values directly in structured files.
- Convert between formats: Seamlessly transform data from JSON → YAML, TOML → JSON, etc.
- Script-friendly: Simple CLI integration for shell scripts and pipelines.
- Library support: Import and use in Go projects.
Installation
Section titled “Installation”Homebrew (macOS/Linux)
Section titled “Homebrew (macOS/Linux)”brew install daselGo Install
Section titled “Go Install”go install github.com/tomwright/dasel/v3/cmd/dasel@masterPrebuilt Binaries
Section titled “Prebuilt Binaries”Prebuilt binaries are available on the Releases page for Linux, macOS, and Windows.
None of the above?
Section titled “None of the above?”See the installation docs for more options.
Basic Usage
Section titled “Basic Usage”Selecting Values
Section titled “Selecting Values”By default, Dasel evaluates the final selector and prints the result.
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'foo.bar'# Output: "baz"Modifying Values
Section titled “Modifying Values”Update values inline:
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'foo.bar = "bong"'# Output: "bong"Use --root to output the full document after modification:
echo '{"foo": {"bar": "baz"}}' | dasel -i json --root 'foo.bar = "bong"'# Output:{ "foo": { "bar": "bong" }}Update values based on previous value:
echo '[1,2,3,4,5]' | dasel -i json --root 'each($this = $this*2)'# Output:[ 2, 4, 6, 8, 10]Format Conversion
Section titled “Format Conversion”cat data.json | dasel -i json -o yamlRecursive Descent (..)
Section titled “Recursive Descent (..)”Searches all nested objects and arrays for a matching key or index.
echo '{"foo": {"bar": "baz"}}' | dasel -i json '..bar'# Output:[ "baz"]Search (search)
Section titled “Search (search)”Finds all values matching a condition anywhere in the structure.
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'search(bar == "baz")'# Output:[ { "bar": "baz" }]Documentation
Section titled “Documentation”Full documentation is available at daseldocs.tomwright.me.
Contributing
Section titled “Contributing”Contributions are welcome! Please see the [CONTRIBUTING.md]!(./CONTRIBUTING.md) for details.
License
Section titled “License”MIT License. See [LICENSE]!(./LICENSE) for details.