Get started

nf user

The nf user command handles authentication and user management.

Use nf user login to authenticate with the Sentinel API. The session token is stored in .nf.json in the current directory. Admin users have access to additional commands for creating and managing other user accounts.


Usage

Terminal
$ nf user login --username <user> --password <pass>
$ nf user info
$ nf user logout
$ nf user change-password --old <old> --new <new>

Authentication commands

nf user login
nf user login

Authenticate with the Sentinel API. Stores the session token in .nf.json.

FlagDescription
--usernameUsername (required)
--passwordPassword (required)
nf user info
nf user info

Display the current authenticated user's username, name, email, and admin status.

FlagDescription
--jsonOutput results as JSON
nf user logout
nf user logout

Log out and invalidate the current session.

nf user change-password
nf user change-password

Change the current user's password.

FlagDescription
--oldCurrent password (required)
--newNew password (required)

Admin commands

The following commands require admin privileges.

nf user list
nf user list

List all users with their ID, username, name, and email.

FlagDescription
--jsonOutput results as JSON
nf user create
nf user create

Create a new user account.

FlagDescription
--usernameUsername (required)
--passwordPassword (required)
--nameFull name (required)
--emailEmail address (required)
nf user get
nf user get

Get a user by their UUID.

FlagDescription
--idUser UUID (required)
--jsonOutput results as JSON
nf user update
nf user update

Update a user's details. Only provided fields are changed.

FlagDescription
--idUser UUID (required)
--usernameNew username
--nameNew full name
--emailNew email
--passwordNew password

Examples

Terminal
$ nf user login --username admin --password secret
Logged in as Admin (admin) 

$ nf user info Username: admin Name: Admin Email: admin@example.com Admin: true

Terminal
$ nf user create --username jane --password pass123 --name "Jane Doe" --email jane@example.com
User jane created successfully
Terminal
$ nf user change-password --old oldpass --new newpass
Password changed successfully