Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

dasel

> DevOps
Open source

Unified querying, transformation, and modification of JSON, TOML, YAML, XML, INI, HCL, KDL and CSV.

8.0K stars0 likes2 views
WebsiteGitHub

About

Unified querying, transformation, and modification of JSON, TOML, YAML, XML, INI, HCL, KDL and CSV.

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)

bash
brew install dasel

Go Install

bash
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
# 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:

bash
dasel man | man -l -

Basic Usage

Selecting Values

By default, Dasel evaluates the final selector and prints the result.

bash
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'foo.bar'
# Output: "baz"

Modifying Values

Update values inline:

bash
echo '{"foo": {"bar": "baz"}}' | dasel -i json 'foo.bar = "bong"'
# Output: "bong"

Use --root to output the full document after modification:

bash
echo '{"foo": {"bar": "baz"}}' | dasel -i json --root 'foo.bar = "bong"'
# Output:
{
  "foo": {
    "bar": "bong"
  }
}

Update values based on previous value:

bash
echo '[1,2,3,4,5]' | dasel -i json --root 'each($this = $this*2)'
# Output:
[
    2,
    4,
    6,
    8,
    10
]

Format Conversion

bash
cat data.json | dasel -i json -o yaml

Recursive Descent (..)

Searches all nested objects and arrays for a matching key or index.

bash
echo '{"foo": {"bar": "baz"}}' | dasel -i json '..bar'
# Output:
[
    "baz"
]

Search (search)

Finds all values matching a condition anywhere in the structure.

bash
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

Issues· 25 open

View all issuesOpen on GitHub
  • #306

    Even more installation packages

    enhancementUpdated Aug 8, 2026
  • #552

    > escaped in TOML in JSON output

    bugUpdated Jul 16, 2026
  • #479

    manual installation for aarch64 linux

    enhancementUpdated Jun 30, 2026
  • #452

    Avoid string type quote stripping in yaml

    enhancementUpdated Jun 28, 2026
  • #460

    [V3] Directory Loading and Begin Implementing Lazy-Loading

    enhancementUpdated Aug 5, 2025
  • #285

    YAML anchors, aliases and references

    enhancementUpdated Jul 18, 2025
  • #440

    HTML support

    enhancementUpdated Oct 31, 2024
  • #437

    Emoji is changed to Unicode in yaml

    bugUpdated Oct 31, 2024
  • #178

    Preserve comments when editing files

    bugUpdated Apr 18, 2024
  • #278

    Square brackets syntax in yaml

    bugUpdated Aug 29, 2023

> Tags

Gocliconfigconfigurationdata-processing

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理