So what's Clique?
If you missed my older posts, Clique is essentially a zero-dependency CLI styling library for Java that is GraalVM compatible, no-color.org compliant.
What's new in 4.0.3:
You can now build a table straight from data you already have
SequencedCollection<List<String>> rows = List.of(
List.of("Name", "Age", "Class"),
List.of("John", "25", "Class A"),
List.of("Doe", "26", "Class B")
);
Clique.table(TableType.ASCII)
.fromRows(rows)
.render();This also applies to column based data
SequencedMap<String, List<String>> map = new LinkedHashMap<>();
map.put("Name", List.of("John", "Doe"));
map.put("Age", List.of("25", "26"));
Clique.table(TableType.ASCII)
.fromColumns(map)
.render();These were mainly added to simplify creating Tables from existing collections
StyleContext#fromTheme - scope a registered theme's colors into a StyleContext in one call
StyleContext ctx = StyleContext.fromTheme("catppuccin-mocha");Other minor changes:
I've also deprecated the Collection-based headers()/row() overloads in favor of Java 21 SequencedCollection; reason being that Collection doesn't guarantee order, which could silently mess up your column/row order and was essentially a footgun. Worth migrating if that bothers you.
GitHub:
Demos: