tektoncd / tektoncd/cli

Make tkn CLI agent-friendly for AI/LLM consumption

Open
#2,849 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

AI agents are increasingly using CLIs as their primary interface to external systems. The tkn CLI should be optimized for both human and agent consumption, following principles from You Need to Rewrite Your CLI for AI Agents.

Motivation

AI coding agents (Copilot, Claude Code, Cursor, etc.) use CLIs directly. They need:

  • Deterministic, machine-readable output — not tables designed for human eyes
  • Self-describing conventions — agents need to know how to use the CLI efficiently
  • Structured input — agents generate JSON more reliably than bespoke flag combinations
  • Reliable exit codes — agents depend on exit codes, not output parsing

Currently, tkn has inconsistent --output support, no non-TTY auto-detection, undocumented exit codes, and no structured JSON input path.

Sub-issues

Ordered by priority / effort-to-value ratio:

Phase 1 — Foundations
  1. #2856 — Ship a CONTEXT.md for AI agents (zero code, highest ROI)
  2. #2850 — Consistent --output json on all commands + non-TTY auto-detection
  3. #2855 — Consistent, documented exit codes
Phase 2 — Enhanced agent support
  1. #2851 — Structured JSON input for start commands
  2. #2853 — Field selection (--fields) — client-side filtering to reduce agent token consumption
  3. #2854 — Agent-friendly logs output (structured NDJSON logs)
Phase 3 — Advanced capabilities
  1. #2859 — Adversarial input validation for agent-generated commands
  2. #2852 — Runtime schema introspection for agent discovery
  3. #2860 — Dry-run and validation for mutating operations
  4. #2861 — MCP surface for direct agent integration

References

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

The issue names no files, tests, or entry points. Start by reviewing the linked Phase 1–3 sub-issues and choose one narrowly scoped task; done means implementing and validating that selected sub-issue rather than the entire agent-friendly CLI initiative.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.