feat: golang-cli v1.0.0 — generic command-tree CLI library

Reusable, generics-based CLI extracted from vpp-evpn's cmd/evpnc:
a declarative command tree (Node[C]) from which dispatch, '?'-help and
TAB-completion are derived, an interactive Shell[C], dynamic slot
resolvers (context-dependent via captured args), text-or-JSON output
(Emit), and color helpers (Paint/Label/KV). Builds on Linux and OpenBSD
(readline termios override). Includes a self-contained example and a
design proposal under docs/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 21:48:48 +02:00
commit d63ffd6a3a
14 changed files with 1670 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
module git.ipng.ch/ipng/golang-cli
go 1.25.0
require (
github.com/chzyer/readline v1.5.1
golang.org/x/sys v0.45.0
)