Well it depends on what exactly your output would be.
If that's an image rendition of some artboards, layers or pages – you're out of luck here, because you need
sketchtool for rendering images and
sketchtool only works on macOS.
But if you only need to analyze a Sketch document structure and gather some information about its contents, then you have the following options:
- https://github.com/amzn/sketch-constructor is a third-party JS package that allows you to read and analyze Sketch documents. Being a third-party library, it may lack some features or be incompatible with newer versions of Sketch file format.
- There're Sketch Assistants which are basically pieces of JS code that analyze the given Sketch document and report some results. They are primarily designed to be launched from within Sketch.app itself, but you can also run them via CLI yourself.
- Finally, Sketch has open-sourced their file format schemas – so you can write your own document parsers in JS/TS using the provided type definitions. You'll have to unzip a .sketch file first and go file-by-file, so check out the previous higher-level options first, they could be more convenient for your use case.