Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[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 ## List local users
19 ```sh
20 $PREFIX list
21 ```
22
23 ## Generate an invite link
24 ```sh
25 $PREFIX invite [<options>]
26 ```
27
28 ### Options
29 - `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
30 - `--max-use NUMBER` - maximum numbers of token uses
31
32 ## List generated invites
33 ```sh
34 $PREFIX invites
35 ```
36
37 ## Revoke invite
38 ```sh
39 $PREFIX revoke_invite <token_or_id>
40 ```
41
42 ## Delete a user
43 ```sh
44 $PREFIX rm <nickname>
45 ```
46
47 ## Delete user's posts and interactions
48 ```sh
49 $PREFIX delete_activities <nickname>
50 ```
51
52 ## Sign user out from all applications (delete user's OAuth tokens and authorizations)
53 ```sh
54 $PREFIX sign_out <nickname>
55 ```
56
57 ## Deactivate or activate a user
58 ```sh
59 $PREFIX toggle_activated <nickname>
60 ```
61
62 ## Unsubscribe local users from a user and deactivate the user
63 ```sh
64 $PREFIX unsubscribe NICKNAME
65 ```
66
67 ## Unsubscribe local users from an instance and deactivate all accounts on it
68 ```sh
69 $PREFIX unsubscribe_all_from_instance <instance>
70 ```
71
72 ## Create a password reset link for user
73 ```sh
74 $PREFIX reset_password <nickname>
75 ```
76
77 ## Set the value of the given user's settings
78 ```sh
79 $PREFIX set <nickname> [<options>]
80 ```
81 ### Options
82 - `--locked`/`--no-locked` - whether the user should be locked
83 - `--moderator`/`--no-moderator` - whether the user should be a moderator
84 - `--admin`/`--no-admin` - whether the user should be an admin
85
86 ## Add tags to a user
87 ```sh
88 $PREFIX tag <nickname> <tags>
89 ```
90
91 ## Delete tags from a user
92 ```sh
93 $PREFIX untag <nickname> <tags>
94 ```
95
96 ## Toggle confirmation status of the user
97 ```sh
98 $PREFIX toggle_confirmed <nickname>
99 ```