CLI reference
Users CLI command reference
Manage users of your project
npx sanity users --help
pnpm dlx sanity users --help
yarn dlx sanity users --help
bunx sanity users --help
Commands
invite
USAGE
$ sanity users invite [EMAIL]
ARGUMENTS
[EMAIL] Email address to invite
FLAGS
-p, --project-id=<PROJECT-ID> Project ID to invite user to (overrides CLI configuration)
--role=<ROLE> Role to invite the user as
DESCRIPTION
Invite a new user to the project
EXAMPLES
Invite a new user to the project (prompt for details)
sanity users invite
Send a new user invite to the email "pippi@sanity.io", prompt for role
sanity users invite pippi@sanity.io
Send a new user invite to the email "pippi@sanity.io", as administrator
sanity users invite pippi@sanity.io --role administrator
Invite a user to a specific project
sanity users invite pippi@sanity.io --project-id abc123list
USAGE
$ sanity users list
FLAGS
-p, --project-id=<PROJECT-ID> Project ID to list users for (overrides CLI configuration)
--invitations Includes or excludes pending invitations
--order=<ORDER> Sort output ascending/descending
--robots Includes or excludes robots (token users)
--sort=<SORT> Sort users by specified column
DESCRIPTION
List all users of the project
EXAMPLES
List all users of the project
sanity users list
List all users of the project, but exclude pending invitations and robots
sanity users list --no-invitations --no-robots
List all users, sorted by role
sanity users list --sort role
List users for a specific project
sanity users list --project-id abc123