A declarative Go package for building command line tools, with subcommands, flags, shell completion and help generation.
TomWright/dasel
A command-line tool and Go library for querying and modifying JSON, YAML, TOML, XML, CSV and other structured data with one selector syntax.
- Stars
- 8,050
- Forks
- 178
- Open issues
- 25
- Last commit
- 10 days ago
What is it?
Dasel (short for Data-Select) lets you read, update, and convert structured data from the command line using a single selector syntax. The same expressions work across JSON, YAML, TOML, XML, CSV, HCL, INI, and KDL, so you do not need a different tool or query language for each format.
Beyond extracting values, Dasel can modify files in place by updating, inserting, or deleting fields, and it can convert between formats such as JSON to YAML or TOML to JSON. It also supports recursive descent (..) and a search function that matches values anywhere in a document.
Dasel is distributed as a CLI binary through Homebrew, go install, and prebuilt releases, and it can be imported as a Go library. Shell completion is available for Bash, Zsh, Fish, and PowerShell.
Key features
- 01Uses one selector syntax across JSON, YAML, TOML, XML, CSV, HCL, INI and KDL.
- 02Updates, inserts, or deletes values directly in structured files.
- 03Converts data between supported formats.
- 04Supports recursive descent and conditional search across a document.
- 05Provides shell completion for Bash, Zsh, Fish, and PowerShell.
- 06Can be imported as a Go library.
Use cases
- Editing values in YAML or JSON config files from shell scripts or CI pipelines.
- Converting a configuration file from one format to another.
- Extracting specific fields from API responses or data files in the terminal.
- Batch-updating values across structured files in DevOps workflows.
Quick start
- 1
Install with Homebrew (macOS/Linux)
brew install dasel - 2
Or install with Go
go install github.com/tomwright/dasel/v3/cmd/dasel@master - 3
Download a prebuilt binary from the Releases page (Linux, macOS, Windows)
- 4
Run a first query on JSON input
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'foo.bar'
In collections
Topics
FAQ
- What is dasel?
- A command-line tool and Go library for querying and modifying JSON, YAML, TOML, XML, CSV and other structured data with one selector syntax. Dasel (short for Data-Select) lets you read, update, and convert structured data from the command line using a single selector syntax. The same expressions work across JSON, YAML, TOML, XML, CSV, HCL, INI, and KDL, so you do not need a different tool or query language for each format.
- Is dasel free to use? What license does it have?
- dasel is open source under the MIT license. Check the license terms before using it in commercial products.
- Is dasel still maintained?
- Actively maintained. The last commit to dasel was on Oct 15, 2026.
- What can I use dasel for?
- Editing values in YAML or JSON config files from shell scripts or CI pipelines. Converting a configuration file from one format to another. Extracting specific fields from API responses or data files in the terminal. Batch-updating values across structured files in DevOps workflows.
- How do I install dasel?
- Install with Homebrew (macOS/Linux): brew install dasel Or install with Go: go install github.com/tomwright/dasel/v3/cmd/dasel@master Download a prebuilt binary from the Releases page (Linux, macOS, Windows) Run a first query on JSON input: echo '{"foo": {"bar": "baz"}}' | dasel -i json 'foo.bar'
- Where can I get dasel?
- The source code and installation instructions are on GitHub: https://github.com/TomWright/dasel
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source JSON editor that turns JSON, YAML, CSV and XML into interactive graphs, with format conversion and code generation.
Cross-platform C++ class libraries for building network-centric applications, covering HTTP, networking, databases, XML/JSON and logging.
A fast Python serialization and validation library that encodes and decodes JSON, MessagePack, YAML, and TOML using standard type annotations.
A jq clone in Rust focused on correctness, speed and simplicity, usable as a jq-compatible CLI or as a library.
A web-based visual configuration generator for the Ghostty terminal that exports a minimal config file.