I am looking for something that has an usage like
passgen <length> <charset>
Cross-Platform: Using PERL
There's a PERL password generator that works for Windows, *nix, OS X, etc.
On Windows, it can be converted into an executable.
Not specifically what you want, but could also come in useful. In the command line, type:
See answers of this question: Random password generator: many, in columns, on command line, in Linux
Take a look at SecurePassword Kit command line password generator. It has the follwing syntax: