Goal
Add first-class TOML processing without introducing a second major query language.
Proposal
Implement a native tomlq builtin with jq-style semantics:
- parse TOML input/file into structured data
- run existing jq/jaq-style filters against that data model
- emit JSON by default
- optional round-trip back to TOML for write/update workflows
Why this shape
Bashkit already has strong jq support. Reusing the jq mental model is lower-friction than adopting a separate TOML-specific DSL.
Initial scope
tomlq FILTER [FILE]
- stdin support
-r raw output
-c compact JSON output
-t / --toml-output to render result back as TOML when possible
- good errors for non-representable TOML values / invalid top-level output
Non-goals
- shelling out to external tools
- adding a large independent TOML CLI surface before validating demand
Implementation sketch
- parse via Rust TOML crate
- convert TOML -> JSON-like value for filter execution
- optionally convert filtered result back to TOML for output
- spec tests for read, select, update, stdin, invalid TOML, invalid round-trip cases
Goal
Add first-class TOML processing without introducing a second major query language.
Proposal
Implement a native
tomlqbuiltin with jq-style semantics:Why this shape
Bashkit already has strong
jqsupport. Reusing the jq mental model is lower-friction than adopting a separate TOML-specific DSL.Initial scope
tomlq FILTER [FILE]-rraw output-ccompact JSON output-t/--toml-outputto render result back as TOML when possibleNon-goals
Implementation sketch