# peterh/liner

Pure Go line editor with history, inspired by linenoise

Repository: https://github.com/peterh/liner
Canonical: https://ross.abutalabs.com/products/liner
Language: Go
License: MIT
License Family: permissive
Last push: 2023-06-23T14:09:49+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5131, "days_push": 1167, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1098, forks 135 (observed 2026-08-28T04:03:34.875972+00:00)

## What it is
Liner is a pure Go command-line editor library with history, tab completion, and Emacs-style keybindings, inspired by linenoise. It avoids cgo for easy cross-compilation and works on both Unix-like VT100 terminals and Windows.

## Use cases
- add readline-style input to a Go CLI
- prompt for user input with command history in a terminal app
- implement tab completion in a REPL
- build a cross-platform interactive shell in Go
- replace cgo-based readline with a pure Go line editor

## When to choose
- you need a pure Go line editor without cgo for easy cross-compilation
- you want history, reverse search, and completion in a Go CLI
- you need consistent behavior across Unix and Windows terminals

## When to avoid
- you need advanced features like syntax highlighting or multi-line editing offered by newer alternatives
- your project is not written in Go
- you need full readline compatibility or complex keybinding customization

## Facets
- artifact type: library
- maturity: maintenance
- function: cli, developer-tools
- domain: developer-tools, cross-platform
- platform: go, windows, cli, cross-platform
- tags: line-editor, readline, linenoise, terminal-input, history, tab-completion, pure-go, command-line, linux, macos

## Member repositories
- peterh/liner (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:34.875972+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:46:20.031194+00:00, confidence not recorded.
  - readme: https://github.com/peterh/liner (fetched 2026-08-28T04:03:34.875972+00:00, sha befb79553a85)
- Data as of 2026-08-30T08:39:29.467469+00:00.
