LICENSE: - Added GNU General Public License v3.0 - Updated README.org to reflect GPL 3.0 ROADMAP: - Complete rewrite to reflect actual project state - Removed croatoan/ncurses/Yoga FFI references - Marked all 11 existing versions DONE - Added v0.12.0-0.14.0 for new features (detection, pipeline, mouse) DETECTION (v0.12.0): - detect-backend: auto-detect modern vs simple backend - detect-backend-by-env: check COLORTERM env var - detect-backend-by-tty: check interactive-stream-p - detect-backend-by-da1: query terminal via ESC[c (best-effort) - *detected-backend* cache for zero-cost subsequent calls - Added detection.lisp to ASDF and package exports - Added 2 new tests (360 total, all passing) - demo.lisp updated to use detect-backend ORG BACKPORT (pre-existing fixes synced): - dialog.org: render-dialog/render-toast fixes, class initforms - scrollbox-tabbar.org: background-element -> bright-black, remove duplicate render - select.org: remove duplicate render export - text-input.org: remove duplicate %split-string, undo overflow fix - layout-engine.org: quoted-literal -> list constructors, normalize-box rewrite - mouse.org: add missing exports, fix test
2.7 KiB
Pure CL terminal UI framework. No ncurses, no FFI, no external dependencies.
```lisp (ql:quickload :cl-tty) ```
## Quick start
```lisp ;; Create a modern terminal backend (let ((backend (make-instance 'cl-tty.backend:modern-backend))) (cl-tty.backend:initialize-backend backend) ;; Backend is ready — write text, draw boxes, handle input (cl-tty.backend:shutdown-backend backend)) ```
## Architecture
Two backends, one protocol:
- modern-backend — truecolor 24-bit, OSC 8 hyperlinks, DECICM sync, SGR mouse, kitty keyboard, bold/italic/underline, box-drawing chars
- simple-backend — ASCII art, no color, universal compatibility
Everything is pure escape sequences (no curses, no terminfo, no FFI).
## Components
| Component | What it does | Version |
|---|---|---|
| Box | Bordered container with background, title | v0.2.0 |
| Text | Styled text with word-wrap, spans | v0.2.0 |
| ScrollBox | Scrollable viewport with scrollbars | v0.6.0 |
| TabBar | Horizontal tab navigation | v0.6.0 |
| Select | Dropdown with fuzzy filter, category headers | v0.7.0 |
| TextInput | Single-line text input with readline keybindings | v0.5.0 |
| TextArea | Multi-line input with undo/redo, selection | v0.5.0 |
| Markdown | Renders markdown with syntax highlighting + diffs | v0.8.0 |
| Dialog | Modal overlays with stack management | v0.9.0 |
| Toast | Transient notifications (info/success/warning/error) | v0.9.0 |
| Mouse | Event handlers, hit-testing, text selection | v0.10.0 |
| Slot | Plugin system — named slots for extensible UI | v0.11.0 |
## Backend features
| Feature | modern | simple |
|---|---|---|
| Truecolor (24-bit) | Yes | No |
| Bold/italic | Yes | No |
| OSC 8 hyperlinks | Yes | No |
| DECICM sync | Yes | No |
| SGR mouse | Yes | No |
| Kitty keyboard | Yes | No |
| Box drawing chars | Unicode | ASCII |
| Pipe-safe | No | Yes |
## Development
```bash
sbcl –script run-all-tests.lisp
emacs –batch –eval "(progn (require 'org) (find-file \"org/FILE.org\") (org-babel-tangle) (kill-buffer))" ```
Literate programming: `.org` files in `org/` are the source of truth. `.lisp` files are generated by tangling.
## License
GNU General Public License v3.0