tektoncd / tektoncd/cli

Make pipelinerun/taskrun logs agent-friendly

Open
#2,854 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

Summary

tkn pipelinerun logs and tkn taskrun logs are likely the most-used commands by AI agents debugging CI/CD failures. The current output is optimized for human consumption with color codes and interleaved multi-container output that's hard to parse programmatically.

Proposal

  • --output json for structured log output with metadata (task name, step name, timestamp, message)
  • Ensure --follow works well in non-interactive/agent contexts
  • Clear separation of log lines per step/container in structured mode
  • Consider --timestamps in a parseable format (RFC3339)

Example

tkn pipelinerun logs my-run --output json
{"task": "build", "step": "build-step", "timestamp": "2026-05-12T10:00:00Z", "message": "Building image..."}
{"task": "build", "step": "build-step", "timestamp": "2026-05-12T10:00:01Z", "message": "Successfully built abc123"}

NDJSON (one line per log entry) is the natural format here since logs are a stream.

/kind feature

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the implementations of tkn pipelinerun logs and tkn taskrun logs, then trace how log lines are collected, interleaved, colored, and followed. Define the structured NDJSON fields and parseable timestamp behavior from the proposal, including non-interactive --follow; done means both commands support agent-friendly structured output with clear task and step separation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.