Skip to main content
Go Time

Crawl, walk & run your way to usable CLIs in Go

57 min episode · 2 min read
·

Episode

57 min

Read time

2 min

AI-Generated Summary

Key Takeaways

  • Golden File Testing: Custom implementation prevents race conditions in CLI output testing by ensuring consistent rendering capture, unlike Charm's experimental library that missed timing-dependent elements like spinners.
  • Interactive CLI Design: Implement auto-authentication and org selection prompts instead of failing with error messages - redirect users to sign-in flow then continue original command automatically.
  • API-First Development: Use OpenAPI specs with Prism mock server for parallel CLI/API development, enabling rapid iteration without building full backend implementation until contract is finalized.
  • Reentrant Command Architecture: Design CLI commands to detect previous state and resume where stopped, allowing users to run same setup command multiple times without duplicating completed steps.

What It Covers

Wesley Berry shares his journey building Anchor's CLI in Go, deviating from standard libraries like Cobra and Bubble Tea to create custom testing and user experience solutions.

Key Questions Answered

  • Golden File Testing: Custom implementation prevents race conditions in CLI output testing by ensuring consistent rendering capture, unlike Charm's experimental library that missed timing-dependent elements like spinners.
  • Interactive CLI Design: Implement auto-authentication and org selection prompts instead of failing with error messages - redirect users to sign-in flow then continue original command automatically.
  • API-First Development: Use OpenAPI specs with Prism mock server for parallel CLI/API development, enabling rapid iteration without building full backend implementation until contract is finalized.
  • Reentrant Command Architecture: Design CLI commands to detect previous state and resume where stopped, allowing users to run same setup command multiple times without duplicating completed steps.

Notable Moment

Berry argues positional arguments should be eliminated from multi-command CLIs because learned patterns don't transfer between commands, preferring explicit flags for knowledge transferability.

Know someone who'd find this useful?

You just read a 3-minute summary of a 54-minute episode.

Get Go Time summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

More from Go Time

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.

You're clearly into Go Time.

Every Monday, we deliver AI summaries of the latest episodes from Go Time and 192+ other podcasts. Free for up to 3 shows.

Start My Monday Digest

No credit card · Unsubscribe anytime