Script Mode

Atkins runs pipelines as executable scripts or reads them from stdin. This lets you treat pipeline files like shell scripts: make them executable, pass arguments, and integrate them into larger toolchains.

Shebang Execution

On Linux and macOS, a shebang line makes a pipeline file directly executable:

  #!/usr/bin/env atkins
name: Executable Script

tasks:
  default:
    desc: Run as executable
    steps:
      - run: echo "Hello from executable script!"
      - run: echo "This file can be run with ./shebang.yml"

Shebang

  chmod +x script.yml
./script.yml

Atkins strips the shebang line before parsing. The file stays valid YAML for other tools.

Stdin Input

Atkins also reads a pipeline from stdin:

  cat pipeline.yml | atkins

Or with a here-doc:

  atkins <<EOF
tasks:
  default:
    steps:
      - run: echo "From stdin"
EOF

This is useful for dynamically generated pipelines or quick one-off runs.

Positional Arguments

Atkins also takes a file path as a positional argument:

  atkins ./ci/build.yml

This matches:

  atkins -f ./ci/build.yml

Combining with Flags

All standard CLI flags work with script mode:

  # Show final tree only
./script.yml --final

# List jobs from an executable pipeline
./script.yml -l

# JSON output from stdin
cat pipeline.yml | atkins --json

See Also