<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cli on The Manticore Project</title><link>https://themanticoreproject.com/tags/cli/</link><description>Recent content in Cli on The Manticore Project</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 20 May 2025 10:00:00 +0000</lastBuildDate><atom:link href="https://themanticoreproject.com/tags/cli/index.xml" rel="self" type="application/rss+xml"/><item><title>Go - Building CLI tools with goopts, a command-line argument parsing library</title><link>https://themanticoreproject.com/blog/goopts-command-line-parsing-library/</link><pubDate>Tue, 20 May 2025 10:00:00 +0000</pubDate><guid>https://themanticoreproject.com/blog/goopts-command-line-parsing-library/</guid><description>&lt;p>When I started building security tools in Go for The Manticore Project, I quickly ran into a recurring problem. Every tool needed argument parsing: authentication flags, LDAP connection settings, debug options, positional arguments for modes and subcommands. Go&amp;rsquo;s standard &lt;code>flag&lt;/code> package handles simple cases, but it does not support argument groups, subcommands, mutually exclusive options, or even required arguments.&lt;/p>
&lt;p>I looked at existing libraries. Some were too minimal, others tried to do too much and imposed heavy conventions on how you structure your code. None of them felt right for the kind of tools I was building: security tools with multiple modes (like &lt;code>audit&lt;/code>, &lt;code>add&lt;/code>, &lt;code>remove&lt;/code>), each with their own set of arguments, and common argument groups for authentication and LDAP settings.&lt;/p></description></item></channel></rss>