---
title: "Discussion on \"Building Go CLIs with Cobra: a practical guide\" | Hashnode"
description: "Discussion on \"Building Go CLIs with Cobra: a practical guide\". Learn how to build a Go CLI with Cobra: the library behind kubectl, helm, etc. Root commands, subcommands, flags, and a real working example."
url: "https://hashnode.com/posts/building-go-clis-with-cobra-a-practical-guide/6a5f6e67354581db611cacbb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Building Go CLIs with Cobra: a practical guide](https://ferztyle.me/building-go-clis-with-cobra-a-practical-guide?utm_source=hashnode&utm_medium=feed)

Learn how to build a Go CLI with Cobra: the library behind kubectl, helm, etc. Root commands, subcommands, flags, and a real working example.

Jul 21 · 19 min read · ferztyle.me  
Read the article

-   [#golang](https://hashnode.com/tag/golang)
-   [#cobra](https://hashnode.com/tag/cobra)
-   [#kubernetes](https://hashnode.com/tag/kubernetes)
-   [#devops](https://hashnode.com/tag/devops)
-   [#platform-engineering](https://hashnode.com/tag/platform-engineering)

## Written by

[Fer](https://hashnode.com/@ferztyle)

@ferztyle · Asuncion, Paraguay

  
[View profile](https://hashnode.com/@ferztyle)

Sr. DevOps/SRE

Hey, I'm Fer, a Senior SRE/DevOps engineer based in Asunción, Paraguay. My day-to-day life is at the intersection of cloud infrastructure, automation, and reliability, working with AWS, Kubernetes, and the tools that keep systems running at scale. A while back, I decided to go deeper into Go. Not just as a scripting language to replace Bash, but as a proper engineering discipline, learning how to design clean systems, write idiomatic Golang code, and build tools that last.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
