Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boileaum/gitlab-users

A CLI tool to manage GitLab users.
https://github.com/boileaum/gitlab-users

cli gitlab python user-management

Last synced: 3 months ago
JSON representation

A CLI tool to manage GitLab users.

Awesome Lists containing this project

README

        

# gitlab-users

A simple command line interface to manage GitLab user accounts, based on [python-gitlab](https://github.com/python-gitlab/python-gitlab).

## Installation

* Install the package on your system

```sh
pip install gitlab-users
```

* Edit the `~/.python-gitlab.cfg` following the [python-gitlab package instructions](http://python-gitlab.readthedocs.io/en/stable/cli.html) to setup the GitLab instance to connect with (present version only targets default instance).

## Usage

* Get help

```sh
gitlab-users -h
```

* List all users with their email

```sh
gitlab-users
```

* List emails from a given group

```sh
gitlab-users -g a_group --email-only
```

* Create multiple user accounts at once from a csv file

```sh
gitlab-users --create-from example.csv
```

where `example.csv` contains

```csv
# username, name, email, [organization], [location], [group], [access_level]
wayne,Bruce Wayne,[email protected],Wayne Entreprises,Gotham City,Board,owner
kent,Clark Kent,[email protected],,Smallville
```

* List unused accounts (never sign-in or last connection is older than 1 year)

```sh
gitlab-users --unused
```