2.2. Command Line Tool#
A command-line tool is a type of Process object that can be run by
itself or as a Workflow step. It is a wrapper for a command like
ls
, echo
, tar
, etc. The command-line tool is defined in the
baseCommand
attribute of the command-line tool CWL document.
A CWL command-line tool must also have inputs
and outputs
.
The following example contains a minimal example of a CWL
command-line tool for the echo
Linux command, using inputs and
outputs.
cwlVersion: v1.2
class: CommandLineTool
baseCommand: echo
stdout: output.txt
inputs:
message:
type: string
inputBinding: {}
outputs:
out:
type: string
outputBinding:
glob: output.txt
loadContents: true
outputEval: $(self[0].contents)