table of contents
| DASEL(1) | DASEL Manual | DASEL(1) |
NAME¶
dasel - Query and modify data structures from the command line.
SYNOPSIS¶
dasel [flags] [query]
dasel command [flags]
DESCRIPTION¶
dasel is a command-line tool for querying and modifying data structures. It supports multiple data formats including JSON, YAML, TOML, CSV, XML, and KDL.
COMMANDS¶
- query
- [default] Execute a query
- version
- Print the version
- interactive
- Start an interactive session (alpha)
- completion
- Generate shell completion script
- man
- Generate man page
OPTIONS¶
The following options are available for the default query command:
- --var
- Variables to pass to the query. E.g. --var foo="bar" --var baz=json:file:./some/file.json
- --rw-flag
- Read/Write flag to customise parsing/output. Applies to read + write E.g. --rw-flag csv-delimiter=;
- --read-flag
- Reader flag to customise parsing. E.g. --read-flag xml-mode=structured
- --write-flag
- Writer flag to customise output. E.g. --write-flag csv-delimiter=;
- -i, --in
- The format of the input data.
- -o, --out
- The format of the output data.
- --root
- Return the root value.
- --compact
- Output in compact mode (no indentation/newlines).
- --unstable
- Allow access to potentially unstable features.
- --it
- Run in interactive mode (alpha).
- -c, --config
- Path to config file
GLOBAL OPTIONS¶
- -h, --help
- Show context-sensitive help.
QUERY OPTIONS¶
- --var
- Variables to pass to the query. E.g. --var foo="bar" --var baz=json:file:./some/file.json
- --rw-flag
- Read/Write flag to customise parsing/output. Applies to read + write E.g. --rw-flag csv-delimiter=;
- --read-flag
- Reader flag to customise parsing. E.g. --read-flag xml-mode=structured
- --write-flag
- Writer flag to customise output. E.g. --write-flag csv-delimiter=;
- -i, --in
- The format of the input data.
- -o, --out
- The format of the output data.
- --root
- Return the root value.
- --compact
- Output in compact mode (no indentation/newlines).
- --unstable
- Allow access to potentially unstable features.
- --it
- Run in interactive mode (alpha).
- -c, --config
- Path to config file
INTERACTIVE OPTIONS¶
- --var
- Variables to pass to the query. E.g. --var foo="bar" --var baz=json:file:./some/file.json
- --rw-flag
- Read/Write flag to customise parsing/output. Applies to read + write E.g. --rw-flag csv-delimiter=;
- --read-flag
- Reader flag to customise parsing. E.g. --read-flag xml-mode=structured
- --write-flag
- Writer flag to customise output. E.g. --write-flag csv-delimiter=;
- -i, --in
- The format of the input data.
- -o, --out
- The format of the output data.
- -c, --config
- Path to config file
EXAMPLES¶
- Query JSON from stdin:
- echo '{"name": "Tom"}' | dasel 'name'
- Convert JSON to YAML:
- echo '{"name": "Tom"}' | dasel -i json -o yaml
- Query with compact output:
- echo '{"name": "Tom"}' | dasel -i json -o json --compact
SEE ALSO¶
| 2026-05-19 | 3.11.0-1 |