users
๐ก
All users commands require a connection to a Relay database.
This must be configured when running these commands.
add
Add a new user to the Database, generates a password, and creates a Sub Node for them.
Command
add <USERNAME>: Add a new User with the specified username
Usage Scenarios
Add a User and Sub Node for a Bunny instance
Command
users add my-bunnyOutput
โโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Username โ Password โ Collection ID โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ my-bunny โ 2WgSShhPps7plNnt โ 0194ac94-a025-7f7e-8ec1-a26f29c73bdf โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโreset-password
Generate a new password for an existing user.
Command
reset-password <USERNAME>: Generate a new password for the User with the specified username
Usage Scenarios
Add a User and Sub Node for a Bunny instance
Command
users reset-password my-bunnyOutput
โโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ Username โ Password โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ my-bunny โ 2WgSShhPps7plNnt โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโlist
List all usernames in the Database.
Command
list: List all usernames in the database
Usage Scenarios
List all usernames in the database
Command
users listOutput
โญโUsersโโโโโโโโโโฎ
โ my-bunny โ
โ my-sub-relay โ
โ another-bunny โ
โฐโโโโโโโโโโโโโโโโฏlist-subnodes
List all subnodes associated with a username in the Database.
Command
list-subnodes <USERNAME>: List all subnodes associated with a username in the Database
Usage Scenarios
List all subnodes associated with a username in the Database
Command
users list-subnodes my-bunnyOutput
โญโSubNodes for User: my-bunnyโโโโโโโโโโโฎ
โ 01954c60-8d3f-7816-b81a-f270f44bc79b โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏadd-subnode
Create a new subnode associated with an existing user.
Command
add-subnode <USERNAME> [OPTIONS...]: Create a new subnode associated with an existing user
Options
--yes,-y: Automatically skip the final confirmation, responding withy.
Usage Scenarios
Create a new subnode associated with an existing user
Command
users add-subnode my-bunnyOutput
โโ Summary โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Selected user: my-bunny
A new subnode will be created for this user.
Do you want to proceed? [y/n] (n): y
โโ Results โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Username โ New Collection ID โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ my-bunny โ 01954d72-4e35-7ade-a727-63d5e113e901 โ
โฐโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏremove-subnodes
Remove one or more subnodes associated with an existing user.
Command
remove-subnodes <USERNAME> [<SUBNODE IDS>...] [OPTIONS...]: Remove one or more subnodes associated with an existing user
Options
--yes,-y: Automatically skip the final confirmation, responding withy.--all: Remove ALL subnodes associated with the user, instead of specifying IDs.--empty-user <keep|remove>: explicitly specify whether tokeeporremovea User who has had all their subnodes removed. If omitted, the cli will prompt interactively in the case of an empty user.
Usage Scenarios
Remove a single subnode from a User with more than one subnode.
Command
users remove-subnodes my-bunny 01954d72-4e35-7ade-a727-63d5e113e901Output
โโ Summary โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Selected user: my-bunny
โญโSubNodes to removeโโโโโโโโโโโโโโโโโโโโฎ
โ 01954d72-4e35-7ade-a727-63d5e113e901 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Do you want to proceed? [y/n] (n): y
โโ Results โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญโRemoved SubNodes for User: my-bunnyโโโฎ
โ 01954d72-4e35-7ade-a727-63d5e113e901 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏRemove two subnodes from a User with only two subnodes, but keep the user afterwards
Command
users remove-subnodes my-bunny -y --empty-user keep 01954c60-8d3f-7816-b81a-f270f44bc79b 01954d7b-dadf-77a3-9e78-0d83dd3f4c6eNote that the options need to go before the list of subnode IDs, otherwise the CLI canโt differentiate between what is a cli argument and what is intended to be a subnode ID.
Output
โโ Summary โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Selected user: my-bunny
โญโSubNodes to removeโโโโโโโโโโโโโโโโโโโโฎ
โ 01954d7b-dadf-77a3-9e78-0d83dd3f4c6e โ
โ 01954c60-8d3f-7816-b81a-f270f44bc79b โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
The Empty User will not be removed
โโ Results โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญโRemoved SubNodes for User: my-bunnyโโโฎ
โ 01954d7b-dadf-77a3-9e78-0d83dd3f4c6e โ
โ 01954c60-8d3f-7816-b81a-f270f44bc79b โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โน The Empty User was not removed.Delete all subnodes and the associated user
Note that this can also be used to delete an empty user with no sub nodes.
Command
users remove-subnodes my-bunny --all --empty-user remove -yOutput
โโ Summary โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Selected user: my-bunny
ALL SubNodes will be removed
The Empty User will be removed
โโ Results โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โน The Empty User was removed.