https://github.com/TomWright/dasel Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} TomWright / dasel Public * * Notifications You must be signed in to change notification settings * Fork 124 * Star 6.4k 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. daseldocs.tomwright.me License MIT license 6.4k stars 124 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 32 * Pull requests 3 * Discussions * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights TomWright/dasel This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Last commit Last Name Name message commit date Latest commit History 703 Commits .github .github benchmark benchmark cmd/dasel cmd/dasel dencoding dencoding internal internal storage storage tests/assets tests/assets util util .gitignore .gitignore .pre-commit-hooks.yaml .pre-commit-hooks.yaml CHANGELOG.md CHANGELOG.md CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md Dockerfile Dockerfile LICENSE LICENSE README.md README.md codecov.yaml codecov.yaml context.go context.go context_test.go context_test.go error.go error.go error_test.go error_test.go func.go func.go func_all.go func_all.go func_all_test.go func_all_test.go func_and.go func_and.go func_and_test.go func_and_test.go func_append.go func_append.go func_count.go func_count.go func_count_test.go func_count_test.go func_equal.go func_equal.go func_equal_test.go func_equal_test.go func_filter.go func_filter.go func_filter_or.go func_filter_or.go func_filter_or_test.go func_filter_or_test.go func_filter_test.go func_filter_test.go func_first.go func_first.go func_first_test.go func_first_test.go func_index.go func_index.go func_index_test.go func_index_test.go func_join.go func_join.go func_join_test.go func_join_test.go func_key.go func_key.go func_keys.go func_keys.go func_keys_test.go func_keys_test.go func_last.go func_last.go func_last_test.go func_last_test.go func_len.go func_len.go func_len_test.go func_len_test.go func_less_than.go func_less_than.go func_less_than_test.go func_less_than_test.go func_map_of.go func_map_of.go func_map_of_test.go func_map_of_test.go func_merge.go func_merge.go func_merge_test.go func_merge_test.go func_metadata.go func_metadata.go func_metadata_test.go func_metadata_test.go func_more_than.go func_more_than.go func_more_than_test.go func_more_than_test.go func_not.go func_not.go func_not_test.go func_not_test.go func_null.go func_null.go func_null_test.go func_null_test.go func_or.go func_or.go func_or_default.go func_or_default.go func_or_default_test.go func_or_default_test.go func_or_test.go func_or_test.go func_parent.go func_parent.go func_parent_test.go func_parent_test.go func_property.go func_property.go func_property_test.go func_property_test.go func_string.go func_string.go func_string_test.go func_string_test.go func_this.go func_this.go func_this_test.go func_this_test.go func_type.go func_type.go func_type_test.go func_type_test.go go.mod go.mod go.sum go.sum selector.go selector.go selector_test.go selector_test.go step.go step.go truthy.go truthy.go truthy_test.go truthy_test.go update_kubernetes.gif update_kubernetes.gif value.go value.go View all files Repository files navigation * README * Code of conduct * MIT license dasel Gitbook Go Report Card PkgGoDev Test Build codecov Mentioned in Awesome Go GitHub All Releases Downloads GitHub License GitHub tag (latest by date) Homebrew tag (latest by date) Dasel (short for data-selector) allows you to query and modify data structures using selector strings. Comparable to jq / yq, but supports JSON, YAML, TOML, XML and CSV with zero runtime dependencies. One tool to rule them all Say good bye to learning new tools just to work with a different data format. Dasel uses a standard selector syntax no matter the data format. This means that once you learn how to use dasel you immediately have the ability to query/modify any of the supported data types without any additional tools or effort. Update Kubernetes Manifest Table of contents * Dasel * One tool to rule them all * Quickstart * Completion * Issue vs discussion * Features * Table of contents * Documentation * Playground * Benchmarks * Pre-Commit Quickstart Dasel is available on homebrew, ASDF, scoop, docker, Nix or as compiled binaries from the latest release. brew install dasel You can also install a development version with: go install github.com/tomwright/dasel/v2/cmd/dasel@master For more information see the installation documentation. Select echo '{"name": "Tom"}' | dasel -r json 'name' "Tom" See select documentation. Convert json to yaml echo '{"name": "Tom"}' | dasel -r json -w yaml name: Tom See select documentation. Put echo '{"name": "Tom"}' | dasel put -r json -t string -v 'contact@tomwright.me' 'email' { "email": "contact@tomwright.me", "name": "Tom" } See put documentation. Delete echo '{ "email": "contact@tomwright.me", "name": "Tom" }' | dasel delete -r json '.email' { "name": "Tom" } See delete documentation. Completion If you want to use completion from the terminal you can do the following (using zsh in this example): Add the following to ~/.zshrc and reload your terminal. export fpath=(~/zsh/site-functions $fpath) mkdir -p ~/zsh/site-functions dasel completion zsh > ~/zsh/site-functions/_dasel compinit Pre-Commit Add dasel hooks to .pre-commit-config.yaml file - repo: https://github.com/TomWright/dasel rev: v1.25.1 hooks: - id: dasel-validate for a native execution of dasel, or use: * dasel-validate-docker pre-commit hook for executing dasel using the official Docker images * dasel-validate-bin pre-commit hook for executing dasel using the official binary Issue vs Discussion I have enabled discussions on this repository. I am aware there may be some confusion when deciding where you should communicate when reporting issues, asking questions or raising feature requests so this section aims to help us align on that. Please raise an issue if: * You find a bug. * You have a feature request and can clearly describe your request. Please open a discussion if: * You have a question. * You're not sure how to achieve something with dasel. * You have an idea but don't quite know how you would like it to work. * You have achieved something cool with dasel and want to show it off. * Anything else! Features * Query/select data from structured data files. * Update data in structured data files. * Create data files. * Supports multiple data formats/types. * Convert between data formats/types. * Uses a standard query/selector syntax across all data formats. * Zero runtime dependencies. * Available on Linux, Mac and Windows. * Available to import and use in your own projects. * Run via Docker. * Faster than jq/yq. * Pre-commit hooks. Documentation The official dasel docs can be found at daseldocs.tomwright.me. Playground You can test out dasel commands using the playground. Source code for the playground can be found at github.com/TomWright/ daselplayground. Benchmarks In my tests dasel has been up to 3x faster than jq and 15x faster than yq. See the benchmark directory. Stargazers over time Stargazers over time About 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. daseldocs.tomwright.me Topics config go cli golang yaml toml parser json query xml configuration update selector data-structures data-wrangling devops-tools data-processing yaml-processor json-processing Resources Readme License MIT license Code of conduct Code of conduct Activity Stars 6.4k stars Watchers 30 watching Forks 124 forks Report repository Releases 84 v2.8.1 Latest Jun 30, 2024 + 83 releases Sponsor this project * * open_collective opencollective.com/dasel * https://www.buymeacoffee.com/TomWright Learn more about GitHub Sponsors Packages 0 Contributors 25 * @TomWright * @dependabot[bot] * @beatcracker * @guilherme-puida * @semihbkgr * @egawata * @ghostsquad * @pmeier * @brenol * @rhtenhove * @ImSingee * @cavus700 * @lcook * @chocolateboy + 11 contributors Languages * Go 98.7% * Other 1.3% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.