Add consistent --output json support to all tkn commands
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 461
- Forks
- 277
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 95
Description
Summary
Not all tkn commands support --output json. This makes it unreliable for AI agents and scripts that need machine-readable output.
Current State
start --dry-runsupports--output json/yamllistcommands use Go template tables, some support--outputviaPrintObjectsdescribecommands have custom formatted output, some support--outputviaPrintObjectV1logs,delete,cancelhave no structured output
Proposal
- Add
--output jsonand--output yamlto every command that produces output - Auto-detect non-TTY stdout and default to JSON (opt-out with
--output table) - Support
TKN_OUTPUT_FORMAT=jsonenvironment variable for session-wide default - Ensure all JSON output goes to stdout, all status/progress messages to stderr
Commands to update
-
pipeline list/describe/start/delete -
pipelinerun list/describe/delete/cancel/logs -
task list/describe/start/delete -
taskrun list/describe/delete/cancel/logs -
customrun list/describe/delete -
bundle list/push -
eventlistener list/describe -
triggerbinding list/describe -
triggertemplate list/describe -
clustertriggerbinding list/describe
/kind feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying the listed pipeline, pipelinerun, task, taskrun, customrun, bundle, eventlistener, triggerbinding, triggertemplate, and clustertriggerbinding commands, comparing existing PrintObjects and PrintObjectV1 support with commands such as logs, delete, and cancel. Done means every listed output-producing command supports JSON and YAML, non-TTY output defaults to JSON with a table opt-out, TKN_OUTPUT_FORMAT is honored, and JSON uses stdout while status messages use stderr.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100