Is your feature request related to a problem? Please describe.
When a task depends on external tools or packages being installed (outside of moon's toolchain management), there is currently no way to declare these dependencies explicitly. If a required tool is missing, the user either gets a cryptic "command not found" error or a vague failure message that gives no indication of what is missing or how to fix it.
A concrete example: a task that uses poetry-relax (a Poetry plugin installed via poetry self add poetry-relax) will silently fail or produce a confusing error if the plugin is not installed. There is no way to declare this requirement in the task configuration, and no way for moon to give the user actionable feedback.
Describe the solution you'd like
A way to declare prerequisite tools or packages as part of a task configuration, so that moon can check for their presence before running the task and provide a clear, actionable error message if they are missing — ideally including installation instructions.
For example:
- Check whether a CLI tool is available on
$PATH
- Check whether a Poetry plugin is installed
- If a prerequisite is missing: fail early with a descriptive message explaining what is missing and how to install it
The exact shape of the solution is open for discussion — we'd love to find something that fits moon's existing toolchain and dependency model.
Describe alternatives you've considered
- Documenting prerequisites in a README — requires the user to read the documentation before running a task, and gives no feedback at runtime.
- Checking prerequisites in a
script or shell script — works, but is boilerplate that has to be repeated for every task that has external dependencies, and does not integrate with moon's task model.
- Moon's
toolchain setting — handles well-known toolchains (Python, Node, etc.) but does not cover tools installed within a toolchain, such as Poetry plugins or globally installed CLI tools.
Additional context
This would be especially valuable in shared base config repos, where tasks are defined centrally and consumed by multiple working repositories. In that context, there is no single place to document prerequisites that is guaranteed to be seen by all users of the tasks.
Is your feature request related to a problem? Please describe.
When a task depends on external tools or packages being installed (outside of moon's toolchain management), there is currently no way to declare these dependencies explicitly. If a required tool is missing, the user either gets a cryptic "command not found" error or a vague failure message that gives no indication of what is missing or how to fix it.
A concrete example: a task that uses
poetry-relax(a Poetry plugin installed viapoetry self add poetry-relax) will silently fail or produce a confusing error if the plugin is not installed. There is no way to declare this requirement in the task configuration, and no way for moon to give the user actionable feedback.Describe the solution you'd like
A way to declare prerequisite tools or packages as part of a task configuration, so that moon can check for their presence before running the task and provide a clear, actionable error message if they are missing — ideally including installation instructions.
For example:
$PATHThe exact shape of the solution is open for discussion — we'd love to find something that fits moon's existing toolchain and dependency model.
Describe alternatives you've considered
scriptor shell script — works, but is boilerplate that has to be repeated for every task that has external dependencies, and does not integrate with moon's task model.toolchainsetting — handles well-known toolchains (Python, Node, etc.) but does not cover tools installed within a toolchain, such as Poetry plugins or globally installed CLI tools.Additional context
This would be especially valuable in shared base config repos, where tasks are defined centrally and consumed by multiple working repositories. In that context, there is no single place to document prerequisites that is guaranteed to be seen by all users of the tasks.