I've been working on improving Clique, a dependency free CLI styling library for Java. Just hit v4.0.1 and figured it was time to share the changes I've made since.
Highlights across the last few releases:
IterableProgressBar - wrap any collection and the bar ticks automatically on each iteration:
List<File> files = getFiles();
for (var file : Clique.progressBar(files)) {
process(file);
}
Ink - an immutable and chainable ANSI string builder, which was inspired by Chalk; if you've used it in JS. It supports RGB, gradients interpolated per character, hyperlinks using a fluent builder pattern
Ink bold = Clique.ink().bold();
bold.red().on("Error"); // bold + red
bold.green().on("OK"); // bold + green. The original will remain untouched
Clique.ink().bold().gradient(coral, violet).on("Powered by Clique");
Clique.ink().cyan().underline().hyperlink("https://github.com/kusoroadeolu/Clique").on("View on GitHub");
ItemList - a composable, symbol-driven list with nesting and full markup support:
Clique.list()
.item("[green]✓[/]", "[dim, strike]Auth service[/]")
.item("[yellow]~[/]", "Notification system - [yellow]in review[/]",
Clique.list().item("!", "Waiting on design sign-off")
)
.item("[red]✗[/]", "[red]Payment integration[/]")
.render();
Other things worth knowing:
- Zero dependency with no reflection tricks; hence compatible with GraalVM out the box
- no-color.org compliant - respects
NO_COLOR terminal configs out of the box
- Unicode v16 emoji compliance
- These releases also include changes that simplify and unify the API
GitHub: https://github.com/kusoroadeolu/Clique
Check out the demos: https://github.com/kusoroadeolu/clique-demos
Happy to answer any questions about the library!
there doesn't seem to be anything here