Penguin-KarChunTKarChunT

Forward CLI Arguments to a Command

Understand how to forward CLI arguments to a command in Taskfile.

You can forward CLI arguments to a command in Taskfile by using the -- syntax. This allows you to pass additional arguments directly to the command being executed.

Taskfile.yaml
version: '3'
tasks:
  example:
    cmds:
      - npm {{.CLI_ARGS}}
task example -- install