Skip to content

Commit eb9fa59

Browse files
committed
docs: update with new command syntax
1 parent f50618e commit eb9fa59

File tree

1 file changed

+88
-31
lines changed

1 file changed

+88
-31
lines changed

README.md

Lines changed: 88 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,119 @@
1-
# Google Admin
1+
# Compiler Admin
22

3-
Administrative tasks in Compiler's Google Workspace.
3+
Automating Compiler's administrative tasks.
44

55
Built on top of [GAMADV-XTD3](https://github.com/taers232c/GAMADV-XTD3) and [GYB](https://github.com/GAM-team/got-your-back).
66

7-
## Initial setup
7+
**Note:** This tool can only be used by those with administrator access to Compiler's Google Workspace.
88

9-
Initial setup of a GAMADV-XTD3 project is required to provide necessary API access to the Google Workspace.
9+
## Usage
1010

11-
Follow the steps in the [GAMADV-XTD3 Wiki](https://github.com/taers232c/GAMADV-XTD3/wiki/#requirements), and read
12-
[Compiler's setup notes](https://docs.google.com/document/d/1UEwQzJZyJEkRs3PRwOi0-KXwBFne70am4Nk9-_qYItE/edit#heading=h.gbmx14gcpp2a)
13-
for more information.
11+
```bash
12+
$ compiler-admin -h
13+
usage: compiler-admin [-h] [-v] {info,init,create,convert,delete,offboard,restore,signout} ...
14+
15+
positional arguments:
16+
{info,init,create,convert,delete,offboard,restore,signout}
17+
info Print configuration and debugging information.
18+
init Initialize a new admin project. This command should be run once before any others.
19+
create Create a new user in the Compiler domain.
20+
convert Convert a user account to a new type.
21+
delete Delete a user account.
22+
offboard Offboard a user account.
23+
restore Restore an email backup from a prior offboarding.
24+
signout Signs a user out from all active sessions.
25+
26+
options:
27+
-h, --help show this help message and exit
28+
-v, --version show program's version number and exit
29+
```
1430
15-
Additionally, GYB is used for Gmail backup/restore. See the [GYB Wiki](https://github.com/GAM-team/got-your-back/wiki)
16-
for more information.
31+
## Getting started
1732
18-
**Note:** This setup can only be performed by those with administrator access to Compiler's Google Workspace.
33+
```bash
34+
git clone https://github.com/compilerla/compiler-admin.git
1935
20-
## Creating a user
36+
cd compiler-admin
37+
```
38+
39+
Now open in VS Code, and when prompted, reopen in the devcontainer.
2140
22-
**Usage:**
41+
## Initial setup
42+
43+
Initial setup of a GAMADV-XTD3 project and GYB project is required to provide necessary API access to the Google Workspace.
2344
2445
```bash
25-
bin/create.sh USER [OPTIONS]
46+
$ compiler-admin init -h
47+
usage: compiler-admin init [-h] username
48+
49+
positional arguments:
50+
username The user's account name, sans domain.
51+
52+
options:
53+
-h, --help show this help message and exit
2654
```
2755

28-
- `USER` is the username (sans domain) to create
29-
- `OPTIONS` is a list of options for [GAM user create](https://github.com/taers232c/GAMADV-XTD3/wiki/Users#create-a-user)
56+
The `init` commands follows the steps in the [GAMADV-XTD3 Wiki](https://github.com/taers232c/GAMADV-XTD3/wiki/#requirements).
3057

31-
## Convert a user
58+
Additionally, GYB is used for Gmail backup/restore. See the [GYB Wiki](https://github.com/GAM-team/got-your-back/wiki) for more information.
3259

33-
**Usage:**
60+
## Creating a user
3461

3562
```bash
36-
bin/convert.sh USER TYPE
63+
$ compiler-admin create -h
64+
usage: compiler-admin create [-h] username [OPTIONS]
65+
66+
positional arguments:
67+
username The user's account name, sans domain.
68+
69+
options:
70+
-h, --help show this help message and exit
3771
```
3872
39-
- `USER` is the username (sans domain) to convert
40-
- `TYPE` is either `STAFF` to convert the user to a staff member, or `PARTNER` to conver the user to a partner.
73+
Additional options are passed through to GAM, see more about [GAM user create](https://github.com/taers232c/GAMADV-XTD3/wiki/Users#create-a-user)
4174
42-
## Offboarding a user
75+
## Convert a user
76+
77+
```bash
78+
$ compiler-admin convert -h
79+
usage: compiler-admin convert [-h] username {contractor,partner,staff}
80+
81+
positional arguments:
82+
username A Compiler user account name, sans domain.
83+
{contractor,partner,staff}
84+
Target account type for this conversion.
85+
86+
options:
87+
-h, --help show this help message and exit
88+
```
4389
44-
**Usage:**
90+
## Offboarding a user
4591
4692
```bash
47-
bin/offboard.sh USER [ALIAS]
93+
$ compiler-admin offboard -h
94+
usage: compiler-admin offboard [-h] [--alias ALIAS] username
95+
96+
positional arguments:
97+
username A Compiler user account name, sans domain.
98+
99+
options:
100+
-h, --help show this help message and exit
101+
--alias ALIAS Account to assign username as an alias.
48102
```
49103
50-
- `USER` is the username (sans domain) to offboard
51-
- `ALIAS` is optional, and is a username (sans domain) that will get an alias
52-
added for the offboarded `USER`
104+
This script creates a local backup of `USER`'s inbox, see [Restore](#restore-an-email-backup)
53105

54-
Read more about the [offboarding process in Compiler's notes](https://docs.google.com/document/d/1UEwQzJZyJEkRs3PRwOi0-KXwBFne70am4Nk9-_qYItE/edit#heading=h.liqi1hwxykhs).
106+
## Restore an email backup
55107

56-
This script creates a local backup of `USER`'s inbox; a separate script can be run to archive this backup into the `[email protected]` account:
108+
Retore a backup from a prior [Offboarding](#offboarding-a-user) into the `[email protected]` account.
57109

58110
```bash
59-
bin/archive-gmail-backup.sh USER
60-
```
111+
$ compiler-admin restore -h
112+
usage: compiler-admin restore [-h] username
113+
114+
positional arguments:
115+
username The user's account name, sans domain.
61116
62-
- `USER` is the account in compiler.la (sans domain) with a local backup to archive
117+
options:
118+
-h, --help show this help message and exit
119+
```

0 commit comments

Comments
 (0)