Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncarlier/kcusers
Simple user management CLI for Keycloak.
https://github.com/ncarlier/kcusers
cli keycloak user-management
Last synced: about 2 months ago
JSON representation
Simple user management CLI for Keycloak.
- Host: GitHub
- URL: https://github.com/ncarlier/kcusers
- Owner: ncarlier
- License: mit
- Created: 2024-01-23T09:58:34.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-09-03T15:21:05.000Z (4 months ago)
- Last Synced: 2024-10-28T05:51:42.681Z (2 months ago)
- Topics: cli, keycloak, user-management
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Keycloak user management CLI
Simple CLI used to do some user management tasks on a Keycloak instance.
## Installation
Run the following command:
```bash
$ go install github.com/ncarlier/kcusers@latest
```**Or** download the binary regarding your architecture:
```bash
$ curl -sf https://gobinaries.com/ncarlier/kcusers | sh
```## Build
```bash
make
```## Geting started
Create the configuration file:
```bash
./kcusers init-config -f config.toml
```Customize the configuration file:
```toml
[log]
level = "info"
format = "text"[keycloak]
authority = "http://loclahost:8080"
realm = "test"
client_id = "xxx"
client_secret = "yyy"
timeout = "5s"
```Play with the CLI
```bash
# Get CLI usage
./kcusers -h
# Count users
./kcusers count-users
# 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
# Count client's sessions
./kcusers count-sessions -cid 2ca2c534-59e9-4039-94fb-562072cd1c11
```## License
The MIT License (MIT)
See [LICENSE](./LICENSE) to see the full text.
---