ランキングに戻る

TomWright/dasel

Godaseldocs.tomwright.me

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

jsonyamlconfigurationselectordata-structuresconfigparseryaml-processorjson-processingdevops-toolsgolangcli
スター成長
スター
8k
フォーク
170
週間成長
Issue
16
2k4k6k8k
2020年9月2022年8月2024年8月2026年7月
成果物Go Modulesgo get github.com/TomWright/dasel
README

Gitbook Go Report Card PkgGoDev Test Build codecov Mentioned in Awesome Go GitHub Downloads Homebrew Formula Downloads GitHub License GitHub tag (latest by date) Homebrew tag (latest by date)

Dasel mascot

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"
]

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

Stargazers over time

関連リポジトリ
fastapi/fastapi

FastAPI framework, high performance, easy to learn, fast to code, ready for production

PythonPyPIMIT Licensepythonjson
fastapi.tiangolo.com
100.8k9.7k
typicode/json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)

JavaScriptnpmMIT Licenseapifake
75.7k7.3k
redis/redis

For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.

COtherdatabasekey-value
redis.io
75.6k24.7k
chinese-poetry/chinese-poetry

The most comprehensive database of Chinese poetry 🧶最全中华古诗词数据库, 唐宋两朝近一万四千古诗人, 接近5.5万首唐诗加26万宋诗. 两宋时期1564位词人,21050首词。

JavaScriptnpmMIT Licensejsonchinese
awesome-poetry.top
52.7k10.6k
prettier/prettier

Prettier is an opinionated code formatter.

JavaScriptnpmMIT Licenseformatterprinter
prettier.io
52.1k4.9k
nlohmann/json

JSON for Modern C++

C++MIT Licensejsonjson-pointer
json.nlohmann.me
50.2k7.4k
Asabeneh/30-Days-Of-JavaScript

30 days of JavaScript programming challenge is a step-by-step guide to learn JavaScript programming language in 30 days. This challenge may take more than 100 days, please just follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

JavaScriptnpm30daysofjavascriptjavascript-for-everyone
46.6k10.5k
fastapi/full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

TypeScriptnpmMIT Licensepythonjson
44.4k8.8k
AykutSarac/jsoncrack.com

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

TypeScriptnpmApache License 2.0jsontool
jsoncrack.com
44.3k3.6k
httpie/cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.

PythonPyPIBSD 3-Clause "New" or "Revised" Licensehttpcli
httpie.io
38.3k4k
SheetJS/sheetjs

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs

Apache License 2.0xlsxexcel
sheetjs.com
36.3k7.9k
codex-team/editor.js

A block-style editor with clean JSON output

TypeScriptnpmApache License 2.0editorwysiwyg
editorjs.io
31.9k2.2k