Skip to content

Manage Chronicle users with Cratis CLI

Users are human principals who can log in to Chronicle using a username and password. They are distinct from applications, which authenticate with client credentials. Manage users when you need to grant or revoke interactive access to the Chronicle server.

Listing, adding and removing users needs a Chronicle administrator. Sign in as one first, then run the command:

Terminal window
cratis chronicle login admin
cratis chronicle users list

An application’s client credentials, including the development client, are refused. Chronicle then answers with this hint:

This command needs a Chronicle administrator. Run 'cratis chronicle login <administrator-username>' to sign in as one.

Lists all users registered on the Chronicle server.

Terminal window
cratis chronicle users list

List all users:

Terminal window
cratis chronicle users list

List in plain format:

Terminal window
cratis chronicle users list --output plain

Creates a new user account with the specified username, email address, and password.

Terminal window
cratis chronicle users add <USERNAME> <EMAIL> <PASSWORD>
Argument Description
USERNAME The login name for the new user.
EMAIL The email address for the new user.
PASSWORD The initial password for the new user.

Add a new user:

Terminal window
cratis chronicle users add alice alice@example.com initialpassword

A variable can keep the literal password out of the command recorded in shell history, but shell expansion still places the password in the process arguments, where process inspection or argument logging may expose it:

Terminal window
cratis chronicle users add alice alice@example.com "$INITIAL_PASSWORD"

Removes the user account registration from Chronicle. This operation is irreversible. Do not treat removal as a guarantee that all previously issued tokens are immediately revoked.

Terminal window
cratis chronicle users remove <USER_ID>

The command prompts for confirmation before proceeding. Pass --yes to skip the prompt in automated workflows.

Argument Description
USER_ID The GUID of the user to remove. Use users list to retrieve user IDs.
Flag Description
-y, --yes Skip confirmation prompt.

Remove a user interactively:

Terminal window
cratis chronicle users remove a1b2c3d4-e5f6-7890-abcd-ef1234567890

Remove without confirmation:

Terminal window
cratis chronicle users remove a1b2c3d4-e5f6-7890-abcd-ef1234567890 --yes