MCPcopy Index your code
hub / github.com/VladimirMarkelov/clui

github.com/VladimirMarkelov/clui @v.1.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v.1.2.1 ↗ · + Follow
606 symbols 1,880 edges 49 files 378 documented · 62% updated 4y agov.1.2.1 · 2020-01-19★ 69016 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CLUI

Command Line User Interface (Console UI inspired by TurboVision) with built-in theme support. Please see screenshots of working examples at the end of the README.

Installation

go get -u github.com/VladimirMarkelov/clui

Current version

The current version is 1.2.1. Please see details in changelog.

Applications that uses the library

  • Terminal FB2 reader(termfb2): https://github.com/VladimirMarkelov/termfb2

Documentation

The list of available controls

  • Window (Main control container - with maximize, window order and other window features)
  • Label (Horizontal and Vertical with basic color control tags)
  • Button (Simple push button control)
  • EditField (One line text edit control with basic clipboard control)
  • ListBox (string list control with vertical scroll)
  • TextView (ListBox-alike control with vertical and horizontal scroll, and wordwrap mode)
  • ProgressBar (Vertical and horizontal. The latter one supports custom text over control)
  • Frame (A decorative control that can be a container for other controls as well)
  • Scrollable frame
  • CheckBox (Simple check box)
  • Radio (Simple radio button. Useless alone - should be used along with RadioGroup)
  • RadioGroup (Non-visual control to manage a group of a few RadioButtons)
  • ConfirmationDialog (modal View to ask a user confirmation, button titles are custom)
  • SelectDialog (modal View to ask a user to select an item from the list - list can be ListBox or RadioGroup)
  • SelectEditDialog (modal View to ask a user to enter a value)
  • BarChart (Horizontal bar chart without scroll)
  • SparkChart (Show tabular data as a bar graph)
  • GridView (Table to show structured data - only virtual and readonly mode with scroll support)
  • FilePicker
  • LoginDialog - a simple authorization dialog with two fields: Username and Password
  • TextDisplay - a "virtual" text view control: it does not store any data, every time it needs to draw its line it requests the line from external source by line ID

Screenshots

The main demo (theme changing and radio group control)

Main Demo

The screencast of demo:

Library Demo

The library is in the very beginning but it can be used to create working utilities: below is the example of my Dilbert comix downloader:

Dilbert Downloader

License

CLUI is dual-licensed under MIT OR BSD-2-Clause

Extension points exported contracts — how you extend this code

Control (Interface)
Control is an interface that every visible control should implement [1 implementers]
control_intf.go

Core symbols most depended-on inside this repo

RealColor
called by 86
theme.go
Style
called by 84
control_intf.go
WindowManager
called by 51
composer.go
SetTextColor
called by 43
canvas.go
SetBackColor
called by 42
canvas.go
SetPack
called by 33
control_intf.go
SetTitle
called by 32
control_intf.go
PushAttributes
called by 30
canvas.go

Shape

Method 394
Function 159
Struct 39
TypeAlias 13
Interface 1

Languages

Go100%

Modules by API surface

base_control.go63 symbols
control_intf.go57 symbols
tableview.go49 symbols
canvas.go34 symbols
barchart.go31 symbols
textview.go29 symbols
composer.go28 symbols
window.go25 symbols
listbox.go25 symbols
sparkchart.go18 symbols
edit.go18 symbols
textdisplay.go17 symbols

For agents

$ claude mcp add clui \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page