Skip to main content

Crate runner

Crate runner 

Source
Expand description

§Runner (runner-run crate)

§Overview

Universal project task runner.

runner auto-detects your project’s toolchain (package managers, task runners, version constraints) and provides a unified interface to run tasks, install dependencies, clean artifacts, and execute ad-hoc commands.

§Supported Ecosystems

Package managers/ecosystems: npm, yarn, pnpm, bun, cargo, deno, uv, poetry, pipenv, go, bundler, composer

Task runners: turbo, nx, make, just, go-task, mise, bacon

§Library API

  • run_from_env parses process args and dispatches in current dir.
  • run_from_args parses explicit args and dispatches in current dir.
  • run_in_dir parses explicit args and dispatches against a given dir.

§CLI Usage

runner              # show detected project info
runner <task>       # run a task (falls back to package-manager exec)
run <task>          # alias binary: always task/exec, never a built-in
runner run <target> # explicit unified run: task → PM exec fallback
runner install      # install dependencies via detected PM
runner clean        # remove caches and build artifacts
runner list         # list available tasks from all sources

Functions§

bin_name_from_arg0
Extracts the filename portion from an argv[0]-style OsString, returning it when non-empty.
configure_cli_command
Attaches the generated help byline to a clap command.
exit_code_for_error
Exit code semantics:
help_byline
Render the CLI help byline using the build-time author metadata.
requests_version
Detects whether the provided argv-style slice specifically requests the program version.
run_alias_from_args
Parse explicit args as the run alias binary, detect current dir, dispatch, and return the exit code. See run_alias_from_env.
run_alias_from_env
Parse process args as the run alias binary, detect the current dir, dispatch, and return the exit code.
run_alias_in_dir
Parse explicit args as the run alias binary against dir.
See run_alias_from_env.
run_from_args
Parse explicit args, detect current dir, dispatch, return exit code.
run_from_env
Parse process args, detect current dir, dispatch, return exit code.
run_in_dir
Parse explicit args and run against dir.