Skip to content

users

NAME

phyware users — invite, list, retrieve, and deactivate users.

SYNOPSIS

phyware users invite     [OPTIONS] --email <EMAIL>
phyware users list       [OPTIONS]
phyware users get        [OPTIONS] <USER_ID>
phyware users deactivate [OPTIONS] <USER_ID>

DESCRIPTION

invite

Sends an invitation email to a new user and creates a pending user record.

list

Returns all users for the active tenant.

get

Returns full details for a single user.

deactivate

Soft-deletes a user, revoking all sessions and API keys.

OPTIONS

Flag Type Required Default Env
--url string No http://localhost:8000 PHYCLOUD_URL
--api-key string No PHYCLOUD_API_KEY
--output enum No table

| --email | string | Yes (invite) | — | — | | --role | string | No | member | — |

ARGUMENTS

Name Required Description
USER_ID Yes (get/deactivate) Unique user identifier

INPUT

None.

OUTPUT

Field Type Description
id string User identifier
email string User email address
status string active / pending / inactive
role string User role

EXIT CODES

Code Meaning
0 Success
1 Generic / connection error
2 Authentication / authorisation error
3 Resource not found
4 Validation error
5 Server-side error

EXAMPLES

# Invite a user
phyware users invite --email alice@example.com

# Invite with a specific role
phyware users invite --email bob@example.com --role admin

# List all users
phyware users list

# List users as JSON
phyware users list --output json

# Get a specific user
phyware users get usr_abc123

# Deactivate a user
phyware users deactivate usr_abc123

AGENT NOTES

invite creates the user in pending status until the invitation is accepted. deactivate is irreversible via the CLI. Requires admin:users scope for all operations.

SEE ALSO

ERRORS

Code Message Remediation
CONFLICT Email already exists User already invited
FORBIDDEN Insufficient scope Ensure admin:users
NOT_FOUND User not found Check USER_ID