Redis Command To Sort Keys
You can always use your unix commands which works perfectly
redis-cli --scan --pattern yourpattern* | sort
Redis returns keys, using KEYS (don't use it in production!) or SCAN, unordered. There is no "fancy" API to return them sorted but you can do it in the client application.