CLI (v0.40.0)Reference
wriftai users list
CLI reference for wriftai users list
wriftai users list
List users
wriftai users list [flags]Examples
List users. By default the first page is returned
$ wriftai users list
List users with a custom number of results per page. By default the first page is returned
$ wriftai users list --page-size 10
Retrieve a page using a specific cursor
$ wriftai users list --cursor abc123
Sort users by creation date in ascending order
$ wriftai users --sort-by created_at --sort-direction asc
Sort users by creation date in descending order
$ wriftai users --sort-by created_at --sort-direction desc
Paginate through the next pages until the end using jq
$ cursor=""
$ while true; do
resp=$(wriftai users list --cursor "$cursor")
echo "$resp" | jq .
cursor=$(echo "$resp" | jq -r '.next_cursor // empty')
[ -z "$cursor" ] && break
done
Paginate through the previous pages until the beginning using jq
$ cursor="Y3Vyc29yLXZhbHVlLXRlc3Q=" # some current page cursor
$ while true; do
resp=$(wriftai users list --cursor "$cursor")
echo "$resp" | jq .
cursor=$(echo "$resp" | jq -r '.previous_cursor // empty')
[ -z "$cursor" ] && break
doneOptions
--cursor string Pagination cursor
-h, --help help for list
-o, --output format Set output format. Supported formats: json, yaml (default json)
--page-size int Number of items per page
--sort-by string Sorting criteria
--sort-direction string Sorting directionOptions inherited from parent commands
--debug Enable debug modeSEE ALSO
- wriftai users - Operations related to users on WriftAI