API Error: extId is required on createCommand

Hi,
I wanted to try to create an extension, but I ran into the error "extId is required" as soon as I call api('createCommand', { ... }).
I copied the code from
https://github.com/dillonHe/EasyEDA-Documents/blob/master/API/example/theme/main.js and pasted it into Tools -> Extensions -> Run Script.

Also tried this simple code in Tools -> Extensions -> Run Script:

api('createToolbarButton', {
    title:'Shape',
    fordoctype:'pcb',
    "menu" : [
        {"text":"Log Selection", "cmd":"extension-debugshape-log"},
    ]
});``api('createCommand', {
    'extension-debugshape-log' : function() {
        console.log(api('getSelectedIds'));
    }
});

Toolbar button shows up, but same error on createCommand

Since I found no documentation ... what is wrong?

#Bug Reports#
Bug Reports