
dasel
CLIQuery, modify and convert JSON, YAML, TOML, XML, CSV, HCL, INI and more with one selector syntax, editing config files in place or converting between formats, handy for agents handling structured data in scripts. A single dependency-free binary that works much like jq or yq.
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, CSV, and KDL.
It provides a consistent, powerful syntax to traverse and update data — making it useful for developers, DevOps, and data wrangling tasks.
Features
- Multi-format support: JSON, YAML, TOML, XML, CSV, HCL, INI, KDL.
- 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
Homebrew (macOS/Linux)
brew install dasel
Go Install
go install github.com/tomwright/dasel/v3/cmd/dasel@master
Prebuilt Binaries
Prebuilt binaries are available on the Releases page for Linux, macOS, and Windows.
None of the above?
See the installation docs for more options.
Shell Completion
Dasel supports tab-completion for Bash, Zsh, Fish, and PowerShell. Generate and load the completion script for your shell:
# Bash
source <(dasel completion bash)
# Zsh
source <(dasel completion zsh)
# Fish
dasel completion fish | source
# PowerShell
dasel completion powershell | Out-String | Invoke-Expression
See the shell completion docs for permanent installation instructions.
Man Page
Generate and view the man page:
dasel man | man -l -
Basic Usage
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
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
cat data.json | dasel -i json -o yaml
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)
Finds all values matching a condition anywhere in the structure.
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'search(bar == "baz")'
# Output:
[
{
"bar": "baz"
}
]
Documentation
Full documentation is available at daseldocs.tomwright.me.
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md for details.
License
MIT License. See LICENSE for details.
Stargazers over time
Ressources associées

jq
CLILightweight command-line JSON processor that slices, filters, maps and transforms JSON with concise expressions and no runtime dependencies. A staple for agents parsing API responses and logs.
jqlang/jq35.8k
yq
CLILightweight command-line processor with jq-like syntax for reading, modifying and converting YAML, JSON, XML, INI, CSV and more, including in-place config edits. A single dependency-free Go binary.
mikefarah/yq16.1k
Miller
CLIProcesses CSV, TSV, JSON and other structured data like awk, sed, cut, join and sort, but by field name, for cleaning, aggregation, format conversion and pretty-printing. The command is mlr; written in Go with no runtime dependencies.
johnkerl/miller10k
jc
CLIConverts the output of 100+ commands such as dig, ps, ls and ifconfig, plus common file formats, into JSON so agents can parse it reliably with jq or scripts. Also usable as a Python library.
kellyjonbrazil/jc8.7k
croc
CLISend files and folders between any two computers with one command: end-to-end encryption (PAKE), direct peer-to-peer with relay fallback, resumable transfers and proxy support, with no server setup or port forwarding.
schollz/croc40.6k
fzf
CLIGeneral-purpose command-line fuzzy finder for any text input, such as file lists, command history or processes. Besides the interactive UI it has a non-interactive --filter mode, plus shell key bindings and completion.
junegunn/fzf83.6k