This project is a command-line interface (CLI) for managing a Keycloak instance. It is built using Java, Spring Boot, and Spring Shell. The application provides a set of commands to interact with the Keycloak Admin API, allowing users to manage realms, clients, roles, and users.
- Java 21
- Spring Boot 3.5.6
- Spring Shell 3.4.1
- Keycloak Admin Client 26.0.6
- Maven
- Java 21
- Maven
To build the project, run the following command:
mvn clean installThis will create a JAR file in the target directory.
To run the application, you need to provide the Keycloak connection details in a config.yaml file in the root of the project. The file should have the following content:
keycloak:
realm: "<your-realm>"
client-secret: "<your-client-secret>"Once the config.yaml file is created, you can run the application using the following command:
java -jar target/keymaster.jarThis will start the interactive shell, and you can use the available commands to manage your Keycloak instance.
delete-realm-roles-with-null-description: delete realm roles with null descriptionlist-users: users in selected realmlist-realms: list realmslist-client-scopes: list client scopeslist-realm-roles: list realm roleslist-clients: list all clientslist-client-roles: list client rolesshow-user: show user details by usernameshow-user-by-id: show user details by ID
The project uses the standard Java coding conventions.
The project is licensed under the Apache-2.0 license. Contributions are welcome.