Go Command-line

Open-source Go projects categorized as Command-line

Top 23 Go Command-line Projects

  • GitHub repo cobra

    A Commander for modern Go CLI interactions

    Project mention: I'm trying to create a CLI application using Go. After I've done go build, I can run the app using "./app repeat -2 echo go", where app is my binary, repeat is a custom command to loop and 2 is the number. Is it possible to do it wìthout the ./ in the beginning? | reddit.com/r/golang | 2021-06-07
  • GitHub repo micro-editor

    A modern and intuitive terminal-based text editor

    Project mention: Which text editor is best suitable for new beginner in Linux? | reddit.com/r/linux4noobs | 2021-06-14

    Command Line editor = nano is hugely common but I'd advise getting micro as it's far better than nano, IMO. https://micro-editor.github.io/

  • GitHub repo urfave/cli

    A simple, fast, and fun package for building command line apps in Go (by urfave)

    Project mention: High-Performance Shortlink creator in Golang | reddit.com/r/golang | 2021-05-21

    Another option would be to use something like urfave/cli to read values from environment variables and CLI flags.

  • GitHub repo ctop

    Top-like interface for container metrics

    Project mention: Found this nice top-like CLI tool for container metrics | reddit.com/r/selfhosted | 2021-04-14
  • GitHub repo termui

    Golang terminal dashboard

    Project mention: termui, set widget background | reddit.com/r/golang | 2021-05-02

    This is interesting. The version you link to is not the newest. If you just look for the current (master) version of theme.go, it has changed quite radically.

  • GitHub repo sampler

    Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file.

    Project mention: Sampler: Visualization for any shell command | reddit.com/r/linux | 2021-02-21
  • GitHub repo gocui

    Minimalist Go package aimed at creating Console User Interfaces.

    Project mention: Results of the official Go survey | reddit.com/r/golang | 2021-03-14

    I've been using the gocui library for building apps that are too small for a full blown server based solution, but still need to capture text input and menu selection.

  • GitHub repo usql

    Universal command-line interface for SQL databases

    Project mention: Usql 0.9.1 – Now with Autocomplete | news.ycombinator.com | 2021-05-09

    There's a new version of usql - the universal command-line client for SQL databases.

    After I started contributing to it a while ago, I went through all comments in older posts about it here on hackernews. I think the most requested feature was autocomplete. So I went ahead and implemented it. I surprised myself, how useful it ended up being. This includes completing filenames and even command names which I use on a regular basis and know very well.

    Another thing we managed to figure out are static builds for Linux. If you previously had issues with starting usql, seeing errors about libicu, you might want to give this latest version a try.

    There's also a basic implementation of the `\copy` command. Combined with the `csvq` driver, it allows loading CSV or JSON files to any supported database. But it doesn't do _any_ type mapping, so you might have to add some casting in the source query.

    Other new features include pager support, output to a file or a pipe, `\crosstab` command, and many more.

    If that got your attention, give it a spin. Full release notes are available at https://github.com/xo/usql/releases. As always, all feedback and contributions are welcome.

  • GitHub repo Rich Interactive Widgets for Terminal UIs

    Terminal UI library with rich, interactive widgets — written in Golang

    Project mention: Paginate Output in Console | reddit.com/r/golang | 2021-06-06

    You can use https://github.com/rivo/tview/ Or if that is too complex you can print something on the same line by doing a carrot return like this: fmt.Printf("\rPrinting on the same line over and over")

  • GitHub repo color

    Color package for Go (golang)

  • GitHub repo promptui

    Interactive prompt for command-line applications

    Project mention: Tf - A CLI to generate terraform configuration with an interactive prompt | reddit.com/r/golang | 2021-01-22

    I got into cli applications lately and came across cobra. It was highly intuitive and very much easy to use so I couldn't get enough of it and wanted to create something to make it useful along with promptui.

  • GitHub repo termbox-go

    Pure Go termbox implementation

    Project mention: Desktop applications discussion | reddit.com/r/golang | 2021-04-28
  • GitHub repo go-prompt

    Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.

    Project mention: Bit (1.0) – a modern Git CLI in Go | news.ycombinator.com | 2021-02-26

    Bit uses cobra a little but for the autocomplete it uses https://github.com/c-bata/go-prompt

  • GitHub repo kafka-go

    Kafka library in Go

    Project mention: Is segmentio/kafka-go production ready ? | reddit.com/r/apachekafka | 2021-06-01

    I am planning to use segmentio/kafka-go for building a production ready Kafka producer client. kafka-go's Conn type provides us the exact level of abstraction and set of features required by our use-case.

  • GitHub repo kingpin

    CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser

  • GitHub repo pet

    Simple command-line snippet manager, written in Go.

    Project mention: Sd: My Script Directory | news.ycombinator.com | 2021-03-15
  • GitHub repo arduino-cli

    Arduino command line tool

    Project mention: is there any other way to load codes on uno without the IDE? | reddit.com/r/arduino | 2021-05-15

    There is the 'arduino cli' https://github.com/arduino/arduino-cli which lets you do all the IDE stuff from a command line.

  • GitHub repo tcell

    Tcell is an alternate terminal package, similar in some ways to termbox, but better in others.

    Project mention: Print editable string in terminal | reddit.com/r/golang | 2021-05-21

    It is not clear exactly how you are doing this, but I'm going to guess you are printing to the terminal and then reading from it. The short answer is that what you are asking for is impossible with that technique. You need a library that implements it, because it requires a whole lot of obscure knowledge that is largely a waste of time to obtain when you can outsource it to a library. I've used tview successfully. tcell provides a lower level interface that tview is built on top of that does more exactly the thing you're asking, but redoing your app entirely in terms of tview is probably a good idea.

  • GitHub repo doctl

    The official command line interface for the DigitalOcean API.

    Project mention: Connect DigitalOcean Kubernetes to GitLab - Tutorial for Windows 10 Users | dev.to | 2021-01-21

    Download and install windows version from doctl

  • GitHub repo The Platinum Searcher

    A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings.

  • GitHub repo cointop

    A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀

    Project mention: Need help finding an app to track crypto prices | reddit.com/r/macapps | 2021-04-13

    I don't own any cryptocurrencies but I find it fun to observe. try using Cointop, it's a command-line tool that works really well.

  • GitHub repo survey

    A golang library for building interactive prompts with full support for windows and posix terminals.

    Project mention: Survey library | reddit.com/r/rust | 2021-05-25

    I'm coming from the go world, where I loved the survey library. I was wondering, whether rust has a similar one.

  • GitHub repo Dnote

    A simple command line notebook for programmers

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-06-14.

Index

What are some of the best open-source Command-line projects in Go? This list will help you:

Project Stars
1 cobra 21,903
2 micro-editor 17,115
3 urfave/cli 15,961
4 ctop 11,686
5 termui 11,009
6 sampler 8,937
7 gocui 7,197
8 usql 6,546
9 Rich Interactive Widgets for Terminal UIs 5,727
10 color 4,395
11 promptui 4,165
12 termbox-go 4,062
13 go-prompt 3,954
14 kafka-go 3,577
15 kingpin 3,063
16 pet 3,062
17 arduino-cli 2,931
18 tcell 2,817
19 doctl 2,761
20 The Platinum Searcher 2,704
21 cointop 2,442
22 survey 2,415
23 Dnote 2,101
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com