Welcome @fgvieira and thank you for your question.
As the linked biostars post shows, it would be possible to show the commands to run a single
CommandLineTool, though nobody has implemented that yet.
As for an entire workflow, that would be more complicated as command line options can vary based upon the results of earlier steps. And in CWL v1.2 entire steps could be skipped due to the results of earlier steps.
It would be possible to create a CWL-to-shell-script converter that would provide a high-fidelity preview. While this would be really cool, such a complete converter would not be a small project.
If you would accept something that isn’t a completely perfect preview, then an intermediate representation of a CWL would be possible, but this intermediate workflow representation wouldn’t necessarily be runnable on the command line.
--dry-run (or equivalent preview) feature is implemented in
cwltool, then that could be combined with the
--target option to preview any CommandLineTool within a CWL workflow.