Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free. Learn more →
Top 23 Go Standard CLI Projects
-
In my build phase, I compile the source to create a k3sup binary and I also run the binary to generate shell script completions. Give kudos to this functionality which comes from spf13/cobra Go library for CLIs.
-
Project mention: Best practices for distributing and updating a Go CLI on Linux? | /r/golang | 2023-05-18
Can you use a framework like urfavecli https://github.com/urfave/cli? This will auto-update every time it detects a new version from your CLI's GitHub repository
-
SonarQube
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
-
Shameless plug: Elvish is a shell with a filesystem navigator built in - you can see it in demo 5 on the homepage https://elv.sh
-
survey
A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
-
Project mention: climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more | /r/golang | 2023-07-07
Args could also have detailed help (like flags) -- usage line is already auto-generated from arg(s) name and type but that's about it. This is something Cobra doesn't do for whatever reason (but https://github.com/alecthomas/kingpin does and I like it)
-
The Platinum Searcher
A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings.
People have tried. See the_platinum_searcher and sift.
-
-
Mergify
Tired of breaking your main and manually rebasing outdated pull requests?. Managing outdated pull requests is time-consuming. Mergify's Merge Queue automates your pull request management & merging. It's fully integrated to GitHub & coordinated with any CI. Start focusing on code. Try Mergify for free.
-
https://github.com/jessevdk/go-flags provides a pretty neat way to specify flags and handle commands. Not so much extensible as cobra, but good enough for small cli tools
-
My understanding is that you can use pflag as a drop in replacement of the standard lib's flag (import flag "github.com/spf13/pflag"). So it can be used as a standalone lib I suppose.
-
-
Project mention: Any opinionated tool / framework for creating binary CLI tools? | /r/devops | 2022-11-12
Golang with https://github.com/mitchellh/cli.
-
Project mention: climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more | /r/golang | 2023-07-07
I’ve been using https://github.com/alecthomas/kong for exposing generated protobuf structs for CLI args. How does your library compare?
-
There isn't enough compelling reasons to use your library as mentioned by n4jm4 there is already docopt. https://github.com/docopt/docopt.go or the standard flag library.
-
-
-
-
how would you compare this to something like https://github.com/jawher/mow.cli ?
-
flaggy
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
-
-
-
Project mention: Christmas giveaway: 10 copies of my book Domain-driven Design with Golang book, also AMA | /r/golang | 2022-12-23
I believe my story isn't a funny problem that I have specifically used Go lang for though I always wanted to make a CLI without using languages like Python, JS and all because there are many things which can be done with languages like Go. So I made a project called Box CLI Maker.
-
I use Carapace which provides completions across tons of shells.
-
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
Go Standard CLI related posts
- Packaging Go for Arch Linux Tutorial
- Add License Headers to Your Code Files
- climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more
- I need CTRL + A (Select all) command on the cmd
- After years of bash, I actually found a shortcut I never heard about.
- Getopt like argument parser for Golang.
- ZSH-like autocompletion
-
A note from our sponsor - SonarQube
www.sonarqube.org | 22 Sep 2023
Index
What are some of the best open-source Standard CLI projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | cobra | 33,425 |
2 | urfave/cli | 20,720 |
3 | elvish | 5,135 |
4 | survey | 3,967 |
5 | kingpin | 3,372 |
6 | The Platinum Searcher | 2,782 |
7 | Dnote | 2,574 |
8 | go-flags | 2,439 |
9 | pflag | 2,188 |
10 | readline | 1,969 |
11 | mitchellh/cli | 1,684 |
12 | kong | 1,542 |
13 | docopt.go | 1,409 |
14 | liner | 1,002 |
15 | cli-init | 923 |
16 | complete | 895 |
17 | mow.cli | 856 |
18 | flaggy | 836 |
19 | cli | 696 |
20 | argparse | 548 |
21 | box-cli-maker | 383 |
22 | carapace-bin | 312 |
23 | 1build | 217 |