Skip to main content
r/java icon

r/java

members
online


Straightforward rewards to help your business grow. Learn more about Spark Cash Plus from Capital One Business.
Image Straightforward rewards to help your business grow. Learn more about Spark Cash Plus from Capital One Business.



Clique v2.0.0 - Added color themes, extensible custom styles, and more polish Clique v2.0.0 - Added color themes, extensible custom styles, and more polish

About 2 months ago I shared Clique, my terminal styling library. I recently decided to continue working on a major update based on some ideas I had.

What's new:

Themes

Pre-built color schemes that just work:

Clique.registerTheme("catppuccin-mocha");
Clique.parser().print("[ctp_mauve]Styled with Catppuccin![/]");

Supports Catppuccin, Dracula, Gruvbox, Nord, and Tokyo Night. You can also build your own themes and distribute them as separate libraries.

Custom styles

Implement the AnsiCode interface to create custom styles and register them:

Clique.registerStyle("brand", myCustomAnsiCode);
Clique.parser().print("[brand]Styled with my custom code![/]");

Other improvements:

  • Better text wrapping in boxes

  • Extracted demos to a separate repo

  • Better docs and examples

Still zero dependencies, still on JitPack.

Links:

Any feedback is welcome. Thanks!