pwgen, as everyone else has said, for passwords.
Lowercase only, secure, at least 1 number, 8 characters, 1 result
$ pwgen -snA 8 1
Same, but at least 1 uppercase
$ pwgen -csn 8 1
A diceware cli for usernames, and passwords if you want, for something a little more recollection friendly; I use the pip package
diceware, which is fine for my needs.
3 words and 2 symbols
$ diceware -n3 -s2
I am sure there are at least 100 more, of which 74% are written in nodejs, because, uh.. well that's what they do. Whichever you do decide upon, I would prioritize built-in upcase/downcase, because you will have those contraints at some point, and performing either of those is annoyingly long in posix shell.