Skip to content
Novus Examples
cwl965 B

CWL CommandLineTool Definition

A CWL v1.2 CommandLineTool with typed inputs, positional and prefixed bindings, a JavaScript outputEval expression, resource requirements, a Docker hint, and an IANA $namespaces block. Inert: it describes an invocation and runs nothing.

Preview — first 47 linescwl
cwlVersion: v1.2
class: CommandLineTool
id: count-records
label: Count records in a CSV extract
doc: |
  Inert fixture. Describes a tool invocation for a CWL parser or workflow visualiser;
  nothing here is executed by this catalog.

requirements:
  ResourceRequirement:
    ramMin: 512
    coresMin: 1
  InlineJavascriptRequirement: {}

hints:
  DockerRequirement:
    dockerPull: registry.example.invalid/example-org/csvtools:1.1.0

inputs:
  extract:
    type: File
    format: iana:text/csv
    inputBinding:
      position: 1
  skip_header:
    type: boolean
    default: true
    inputBinding:
      prefix: --skip-header
      position: 2

outputs:
  record_count:
    type: File
    outputBinding:
      glob: record-count.txt
  exit_note:
    type: string
    outputBinding:
      outputEval: $("counted " + inputs.extract.basename)

baseCommand: [count-records]
stdout: record-count.txt

$namespaces:
  iana: https://www.iana.org/assignments/media-types/

Specifications

Cwl Version
v1.2
Class
CommandLineTool
Inputs
2
Outputs
2
Has Output Eval
true
Has Namespaces
true
Requirements
2

Testing contract

Expected to pass
Scenario
Parse a CWL CommandLineTool including its $namespaces block and JavaScript outputEval
Expected result
Two inputs and two outputs resolve, the iana: prefix expands via $namespaces, and outputEval is reported as an expression requiring InlineJavascriptRequirement

What is a .cwl file?

CWL (Common Workflow Language) is an open standard for describing command-line analysis workflows portably. A .cwl document is YAML (or JSON) declaring a cwlVersion and a class of CommandLineTool, Workflow, or ExpressionTool, with typed inputs and outputs, input bindings that map values onto command-line arguments, and — for workflows — steps wired together by source references. Requirements and hints declare the container image and resources a step needs.

How to use this file

Use an example .cwl file to test workflow parsers, validators, and execution engines, verifying that step dependencies form the expected graph, that input bindings produce the documented command line, and that an unsupported cwlVersion is rejected.

How to use this file for testing

“CWL CommandLineTool Definition” is a deterministic Novus Examples fixture for Config testing, Config parsing, Editor testing. TOML, INI, YAML, .env, and dotfile configuration samples with nested sections and typed values — for testing config parsers, loaders, and environment tooling.

Documented properties for this file: CWL · 965 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.

Point your config loader at the file and assert it reads the documented sections and typed values, including any deliberately-tricky nesting or comments.

Generated by generation/pipelines.py. Free for any use, no attribution required — license.