r/java • u/Polixa12 • Mar 21 '26
Clique 3.1.0 – a lightweight CLI styling library for Java
Just released v3.1.0 of Clique, a dependency-free library for building prettier Java terminal apps.
What's new in 3.1.0:
- New
Framecomponent, a layout container that vertically stacks other Clique components inside a border - New
Treecomponent for displaying hierarchical data cleanly - Easier RGB ANSI code creation + emoji support in Box, Table, and Frame
- Cleaner API, deprecated some verbose method names and classes to instead support a config based approach
What the library does overall:
Clique lets you style terminal output using a simple markup syntax instead of writing raw ANSI codes:
Clique.parser().print("[red, bold]Error:[/] Something went wrong");
It also has tables, boxes, progress bars, and built-in themes (Catppuccin, Dracula, Gruvbox, Nord, Tokyo Night).
Available on Maven Central:
<dependency>
<groupId>io.github.kusoroadeolu</groupId>
<artifactId>clique-core</artifactId>
<version>3.1.0</version>
</dependency>
GitHub: https://github.com/kusoroadeolu/Clique
Happy to answer any questions!
51
Upvotes
7
u/thewiirocks Mar 21 '26
Neat! I might have to use this in one of my CLI tools.
😎👍
3
u/uniVocity Mar 21 '26
Beautiful! I built some internal utilities with the same goal in the past but this is something else entirely.
3
u/gnahraf Mar 21 '26
Very cool. I've used picocli before, but I think this may be way easier to use for richer TUIs. One thing picocli makes easy is generating
helpcommands (and help subcommands). Does this library offer something similar for "help"?3
u/AlfonsoDragonlord Mar 23 '26
Sorry if this is a rookie question to ask, but should this work with Spring Boot, particularly with Spring Shell 4.x for command definitions and parsing? It's my first TUI app I'm making a a student project, and your lib looks like a perfect fit for its customization!
2
u/v4ss42 Mar 22 '26
Does this work on Windows? Some other libraries in this space use JANSI for the low level terminal output, since it has native handlers that translate ANSI escape sequences on Windows (and some other non-ANSI-enabled terminal types).
2
u/v4ss42 Mar 22 '26 edited Mar 22 '26
Another question: any thought about adding more dynamic (but non-interactive) components, such as a live graph (see gping for an example of this)?
2
u/Vegetable-Idea-4044 Mar 22 '26
great work! gonna try it.
3
u/Mirko_ddd Mar 23 '26
I like this project a lot.