Although Swift class works without inheritance, but in order to use NSCoding you must inherit from NSObject.
NSCoding
NSObject
class Command: NSObject, NSCoding { ...}
Too bad the compiler error is not very informative :(