Run project tasks through one command
In multi-language projects and polyglot teams, developers constantly switch between different task runners: `cargo` in Rust, `npm`/`pnpm`/`bun` in JavaScript, `poetry` in Python, `go task` in Go, and `make` for legacy tooling. Remembering the specific runner syntax and configuration file for every project slows down daily development.
OMG’s task runner in `src/core/task_runner.rs` discovers supported project tasks and runs them with `omg run <task>`. It can select a runtime required by a supported task before executing the underlying command.
Run project tasks with OMG
omg run build
omg run test
omg run dev -- --port 8080Name a task when running this command. The CLI requires the task argument; if multiple ecosystems define the same task at equal priority, an attended shell prompts you to choose one.
Ecosystem detection priority
When a repository contains multiple project files (for example, a monorepo with a `Makefile`, a `Cargo.toml`, and a `package.json`), OMG avoids ambiguity by evaluating tasks according to an explicit, compiled priority hierarchy in `src/core/task_runner.rs`:
Task runner ecosystem priority order
| Ecosystem and priority | Manifest files and detection logic |
|---|---|
| 1. Rust (Priority 100) | Cargo.toml enables the built-in Cargo tasks build, test, check, run, clippy, and fmt. |
| 2. Node / Bun / Deno (Priority 90) | package.json scripts and deno.json tasks. The packageManager field or recognized lockfiles select npm, pnpm, Yarn, or Bun for package.json scripts; current bun.lock is not recognized without packageManager. |
| 3. Python (Priority 80) | pyproject.toml [tool.poetry.scripts] and Pipfile [scripts]. |
| 4. Go Task (Priority 75) | Taskfile.yml or Taskfile.yaml enables task --list and fallback execution through task. |
| 5. Ruby (Priority 70) | Rakefile enables task listing and fallback execution through rake. |
| 6. Java (Priority 60) | pom.xml (Apache Maven) or build.gradle / build.gradle.kts (Gradle). |
| 7. PHP (Priority 50) | composer.json (`scripts`) executed via composer. |
| 8. mise (Priority 45) | mise.toml or .mise.toml [tasks.*] declarations, parsed and planned without spawning the mise CLI; task scripts run through a shell. |
| 9. Make (Priority 40) | Makefile targets executed via make. |
| OMG Project Config | .omg.toml [scripts] selects a preferred ecosystem when an existing task name is ambiguous; it does not define executable tasks. |
Argument forwarding and environment passthrough
OMG passes arguments directly to the underlying tool using the standard `--` separator. All flags following `--` are forwarded untouched to the underlying compiler, test framework, or script.
Forwarding arguments to underlying tasks
omg run test -- --nocapture
omg run build -- --release
omg run lint -- --fixNative execution of mise.toml tasks
If you are migrating a repository from mise or working in a repository that uses `mise.toml` for task definitions (`[tasks.build]`, `[tasks.test]`), OMG runs these tasks natively in pure Rust. You do not need to install the mise binary or convert your configuration: OMG detects and executes `[tasks.*]` entries out of the box.
Sources and verification
Commands and behavior are based on the references below. Source review is not a claim that every workflow has been executed on every supported platform.
- OMG task runner implementation (src/core/task_runner.rs)
- OMG CLI reference for omg run
- OMG daily workflows guide