Swap map with each
[akkoma] / docs / administration / CLI_tasks / user.md
1 # Managing users
2
3 Every command should be ran with a prefix, in case of OTP releases it is `./bin/pleroma_ctl user` and in case of source installs it's `mix pleroma.user`.
4
5 ## Create a user
6 ```sh
7 $PREFIX new <nickname> <email> [<options>]
8 ```
9
10 ### Options
11 - `--name <name>` - the user's display name
12 - `--bio <bio>` - the user's bio
13 - `--password <password>` - the user's password
14 - `--moderator`/`--no-moderator` - whether the user should be a moderator
15 - `--admin`/`--no-admin` - whether the user should be an admin
16 - `-y`, `--assume-yes`/`--no-assume-yes` - whether to assume yes to all questions
17
18 ## Generate an invite link
19 ```sh
20 $PREFIX invite [<options>]
21 ```
22
23 ### Options
24 - `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
25 - `--max-use NUMBER` - maximum numbers of token uses
26
27 ## List generated invites
28 ```sh
29 $PREFIX invites
30 ```
31
32 ## Revoke invite
33 ```sh
34 $PREFIX revoke_invite <token_or_id>
35 ```
36
37 ## Delete a user
38 ```sh
39 $PREFIX rm <nickname>
40 ```
41
42 ## Delete user's posts and interactions
43 ```sh
44 $PREFIX delete_activities <nickname>
45 ```
46
47 ## Sign user out from all applications (delete user's OAuth tokens and authorizations)
48 ```sh
49 $PREFIX sign_out <nickname>
50 ```
51
52 ## Deactivate or activate a user
53 ```sh
54 $PREFIX toggle_activated <nickname>
55 ```
56
57 ## Unsubscribe local users from a user and deactivate the user
58 ```sh
59 $PREFIX unsubscribe NICKNAME
60 ```
61
62 ## Unsubscribe local users from an instance and deactivate all accounts on it
63 ```sh
64 $PREFIX unsubscribe_all_from_instance <instance>
65 ```
66
67 ## Create a password reset link for user
68 ```sh
69 $PREFIX reset_password <nickname>
70 ```
71
72 ## Set the value of the given user's settings
73 ```sh
74 $PREFIX set <nickname> [<options>]
75 ```
76 ### Options
77 - `--locked`/`--no-locked` - whether the user should be locked
78 - `--moderator`/`--no-moderator` - whether the user should be a moderator
79 - `--admin`/`--no-admin` - whether the user should be an admin
80
81 ## Add tags to a user
82 ```sh
83 $PREFIX tag <nickname> <tags>
84 ```
85
86 ## Delete tags from a user
87 ```sh
88 $PREFIX untag <nickname> <tags>
89 ```
90
91 ## Toggle confirmation status of the user
92 ```sh
93 $PREFIX toggle_confirmed <nickname>
94 ```