user
user create
Create a new user.
Arguments
USERNAME
Username of the user to create.
Type: text
Required: ✅
Options
--password
<PASSWORD>
Password for user.
Type: text
--email
<EMAIL>
Email for user.
Type: text
--realname
<REALNAME>
Real name of user. Enclose multiple names in quotes.
Type: text
--comment
<COMMENT>
Comment for user.
Type: text
user delete
Delete a user.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
Options
--force
Force deletion without confirmation.
Type: boolean
(flag)
Default: False
user get
Get information about a specific user.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
user get-current
Get information about the currently authenticated user.
user get-current-permissions
Get permissions for the currently authenticated user.
Options
--scope
<SCOPE>
Scope to get permissions for.
Type: text
--relative
Show permissions relative to scope.
Type: boolean
(flag)
Default: False
user list
List all users in the system.
Options
--query
<QUERY>
Query parameters to filter the results.
See harborapi docs for more information.
Type: text
--sort
<SORT>
Sort by field.
Type: choice
Choices: id
, username
, name
--page
<PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1
--page-size
<PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10
--limit
<LIMIT>
Maximum number of results to fetch.
Type: integer
user search
Search for users by username.
Arguments
USERNAME
Username or partial username to search for.
Type: text
Required: ✅
Options
--page
<PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1
--page-size
<PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10
--limit
<LIMIT>
Maximum number of results to fetch.
Type: integer
user set-admin
Sets a user as admin.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
user set-cli-secret
Set a user's CLI secret.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
Options
--secret
<SECRET>
CLI secret to set for user. If omitted, a prompt will be shown.
Type: text
Required: ✅
user set-password
Set a user's password.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
Options
--old-password
<OLD_PASSWORD>
Old password for user. Prompted if not provided.
Type: text
Required: ✅
--new-password
<NEW_PASSWORD>
New password for user. Prompted if not provided.
Type: text
Required: ✅
user unset-admin
Unsets a user as admin.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
user update
Update an existing user.
Arguments
USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:'
to specify an ID.
Type: text
Required: ✅
Options
--email
<EMAIL>
New email for the user.
Type: text
--realname
<REALNAME>
New real name for the user.
Type: text
--comment
<COMMENT>
New comment for the user.
Type: text