plsrri ships an installable plscli wrapper
for staged non-GUI workflows. The command is designed for the same
pipeline contract that powers prepare_firstlevel(),
prepare_pls(), run_pls(), and
render_pls_report().
This article is about the shell interface itself: installation, help,
command shapes, machine-readable output, and exit behavior. For the YAML
schema, see vignette("pipeline-yaml-spec"). For a broader
end-to-end analysis example, see
vignette("scripted-workflows").
How do you install the plscli wrapper?
Install the package, then copy the wrapper into a directory on
PATH.
plsrri::install_cli("~/.local/bin", overwrite = TRUE)If needed, add that directory to your shell startup file:
Then check the command:
When working from a source checkout, the wrapper can also bootstrap
the local package via pkgload or devtools if
plsrri is not yet installed.
What commands does plscli expose?
The command surface is intentionally small and stage-oriented:
templatevalidatediscoverfirstlevel-planfirstlevel-runpls-planpls-runreportsummarizerun
The usual starting point is a scaffolded YAML file:
Then validate the specification before launching expensive work:
What does a typical staged workflow look like?
For a workstation or scheduler-driven run, the stage boundaries are explicit:
plscli discover --spec study.yml
plscli firstlevel-plan --spec study.yml
plscli firstlevel-run --spec study.yml --work-id w0007
plscli pls-plan --spec study.yml
plscli pls-run --spec study.yml
plscli report --input study.yml --format htmlFor array execution, the main difference is the first-level worker id:
plscli firstlevel-plan --spec study.yml
plscli firstlevel-run --spec study.yml --work-id "${SLURM_ARRAY_TASK_ID}"
plscli pls-plan --spec study.yml
plscli pls-run --spec study.ymlThe report command accepts either the YAML spec, an
artifact root, or a saved pls_result.rds path:
How do options and help behave?
Commands support both --key value and
--key=value forms:
Command-specific help is available in either style:
Unknown options are treated as usage errors rather than being
ignored. Boolean flags use --flag, and report
also accepts --no-open when you want to disable browser
launching explicitly.
Can the CLI emit machine-readable output?
Yes. Add --json when you want a stable stdout payload
for scripts or CI:
plscli template --out study.yml --json
plscli validate --spec study.yml --json
plscli report --input study.yml --format html --jsonHuman-facing diagnostics still go to stderr where practical.
What exit codes should you expect?
The CLI returns:
-
0for success -
1for domain failures such as an invalid pipeline spec -
2for usage or runtime errors
That makes it safe to call from shell scripts, schedulers, and CI wrappers:
Where should you go next?
-
vignette("pipeline-yaml-spec")for the YAML contract -
vignette("scripted-workflows")for the broader saved-artifact workflow ?install_cli?plscli_main