You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Summary
AI agents are increasingly using CLIs as their primary interface to external systems. The
tknCLI 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:
Currently,
tknhas inconsistent--outputsupport, no non-TTY auto-detection, undocumented exit codes, and no structured JSON input path.Sub-issues
Ordered by priority / effort-to-value ratio:
--output jsonon all commands + non-TTY auto-detectionNon-goals (for now)
Schema introspection (—tkn schema)kubectl explaincovers this (Add schema introspection command (tkn schema) #2852, closed)Field selection / NDJSON for list— limited value given Kubernetes API constraints (Add field selection and NDJSON streaming for list commands #2853, closed)References
/kind feature