{"id":13367700,"url":"https://github.com/TomWright/dasel","last_synced_at":"2025-03-12T20:30:53.029Z","repository":{"id":37497965,"uuid":"297615696","full_name":"TomWright/dasel","owner":"TomWright","description":"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.","archived":false,"fork":false,"pushed_at":"2024-10-28T22:33:37.000Z","size":8876,"stargazers_count":7138,"open_issues_count":40,"forks_count":135,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-10-29T10:24:33.815Z","etag":null,"topics":["cli","config","configuration","data-processing","data-structures","data-wrangling","devops-tools","go","golang","json","json-processing","parser","query","selector","toml","update","xml","yaml","yaml-processor"],"latest_commit_sha":null,"homepage":"https://daseldocs.tomwright.me","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomWright.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"TomWright","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/TomWright"]}},"created_at":"2020-09-22T10:33:56.000Z","updated_at":"2024-10-27T19:48:14.000Z","dependencies_parsed_at":"2023-12-15T09:48:51.379Z","dependency_job_id":"9f08f519-5d6c-4944-9960-d959fe88b925","html_url":"https://github.com/TomWright/dasel","commit_stats":{"total_commits":595,"total_committers":28,"mean_commits":21.25,"dds":"0.16806722689075626","last_synced_commit":"e96f281f05a1c1f01ed251f7041dfd0f49325b1a"},"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fdasel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fdasel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fdasel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fdasel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomWright","download_url":"https://codeload.github.com/TomWright/dasel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243290670,"owners_count":20267764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","config","configuration","data-processing","data-structures","data-wrangling","devops-tools","go","golang","json","json-processing","parser","query","selector","toml","update","xml","yaml","yaml-processor"],"created_at":"2024-07-30T00:02:02.546Z","updated_at":"2025-03-12T20:30:53.004Z","avatar_url":"https://github.com/TomWright.png","language":"Go","readme":"# dasel\n\n[![Gitbook](https://badges.aleen42.com/src/gitbook_1.svg)](https://daseldocs.tomwright.me)\n[![Go Report Card](https://goreportcard.com/badge/github.com/TomWright/dasel/v2)](https://goreportcard.com/report/github.com/TomWright/dasel/v2)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/tomwright/dasel)](https://pkg.go.dev/github.com/tomwright/dasel/v2)\n![Test](https://github.com/TomWright/dasel/workflows/Test/badge.svg)\n![Build](https://github.com/TomWright/dasel/workflows/Build/badge.svg)\n[![codecov](https://codecov.io/gh/TomWright/dasel/branch/master/graph/badge.svg)](https://codecov.io/gh/TomWright/dasel)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)\n![GitHub All Releases Downloads](https://img.shields.io/github/downloads/TomWright/dasel/total)\n![GitHub License](https://img.shields.io/github/license/TomWright/dasel)\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/TomWright/dasel?label=latest%20release)](https://github.com/TomWright/dasel/releases/latest)\n[![Homebrew tag (latest by date)](https://img.shields.io/homebrew/v/dasel)](https://formulae.brew.sh/formula/dasel)\n\nDasel (short for data-selector) allows you to query and modify data structures using selector strings.\n\nComparable to [jq](https://github.com/stedolan/jq) / [yq](https://github.com/kislyuk/yq), but supports JSON, YAML, TOML, XML and CSV with zero runtime dependencies.\n\n## One tool to rule them all\n\nSay good bye to learning new tools just to work with a different data format.\n\nDasel 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.\n\n![Update Kubernetes Manifest](demo.gif)\n\u003cdetails\u003e\n\u003csummary\u003eCommands executed in the demo\u003c/summary\u003e\n\n```bash\n# Piping data into dasel\necho '{\"demo\": \"Integrating with github releases...\"}' | dasel -r json 'demo'\n\n# Fetch dasel releases from github api\ncurl -L \\\n    -H \"Accept: application/vnd.github+json\" \\\n    -H \"X-GitHub-Api-Version: 2022-11-28\" \\\n    https://api.github.com/repos/TomWright/dasel/releases \u003e releases.json\nless releases.json\n\n# Extract and structure release data by version with download URL's by asset name\ndasel -f releases.json -w yaml 'all().mapOf(version,tag_name,download,assets.all().mapOf(name,name,url,browser_download_url).merge()).merge()' \u003e releases_download.yaml\nless releases_download.yaml\n\n# Restructure the above data into CSV format, destructuring into rows.\ndasel -f releases_download.yaml -w csv 'all().download.all().mapOf(version,parent(2).version,name,name,url,url).merge()' \u003e releases_download.csv\nless releases_download.csv\n\n# Fetch the first CSV row and output as JSON\ndasel -f releases_download.csv -w json 'first()'\n```\n\u003c/details\u003e\n\n## Table of contents\n\n- [Dasel](#dasel)\n- [One tool to rule them all](#one-tool-to-rule-them-all)\n- [Quickstart](#quickstart)\n- [Completion](#completion)\n- [Issue vs discussion](#issue-vs-discussion)\n- [Features](#features)\n- [Table of contents](#table-of-contents)\n- [Documentation](#documentation)\n- [Playground](#playground)\n- [Benchmarks](#benchmarks)\n- [Pre-Commit](#pre-commit)\n\n## Quickstart\n\nDasel is available on [homebrew](https://daseldocs.tomwright.me/installation#homebrew), [ASDF](https://daseldocs.tomwright.me/installation#asdf), [scoop](https://daseldocs.tomwright.me/installation#scoop), [docker](https://daseldocs.tomwright.me/installation#docker), [Nix](https://daseldocs.tomwright.me/installation#nix) or as [compiled binaries](https://daseldocs.tomwright.me/installation#manual) from the [latest release](https://github.com/TomWright/dasel/releases/latest).\n\n```bash\nbrew install dasel\n```\n\nYou can also install a [development version](https://daseldocs.tomwright.me/installation#development-version) with:\n\n```bash\ngo install github.com/tomwright/dasel/v2/cmd/dasel@master\n```\n\nFor more information see the [installation documentation](https://daseldocs.tomwright.me/installation).\n\n### Select\n\n```bash\necho '{\"name\": \"Tom\"}' | dasel -r json 'name'\n\"Tom\"\n```\n\nSee [select documentation](https://daseldocs.tomwright.me/commands/select).\n\n### Convert json to yaml\n\n```bash\necho '{\"name\": \"Tom\"}' | dasel -r json -w yaml\nname: Tom\n```\n\nSee [select documentation](https://daseldocs.tomwright.me/commands/select).\n\n### Put\n\n```bash\necho '{\"name\": \"Tom\"}' | dasel put -r json -t string -v 'contact@tomwright.me' 'email'\n{\n  \"email\": \"contact@tomwright.me\",\n  \"name\": \"Tom\"\n}\n```\n\nSee [put documentation](https://daseldocs.tomwright.me/commands/put).\n\n### Delete\n\n```bash\necho '{\n  \"email\": \"contact@tomwright.me\",\n  \"name\": \"Tom\"\n}' | dasel delete -r json '.email'\n{\n  \"name\": \"Tom\"\n}\n```\n\nSee [delete documentation](https://daseldocs.tomwright.me/commands/delete).\n\n## Completion\n\nIf you want to use completion from the terminal you can do the following (using zsh in this example):\n\nAdd the following to `~/.zshrc` and reload your terminal.\n```bash\nexport fpath=(~/zsh/site-functions $fpath)\nmkdir -p ~/zsh/site-functions\ndasel completion zsh \u003e ~/zsh/site-functions/_dasel\ncompinit\n```\n\n## Pre-Commit\n\nAdd `dasel` hooks to `.pre-commit-config.yaml` file\n\n```yaml\n- repo: https://github.com/TomWright/dasel\n  rev: v1.25.1\n  hooks:\n    - id: dasel-validate\n```\n\nfor a native execution of dasel, or use:\n\n- `dasel-validate-docker` pre-commit hook for executing dasel using the official [Docker images](https://daseldocs.tomwright.me/installation#docker)\n- `dasel-validate-bin` pre-commit hook for executing dasel using the official [binary](https://daseldocs.tomwright.me/installation)\n\n## Issue vs Discussion\n\nI have enabled [discussions](https://github.com/TomWright/dasel/discussions) on this repository.\n\nI 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.\n\nPlease [raise an issue](https://github.com/TomWright/dasel/issues) if:\n\n- You find a bug.\n- You have a feature request and can clearly describe your request.\n\nPlease [open a discussion](https://github.com/TomWright/dasel/discussions) if:\n\n- You have a question.\n- You're not sure how to achieve something with dasel.\n- You have an idea but don't quite know how you would like it to work.\n- You have achieved something cool with dasel and want to show it off.\n- Anything else!\n\n## Features\n\n- [Query/select data from structured data files](https://daseldocs.tomwright.me/commands/select).\n- [Update data in structured data files](https://daseldocs.tomwright.me/commands/put).\n- Create data files.\n- [Supports multiple data formats/types](https://daseldocs.tomwright.me/supported-file-formats).\n- [Convert between data formats/types](https://daseldocs.tomwright.me/examples/change-file-format).\n- Uses a [standard query/selector syntax](https://daseldocs.tomwright.me/functions/selector-overview) across all data formats.\n- Zero runtime dependencies.\n- [Available on Linux, Mac and Windows](https://daseldocs.tomwright.me/installation).\n- Available to [import and use in your own projects](https://pkg.go.dev/github.com/tomwright/dasel/v2).\n- [Run via Docker](https://daseldocs.tomwright.me/installation#docker).\n- [Faster than jq/yq](#benchmarks).\n- [Pre-commit hooks](#pre-commit).\n\n## Documentation\n\nThe official dasel docs can be found at [daseldocs.tomwright.me](https://daseldocs.tomwright.me).\n\n## Playground\n\nYou can test out dasel commands using the [playground](https://dasel.tomwright.me).\n\nSource code for the playground can be found at [github.com/TomWright/daselplayground](https://github.com/TomWright/daselplayground).\n\n## Benchmarks\n\nIn my tests dasel has been up to 3x faster than jq and 15x faster than yq.\n\nSee the [benchmark directory](./benchmark/README.md).\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/TomWright/dasel.svg)](https://starchart.cc/TomWright/dasel)\n","funding_links":["https://github.com/sponsors/TomWright","https://www.buymeacoffee.com/TomWright"],"categories":["Go","DevShit","Uncategorized","OSS CLIs","Query Language","Repositories","cli","golang","Command-Line Tools","Other","\u003ca name=\"data-management-json\"\u003e\u003c/a\u003eData management - JSON/YAML/etc.","Relational Databases"],"sub_categories":["Uncategorized","HTTP Clients","Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomWright%2Fdasel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTomWright%2Fdasel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomWright%2Fdasel/lists"}