# CLI

## Admin Management

### lc admins

Usage: `lc admins`\
Use this command to see all admins registered in the admin menu.

{% code title="Output" %}

```
> lc admins
------------------------------------------------------------------------------------------
On Duty     | Nick | Group | Group Tier | Global Identifier                               
------------------------------------------------------------------------------------------
YES (ID: 7) | dev7 | owner | 1          | license:c08777064740a5e3fd9aa6284978371442d73f68
------------------------------------------------------------------------------------------
```

{% endcode %}

### lc admin

Usage: `lc admin <target_id/identifier>`\
This command shows all the information about specified admin.

{% code title="Output" %}

```
> lc admin 7
--------------------------------
Admin Info

Nick: user
Global Identifier: license:c08777064740a5e3fd9aa6284978371442d73f68
Online: YES (ID: 7)

Admin ID: 785
Group: dev7
Group Tier: 1
Permissions Source: database
Permissions: [
    "all"
]
--------------------------------
Use command "lc set_group 7 <group_name>" to set the group of an admin.
```

{% endcode %}

### lc give\_access

Usage: `lc give_access <target_id> <group_name>`\
This command gives access to the admin menu to player with specific ID. Make sure that the group name is a correct Permission Group name.

{% code title="Output" %}

```
> lc give_access 7 owner2
Group not found
Use command "lc groups" to see groups.
Usage: "lc give_access <target_id> <group_name>"

> lc give_access 7 owner
Admin menu access granted to 7 with group owner
```

{% endcode %}

### lc set\_group

Usage: `lc set_group <target_id> <group_name>`\
Use this command to change already existing admin's group.

{% code title="Output" %}

```
> lc set_group 7 adminn
Group not found
Use command "lc groups" to see groups.

> lc set_group 7 admin
Group set successfully
```

{% endcode %}

## Permissions

### lc permissions

Usage: `lc permissions`\
Lists all available permissions.

{% code title="Output" expandable="true" %}

```
> lc permissions
------------------------------------------------
Name                 | Label                    
------------------------------------------------
spectate             | Spectate                 
summon_player        | Summon player            
kick                 | Kick                     
player_notes         | Player Notes             
revive               | Revive                   
teleport             | Teleport                 
give_item            | Give Item                
clear_inventory      | Clear inventory          
routing_buckets      | Routing Buckets          
ban_add              | Banning                  
ban_delete           | Unbanning                
licenses_edit        | Licenses edit            
trust_score_edit     | Editing trust score      
trust_score_reset    | Resetting trust score    
character_edit       | Character details edit   
accounts_edit        | Accounts edit            
vehicle_add          | Adding vehicles          
vehicle_delete       | Deleting vehicles        
announcements        | Announcements            
weather_management   | Weather Management       
start_stop_resources | Start/Stop Resources     
management           | Administrators management
set_health_armor     | Set Health/Armor         
player_names         | Player Names             
esp                  | ESP                      
noclip               | NoClip                   
freecam              | Freecam                  
invisibility         | Invisibility             
godmode              | GodMode                  
set_ped              | Set Ped                  
vehicle_spawn_delete | Spawn/Delete Vehicle     
vehicle_repair       | Repair Vehicle           
vehicle_change_plate | Change Plate             
vehicle_max_tuning   | Max Tuning               
------------------------------------------------
```

{% endcode %}

### lc groups

Usage: `lc groups`\
Lists all available Permission Groups.

```
> lc groups
--------------------------------------------------
Group Name | Tier | Discord Role ID | Non Editable
--------------------------------------------------
owner      | 1    | Not Set         | True        
admin      | 2    | Not Set         | True        
trial      | 10   | Not Set         | True        
--------------------------------------------------
```

### lc group

Usage: `lc group <group_name>`\
Displays group info.

{% code title="Output" expandable="true" %}

```
> lc group admin
--------------------------------
Group: admin
Tier: 2
Discord Role ID: Not Set
Permissions: [
    "spectate",
    "freecam",
    "invisibility",
    "summon_player",
    "godmode",
    "player_names",
    "esp",
    "noclip",
    "kick",
    "player_notes",
    "revive",
    "teleport",
    "give_item",
    "clear_inventory",
    "routing_buckets",
    "ban_add",
    "ban_delete",
    "licenses_edit",
    "trust_score_edit",
    "trust_score_reset",
    "character_edit",
    "accounts_edit",
    "vehicle_add",
    "vehicle_delete",
    "announcements",
    "weather_management",
    "management"
]
Non-editable: YES
--------------------------------
```

{% endcode %}

### lc create\_group

Usage: `lc create_group <group_name> <tier>`\
Creates Permission Group with given name and tier.

{% code title="Output" %}

```
> lc create_group custom_group 2
--------------------------------
Group created successfully
--------------------------------
Group: custom_group
Tier: 2
Discord Role ID: Not Set
Permissions: []
--------------------------------
Use command "lc add_group_permission custom_group <permission_name>" to add a permission to this group.
Use command "lc remove_group_permission custom_group <permission_name>" to remove a permission from this group.
Use command "lc permissions" to see all available permissions.
```

{% endcode %}

### lc delete\_group

Usage: `lc delete_group <group_name>`\
Deletes Permission Group with given name.

{% code title="Output" %}

```
> lc delete_group custom_group

Group deleted successfully
```

{% endcode %}

### lc add\_group\_permission

Usage: `lc add_group_permission <group_name> <permission_name>`\
Adds permission to a Permission Group with given name.

{% code title="Output" %}

```
> lc add_group_permission custom revive
--------------------------------
Permission added successfully
--------------------------------
Group: custom
Tier: 5
Discord Role ID: Not Set
Permissions: [
    "revive"
]
--------------------------------
```

{% endcode %}

### lc remove\_group\_permission

Usage: `lc remove_group_permission <group_name> <permission_name>`\
Removes permission from a Permission Group with given name.

{% code title="Output" %}

```
> lc remove_group_permission custom revive
--------------------------------
Permission removed successfully
--------------------------------
Group: custom
Tier: 5
Discord Role ID: Not Set
Permissions: []
--------------------------------
```

{% endcode %}
