Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. liner

liner

MITGo

A pure Go command line editor with history and cross-platform support, inspired by linenoise.

GitHubGitHub
1.1k stars134 forks0 contributors

What is liner?

Liner is a command line editor library written in pure Go that provides line editing capabilities with history for terminal applications. It enables developers to add rich command-line interfaces to their Go applications with consistent behavior across different platforms, including Unix-like systems and Windows.

Target Audience

Go developers building cross-platform command-line applications that require interactive user input with line editing and history features, such as REPLs, shells, or configuration tools.

Value Proposition

Developers choose Liner for its pure Go implementation without cgo, ensuring easy cross-compilation and consistent cross-platform behavior by intentionally omitting platform-specific features, unlike alternatives that may vary by OS.

Overview

Pure Go line editor with history, inspired by linenoise

Use Cases

Best For

  • Adding interactive command-line interfaces with history and tab completion to Go applications
  • Building cross-platform terminal tools that require consistent line editing behavior on Unix and Windows
  • Creating REPLs (Read-Eval-Print Loops) in Go with VT100-compatible editing commands
  • Implementing command history with search and navigation in CLI applications
  • Developing Go-based shells or configuration wizards with smart completion functionality
  • Ensuring uniform terminal input handling across different operating systems without platform-specific dependencies

Not Ideal For

  • Applications requiring native platform-specific terminal behaviors (e.g., using Ctrl-Z for suspend on Unix)
  • Projects needing multi-line editing, syntax highlighting, or advanced terminal UI beyond simple line input
  • Developers seeking a drop-in solution with extensive pre-built widgets or themes for rich CLI interfaces

Pros & Cons

Pros

Cross-Platform Consistency

Liner intentionally omits platform-specific features like Ctrl-Z handling to ensure identical behavior on Unix and Windows, as stated in its philosophy.

Pure Go Implementation

Written without cgo, it enables easy cross-compilation and avoids external dependencies, simplifying deployment across different operating systems.

Rich Editing Commands

Supports a comprehensive set of VT100-compatible keystrokes for cursor movement, word navigation, and text manipulation, detailed in the README's table.

Smart History Management

Includes history with search, navigation, and customizable tab completion via SetCompleter, enhancing interactivity for CLI applications.

Cons

Omitted Platform Features

For consistency, it ignores useful native shortcuts like Ctrl-Z on Unix, which might frustrate users expecting familiar terminal behavior.

Limited Functionality

Focused solely on line editing without built-in support for multi-line input, syntax highlighting, or advanced terminal UI elements.

Manual History Setup

Developers must handle history file reading and writing manually, as shown in the example code, adding boilerplate and complexity.

Frequently Asked Questions

Quick Stats

Stars1,094
Forks134
Contributors0
Open Issues13
Last commit2 years ago
CreatedSince 2012

Tags

#terminal-editor#history-management#go-package#go-library#vt100#cross-platform#command-line#cli-tools

Built With

G
Go

Included in

Go169.1k
Auto-fetched 7 hours ago

Related Projects

cobracobra

A Commander for modern Go CLI interactions

Stars43,786
Forks3,132
Last commit3 days ago
clicli

A declarative, simple, fast, and fun package for building command line tools in Go

Stars23,997
Forks1,773
Last commit10 days ago
elvishelvish

Powerful scripting language & versatile interactive shell

Stars6,288
Forks324
Last commit28 days ago
kingpinkingpin

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

Stars3,563
Forks279
Last commit12 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub