Skip to content

ncarlier/kcusers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Keycloak user management CLI

Simple CLI used to do some user management tasks on a Keycloak instance.

Installation

Run the following command:

$ go install github.com/ncarlier/kcusers@latest

Or download the binary regarding your architecture:

$ curl -sf https://gobinaries.com/ncarlier/kcusers | sh

Build

make

Geting started

Create the configuration file:

./kcusers init-config -f config.toml

Customize the configuration file:

[log]
level = "info"
format = "text"

[keycloak]
authority = "http://loclahost:8080"
realm = "test"
client_id = "xxx"
client_secret = "yyy"

Play with the CLI

# Get CLI usage
./kcusers -h
# Get user
./kcusers get-user -uid ffcc46cc-f66d-4df8-a623-a6d54ff242df
# Delete users
./kcusers delete-users -f users_to_delete.txt --dry-run --concurent 5

License

The MIT License (MIT)

See LICENSE to see the full text.