14 great tips to make amazing CLI applications

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • JetBrains - Developer Ecosystem Survey 2022
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • cobra

    A Commander for modern Go CLI interactions

    While it is fun to parse argv by hand, I go straight for full-featured command-line parsing frameworks like cobra in go, clap in rust, click in python, php-cli in PHP.

  • direnv

    unclutter your .profile

    environment variables. This has the added benefit of making your tool easy to integrate in CICD, and provide security by avoiding listing credentials in your command line. It also allows for easy customization per directory or project, using a tool like direnv.

  • JetBrains

    Developer Ecosystem Survey 2022. Take part in the Developer Ecosystem Survey 2022 by JetBrains and get a chance to win a Macbook, a Nvidia graphics card, or other prizes. We’ll create an infographic full of stats, and you’ll get personalized results so you can compare yourself with other developers.

  • clap-rs

    A full featured, fast Command Line Argument Parser for Rust

    While it is fun to parse argv by hand, I go straight for full-featured command-line parsing frameworks like cobra in go, clap in rust, click in python, php-cli in PHP.

  • asciinema

    Terminal session recorder 📹

    Tools like asciinema are great to show real-life workflows.

  • php-cli

    PHP Console Application made easy- build great console apps with ease. Comes with Zero Dependency and Autocompletion support. (by adhocore)

    While it is fun to parse argv by hand, I go straight for full-featured command-line parsing frameworks like cobra in go, clap in rust, click in python, php-cli in PHP.

  • glamour

    Stylesheet-based markdown rendering for your CLI apps 💇🏻‍♀️

    Consider using a pretty library to render markdown straight on the command line, for example glamour (golang) or rich (python).

  • rich

    Rich is a Python library for rich text and beautiful formatting in the terminal.

    I had a great time with all the charmbracelet libraries, like bubbletea for building TUIs and lipbgloss for styling. rich is a similar, awesome python library.

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • bubbletea

    A powerful little TUI framework 🏗

    This can be as easy as wrapping a simple stdin/stdout loop with rlwrap, all the way to using full featured TUI libraries like bubbletea (golang), textual (python) or imtui (c++).

  • lipgloss

    Style definitions for nice terminal layouts 👄

    I had a great time with all the charmbracelet libraries, like bubbletea for building TUIs and lipbgloss for styling. rich is a similar, awesome python library.

  • rlwrap

    A readline wrapper

    This can be as easy as wrapping a simple stdin/stdout loop with rlwrap, all the way to using full featured TUI libraries like bubbletea (golang), textual (python) or imtui (c++).

  • textual

    Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

    This can be as easy as wrapping a simple stdin/stdout loop with rlwrap, all the way to using full featured TUI libraries like bubbletea (golang), textual (python) or imtui (c++).

  • imtui

    ImTui: Immediate Mode Text-based User Interface C++ Library

    This can be as easy as wrapping a simple stdin/stdout loop with rlwrap, all the way to using full featured TUI libraries like bubbletea (golang), textual (python) or imtui (c++).

  • go-gh

    A Go module for interacting with gh and the GitHub API from the command line.

    Even simple shell script verbs provide great extension capability for users. For even bigger impact, provide a simple wrapper framework like gh does, that allows extensions written in go to easily call the main tool itself.

  • viper

    Go configuration with fangs

    configuration files. A few command line option libraries provide the option to use a configuration file alongside the command line parser (for example viper in golang). Otherwise, nothing is easier to use a JSON, YAML, or TOML parser to read in defaults and overrides.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts