Skip to content

CLI: Users

Commands to create, list, and delete the environment’s users, and to issue a link for setting a password. Most can be used only by environment administrators. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.

Command Description
hakocms-cli users anonymize Anonymize a deleted user (cannot be undone)
hakocms-cli users create Create a user in the environment
hakocms-cli users delete Delete a user (they are logged out immediately and removed from spaces)
hakocms-cli users list List the environment’s users (environment administrators only)
hakocms-cli users password-links create Issue a link for setting a password

Anonymize a deleted user (cannot be undone)

Anonymizes a deleted user.

Deleted users only. This cannot be undone.

ターミナルウィンドウ
hakocms-cli users anonymize [OPTIONS] <ID>
Flag or argument Description
<ID> ID
--confirm <NAME> To confirm, write the target’s name (when not running in a terminal)

Create a user in the environment.

Creates a user (environment administrators only).

If you omit the password, the user cannot log in with a password. Issue a link for setting a password and give it to the person.

ターミナルウィンドウ
hakocms-cli users create [OPTIONS]
Flag or argument Description
--email <TEXT> Email address (used to log in)
--is-admin[=true|false] Make the user an environment administrator (can create spaces)
--name <TEXT> Display name. If omitted, the part of the email address before @
--password-stdin If omitted, creates a user without a password (the person sets one with a password link). Read from the first line of standard input
--data <JSON> The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it

Delete a user (they are logged out immediately and removed from spaces)

Deletes a user.

The user is logged out immediately and their space memberships are removed. The user’s record remains.

ターミナルウィンドウ
hakocms-cli users delete [OPTIONS] <ID>
Flag or argument Description
<ID> ID
--confirm <NAME> To confirm, write the target’s name (when not running in a terminal)

List the environment’s users (environment administrators only)

ターミナルウィンドウ
hakocms-cli users list [OPTIONS]
Flag or argument Description
--deleted[=true|false] Include deleted users

Issue a link for setting a password.

Issues a link for setting a password (environment administrators only).

If you issue a new one, the previous link stops working. Give it to people who forgot their password or who were created without one.

ターミナルウィンドウ
hakocms-cli users password-links create [OPTIONS] --user <ID>
Flag or argument Description
--user <ID> User ID (see users list) (required)
--valid-hours <N> Validity period (hours, 1–168). If omitted, 24