feat: read recipes from stdin and add --tasks-format - #411
Merged
Conversation
`apply`, `plan`, and `validate` now accept `-` as the recipe source, spelled either as `--tasks -` or as a bare positional argument, matching the `docket fmt -` that already existed. The new `--tasks-format` flag states the recipe format outright instead of inferring it from the file extension, which matters for stdin, for an extension that is absent or misleading, and for a flow-style YAML recipe that would otherwise be sniffed as JSON5. `tasks-format` joins the reserved input names.
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
apply,plan, andvalidatenow accept-as the recipe source, spelled either as--tasks -or as a bare positional argument, matching thedocket fmt -that already existed. The new--tasks-formatflag states the recipe format outright instead of inferring it from the file extension, which matters for stdin, for an extension that is absent or misleading, and for a flow-style YAML recipe that would otherwise be sniffed as JSON5.tasks-formatjoins the reserved input names.A piped recipe behaves like any other: its
inputs:still become--<name>flags, and it takes precedence over atasks.ymlin the working directory. This makesdocket export --output - | docket apply -work end to end.The flag is named
--tasks-formatrather than--formatfor two reasons.--formatalready means output format elsewhere in the Dokku ecosystem, sitting next to docket's own--json, and reserving the un-hyphenatedformatwould have broken any recipe declaring an input by that name. A hyphenated input name is already rejected, so reservingtasks-formatcannot break an existing recipe. This also keeps plain--formatfree forinitandexport, which infer their output format from--outputand today can only emit YAML to stdout.Closes the first half of #406. Two follow-ups are carved out of the rest: #409 for the ansible-dokku wrapper developer documentation, and #410 for a format override on
initandexportoutput.