Uploaded November 2026 | Updated November 2026, 2 days ago
What happens when an AI agent runs your CLI tool?
If your application relies on interactive prompts or raw stdout dumps, the answer is usually broken loops and hung processes.
In this talk, Miki Tebeka will explore how to engineering CLI for dual consumption. He’ll cover why Go is an ideal language for building command line tools and how simple architectural tweaks can transform a standard terminal utility into an agent-friendly execution engine.
What you'll learn:
✅ How to automatically switch between human UI (colors, spinners) and machine output (JSON/NDJSON) using TTY checks
✅ Techniques for stream separation (stdout vs. stderr) and token-efficient output filtering
✅ How to structure CLI errors so AI agents can self-correct and retry autonomously
---
Explore More from Ardan Labs
Online Courses: ardanlabs.com/education
Live Training Events: ardanlabs.com/live-training-events
Technical Blog: ardanlabs.com/blog
Github: github.com/ardanlabs
---
Connect with Ardan Labs
Website: ardanlabs.com
X: https://x.com/ardanlabs
LinkedIn: linkedin.com/company/ardanlabs
What happens when an AI agent runs your CLI tool?
If your application relies on interactive prompts or raw stdout dumps, the answer is usually broken loops and hung processes.
In this talk, Miki Tebeka will explore how to engineering CLI for dual consumption. He’ll cover why Go is an ideal language for building command line tools and how simple architectural tweaks can transform a standard terminal utility into an agent-friendly execution engine.
What you'll learn:
✅ How to automatically switch between human UI (colors, spinners) and machine output (JSON/NDJSON) using TTY checks
✅ Techniques for stream separation (stdout vs. stderr) and token-efficient output filtering
✅ How to structure CLI errors so AI agents can self-correct and retry autonomously
---
Explore More from Ardan Labs
Online Courses: ardanlabs.com/education
Live Training Events: ardanlabs.com/live-training-events
Technical Blog: ardanlabs.com/blog
Github: github.com/ardanlabs
---
Connect with Ardan Labs
Website: ardanlabs.com
X: https://x.com/ardanlabs
LinkedIn: linkedin.com/company/ardanlabs










