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: a same-named task wins, else the
                    #   built-in default (install/clean/list/info/
                    #   completions), else PM exec
runner run <target> # explicit unified run: task → built-in → PM exec
runner install      # ALWAYS the built-in (deps); a task named `install`
                    #   is reached via `run install`
runner clean        # remove caches and build artifacts (always built-in)
runner list         # list available tasks from all sources (always built-in)

Functions§

bin_name_from_arg0
Extracts the filename portion from an argv[0]-style OsString, returning it when non-empty.
config_schema
JSON Schema for runner.toml. Built under the schema feature; runner schema renders it.
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.