Is it possible to get via CLI the commercial name (Lion, Mountain Lion, Mavericks, ...) At the moment I'm using both uname and sw_vers

darwin_version=`uname -r`
osx_version=`sw_vers -productVersion`


But if I want to display the commercial name (Lion, Mountain Lion, Mavericks, ...) I have to manually maintain a list of osx version - commercial name pair.

I'd like to avoid that manual mapping and rely on system data. Is it possible ?
Well as you said it : it's a commercial name and it's barely present in the OS it self. It no real wonder, it has no meaning for devs (far less than a version or a build number). 

AFAIK It's mentioned in some help pages, but that's almost all.

So until someone would prove me wrong, there is no CLI for that (excluding curl stuff, which would imho not be a suitable option here).