Introduction
You are viewing dasel v2 documentation.
Introduction
Dasel (short for data-selector) allows you to query and modify data structures using selector strings.
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.
V1 to V2 breaking changes
This release does introduce a major version upgrade, and as such there are breaking changes.
Select command
The select command remains largely the same, but the selector format has changed a lot. See selector changes below.
Removal of
-p,--parser. Please use-r,--readand-w,--write.Note that if no
-wis given, the value of-ris used.dasel -p json ...becomesdasel -r json ...
Removal of
--formatflag.I plan on implementing this as a custom write parser instead.
Removal of
-m,--multiflag. All selectors now act in this manner.Removal of
-c,--compactflag. Use--pretty=falseinstead.
Put command
Removal of sub commands (e.g.
dasel put string).Dasel now expects a
dasel putcommand to have a-t,--typeflag that specified the type.If the given type doesn't match a pre-defined type (
string,int, etc) it is checked against the read parsers (e.g.json,yaml). This is how you can achieve the previousput documentfunctionality.
Complete removal of
dasel put object. Please usedasel put -t jsonor similar to achieve the same outcome.Removal of
-p,--parser. Please use-r,--readand-w,--write.Note that if no
-wis given, the value of-ris used.dasel -p json ...becomesdasel -r json ...
Removal of
-m,--multiflag. All selectors now act in this manner.Removal of
-c,--compactflag. Use--pretty=falseinstead.
Delete command
The delete command remains largely the same, but the selector format has changed a lot. See selector changes below.
Removal of
-p,--parser. Please use-r,--readand-w,--write.Note that if no
-wis given, the value of-ris used.dasel -p json ...becomesdasel -r json ...
Removal of
-m,--multiflag. All selectors now act in this manner.Removal of
-c,--compactflag. Use--pretty=falseinstead.
Update command
The self-update functionality within dasel has been completely removed. Please use package managers to achieve this functionality.
Selector changes
Dasel selectors have been completely reworked.
The purpose of this is to allow users to build their own complex logic and filtering without needing specific code being written to handle their use-case.
Please see the function overview for function documentation and examples.
Last updated