Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ compiled into your binary.
| [`term`](https://pkg.go.dev/github.com/mittwald/cli-kit/term) | Terminal detection and size, the `--color` mode with `NO_COLOR` and `TERM=dumb`, visible text width, truncation, padding, word wrapping, OSC 8 hyperlinks and when to write them, 24-bit color detection, and untrusted output made safe to show |
| [`theme`](https://pkg.go.dev/github.com/mittwald/cli-kit/theme) | SGR styles, styles parsed from user settings ("fg=white:bg=#aa0000:bold"), regular expression matches painted into painted text, the color roles the other packages paint with, unified diffs painted the way git paints them, painted JSON, and a stable color per name |
| [`pick`](https://pkg.go.dev/github.com/mittwald/cli-kit/pick) | Interactive list selection with filtering, views and ranges, per-row and in-cell painting, an adjustable look, switches, and line-edited text and secret input |
| [`tui`](https://pkg.go.dev/github.com/mittwald/cli-kit/tui) | Full-screen terminal applications from widgets: lists and tables that filter as you type, text fields and editors, switches, radio buttons, check lists, forms, dialogs and menus, panels, tabs and pages, a key legend, a help screen and a status bar, with a headless driver for tests |
| [`live`](https://pkg.go.dev/github.com/mittwald/cli-kit/live) | Blocks of lines redrawn in place, detail/result output separation, and cursor and terminal restore on exit, panic and signals |
| [`progress`](https://pkg.go.dev/github.com/mittwald/cli-kit/progress) | A gradient progress bar with a stall countdown that steps aside for log lines |
| [`table`](https://pkg.go.dev/github.com/mittwald/cli-kit/table) | Tables in plain, framed and Markdown styles, and CSV/TSV records, with spreadsheet formulas escaped on request |
Expand All @@ -53,6 +54,7 @@ To see the interactive packages at work, run the demo program:
```shell
go run github.com/mittwald/cli-kit/examples/demo@latest --help
go run github.com/mittwald/cli-kit/examples/demo@latest pick
go run github.com/mittwald/cli-kit/examples/demo@latest tui
```

### Color and terminal
Expand Down
4 changes: 4 additions & 0 deletions examples/demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// - progress: a progress bar over fake steps, with log lines that step
// around it and a stalled step that counts down its timeout
// - live: a block of lines redrawn in place
// - tui: a full-screen ticket tool on made-up tickets: a filtered table,
// dialogs, a thread, a reply editor and the key legend (needs a
// terminal)
// - table: a table in every drawn style, or in the format --output names
// - theme: the color roles, a painted diff, painted JSON, a stable color
// per name and a style read from --style
Expand Down Expand Up @@ -63,6 +66,7 @@ func run() int {
newTableCommand(),
newThemeCommand(),
newNoticeCommand(),
newTUICommand(),
newTermCommand(links),
cobrax.NewVersionCommand(info),
)
Expand Down
Loading
Loading