Ttcli release 1.0.0

Posted at — Oct 25, 2023
Taming Thymeleaf cover
Interested in learning more about Thymeleaf? Check out my book Taming Thymeleaf. The book combines all of my Thymeleaf knowledge into an easy to follow step-by-step guide.

I am happy to announce version 1.0.0 of ttcli. Ttcli is a command line tool to generate a Spring Boot with Thymeleaf project with support for live reloading.

The tool allows selecting various options when you create a project:

  1. The tool integrates with the API of https://start.spring.io/ to generate the base Spring Boot project. You select your group id, artifact id and project name just like on the website. Further, you can also select the Spring Boot version to use.

  2. After that, you can select either "NPM based" or "NPM based with Tailwind CSS support" for the live reloading.

  3. As a third step, select what frontend libraries you want to use. There is currently support for the following libraries:

    • AlpineJS - Lightweight reactive client-side scripting framework.

    • Htmx - JavaScript library that enables fast and seamless updates to web pages by allowing HTML content to be fetched and updated from the server without requiring a full page reload.

    • Shoelace - Web component library that provides a set of customizable, modern, and accessible UI components, such as buttons, forms, and modals, designed to be easily integrated into web applications and websites.

    • Bootstrap - Bootstrap is a popular open-source front-end framework for web development that provides pre-designed, responsive, and customizable CSS and JavaScript components.

  4. If you selected to use Tailwind CSS, then the CLI will allow you configure some plugins for Tailwind:

Here is a screencast of the tool in action:

ttcli 1.0.0

Once the project is generated, you can open it in your favorite editor and get started on your project. The generated HELP.md file contains some extra information on how to get started.

If you want to learn more about the tool itself, the source code is open source and can be viewed at https://github.com/wimdeblauwe/ttcli.

I’d like to thank the following projects:

  • Spring Shell - Framework for providing the CLI integration.

  • Graal VM - For native compilation of the binaries.

  • JReleaser - Streamlines the release process

Without those projects, this tool would probably not exist.

Conclusion

Start your next Spring Boot with Thymeleaf project quickly by using the ttcli command line tool. This tool is used in Taming Thymeleaf as well, and will be used a lot in my upcoming book Modern Frontends with Htmx.

If you have any questions or remarks, feel free to post a comment at GitHub discussions.

If you want to be notified in the future about new articles, as well as other interesting things I'm working on, join my mailing list!
I send emails quite infrequently, and will never share your email address with anyone else.