Acolyte is a command-line tool designed to boost your productivity in Spring Boot projects by automating the creation of common boilerplate code. It helps maintain a clean and standardized package structure, making your development process faster, more consistent, and less error-prone.
It supports generating entities, services, repositories, controllers, views, configuration files, and more โ all with a single command.
Generates a JPA entity class with a basic structure.
java acolyte make:entity <Entity-Name>
# Example:
java acolyte make:entity UserCreates a Thymeleaf view file with the specified name.
java acolyte make:view <view-name>
# Example:
java acolyte make:view user-listGenerates a Spring controller class. You can optionally scaffold common REST methods using --resource.
java acolyte make:controller <Controller-Name> [--resource <methods>]
# Examples:
java acolyte make:controller UserController
java acolyte make:controller UserController --resource
java acolyte make:controller UserController --resource index save destroyCreates a Data Transfer Object or plain Java class.
java acolyte make:dto <Dto-Name>
# Example:
java acolyte make:dto UserDtoGenerates a service class and optionally an interface following the service pattern.
java acolyte make:service <Service-Name>
# Example:
java acolyte make:service UserServiceCreates a JPA repository interface for a given entity.
java acolyte make:repository <Entity-Name>
# OR
java acolyte make:repo <Entity-Name>
# Example:
java acolyte make:repo UserCreates a configuration class annotated with @Configuration.
java acolyte make:configuration <Config-Class-Name>
# OR
java acolyte make:config <Config-Class-Name>
# Example:
java acolyte make:config WebConfigCreates a custom validator class and links it to a DTO for form validation.
java acolyte make:validator <Validator-Class-Name> --dto=<Dto-Class-Name>
# Example:
java acolyte make:validator UserValidator --dto=UserDtoGenerates an entity listener for lifecycle callbacks.
java acolyte make:listener <Listener-Class-Name>
# Example:
java acolyte make:listener UserListenerUsage in Entity:
@EntityListeners(UserListener.class)
public class User {
// fields
}Generates a reusable Thymeleaf HTML fragment/component.
java acolyte make:fragment <fragment-path>
# OR
java acolyte make:component <component-path>
# Example:
java acolyte make:fragment admin/layout/header
java acolyte make:component admin/layout/headerUsage in Thymeleaf:
<th:block th:replace="~{/admin/layout/header :: header}"></th:block>- โ Eliminate repetitive code writing
- โ Maintain consistent folder structure
- โ Focus on business logic, not scaffolding
- โ Easy integration with any Spring Boot project
- โ Supports modular architecture and reusability
Here are the upcoming features planned for Acolyte CLI to make it even more powerful and developer-friendly:
- make:model โ Generate Entity, DTO, Repository, Service, and Controller in one shot.
- make:test โ Create test classes for services, controllers, or repositories using JUnit.
- make:request โ Generate form request classes with built-in validation annotations.
- make:enum โ Create a type-safe Enum with custom values.
- make:interceptor โ Scaffold Spring's HTTP interceptor for custom middleware.
- make:resource โ Generate a standardized API response wrapper class.
- make:scheduler โ Create a class with a
@Scheduledjob using cron expression. - make:runner โ Create a class that runs logic on app startup via
CommandLineRunner. - make:exceptionhandler โ Scaffold a global exception handler with
@ControllerAdvice. - make:configprops โ Generate
@ConfigurationPropertiesclass for binding custom configs. - wizard โ Interactive CLI flow to build modules step-by-step.
- custom templates โ Allow users to plug in their own code templates.
- i18n support โ Generate language properties files for multi-language apps.
- thymeleaf-page โ Scaffold Thymeleaf pages like forms or lists with mock data bindings.
Feel free to contribute or suggest features to make Acolyte even more powerful!
