https://github.com/TomWright/dasel Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} TomWright / dasel Public * * Notifications * Fork 43 * Star 1.9k 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 MIT License 1.9k stars 43 forks Star Notifications * Code * Issues 16 * Pull requests 2 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 12 branches 51 tags Code Latest commit @TomWright TomWright Add sprig template functions to output formatter ... b779b88 Jan 6, 2022 Add sprig template functions to output formatter b779b88 Git stats * 395 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Fix asset name in linux arm32 build Oct 21, 2021 benchmark Upgrade to go v1.17 Aug 21, 2021 cmd/dasel Clean up error output Nov 9, 2021 docker ci: alpine Docker image Sep 28, 2021 internal Clean up error output Nov 9, 2021 tests/assets Add tests to confirm selecting works with xml Oct 28, 2020 .gitignore Add JSON support, more tests and comments Sep 22, 2020 CHANGELOG.md Add sprig template functions to output formatter Jan 6, 2022 CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Nov 1, 2020 LICENSE Create LICENSE Sep 22, 2020 README.md Add a data conversion example to the readme Aug 14, 2021 codecov.yaml Revert "Use coveralls instead of codecov" Nov 16, 2020 condition.go Search selector (#43) Nov 16, 2020 condition_equal.go Remove some logging lines Nov 8, 2021 condition_key_equal.go Add != comparison operator support in dynamic and search selectors Aug 8, 2021 condition_more_than.go Add type selector Nov 3, 2021 condition_test.go Add type selector Nov 3, 2021 error.go Improve UnsupportedTypeForSelector error message Feb 24, 2021 error_test.go Improve UnsupportedTypeForSelector error message Feb 24, 2021 go.mod Add sprig template functions to output formatter Jan 6, 2022 go.sum Add sprig template functions to output formatter Jan 6, 2022 node.go Add FormatNode and FormatNodes functions Aug 11, 2021 node_delete.go Fix bugs when dealing with marked deletes, and add a bunch of tests Aug 1, 2021 node_internal_test.go Code cleanup and tests Sep 23, 2020 node_propagate.go Add some tests Aug 1, 2021 node_propagate_internal_test.go Improve UnsupportedTypeForSelector error message Feb 24, 2021 node_put.go Fix bugs when dealing with marked deletes, and add a bunch of tests Aug 1, 2021 node_query.go Add type selector Nov 3, 2021 node_query_internal_test.go Add type selector Nov 3, 2021 node_query_multiple.go Add type selector Nov 3, 2021 node_query_multiple_internal_test.go Add type selector Nov 3, 2021 node_test.go Fix an issue when parsing selectors containing unicode characters Aug 30, 2021 output_formatter.go Add sprig template functions to output formatter Jan 6, 2022 output_formatter_test.go Add select and selectMultiple as an alias of query and queryMultiple ... Aug 11, 2021 parse_selector.go Add type selector Nov 3, 2021 selector.go Fix an issue when parsing selectors containing unicode characters Aug 30, 2021 selector_test.go Fix an issue when parsing selectors containing unicode characters Aug 30, 2021 update_kubernetes.gif Make gif loop Oct 30, 2020 View code [ ] dasel One tool to rule them all Table of contents Quickstart Select Convert json to yaml Put Delete Issue vs Discussion Features Documentation Playground Benchmarks README.md 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 * Issue vs discussion * Features * Table of contents * Documentation * Playground * Benchmarks Quickstart Dasel is available on homebrew, ASDF, scoop, docker 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/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 string -r json '.email' 'contact@tomwright.me' { "email": "contact@tomwright.me", "name": "Tom" } See put documentation. Delete echo '{ "email": "contact@tomwright.me", "name": "Tom" }' | dasel delete -r json '.email' 'contact@tomwright.me' { "name": "Tom" } See delete documentation. 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. * Self update. 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. 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 Stars 1.9k stars Watchers 10 watching Forks 43 forks Releases 51 v1.22.1 Latest Nov 9, 2021 + 50 releases Sponsor this project * * https://www.buymeacoffee.com/TomWright Learn more about GitHub Sponsors Packages 1 Used by 8 * @zhufuyi * @linzeyan * @la0wan9 * @gjbae1212 * @gsmcwhirter Contributors 9 * @TomWright * @ghostsquad * @brenol * @lcook * @chocolateboy * @littleli * @ryuheechul * @rhtenhove * @MikkelHJuul Languages * Go 99.1% * Other 0.9% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. 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.