Command Dependencies (cmds)
Command dependencies (depends_on.cmds) are a discovery check: they ensure specific Invowk™ commands are available (discoverable) before your command runs.
Invowk does not execute those commands automatically.
Basic Usage
depends_on: {
cmds: [
{alternatives: ["build"]}
]
}
If none of the listed alternatives can be found, Invowk fails with a Missing Commands dependency error.
Naming & Resolution
- Same invkfile: reference commands by name (e.g.,
"build","test unit"). - Modules: use the module-prefixed name (or alias) as shown by
invowk cmd(e.g.,"shared generate-types").
Alternatives (OR Semantics)
depends_on: {
cmds: [
// Either command being discoverable satisfies this dependency
{alternatives: ["build debug", "build release"]},
]
}
The dependency is satisfied if any alternative is discoverable.
Multiple Requirements (AND Semantics)
depends_on: {
cmds: [
{alternatives: ["build"]},
{alternatives: ["test unit", "test integration"]},
]
}
All entries must be satisfied.
Cross-Invkfile Requirements
depends_on: {
cmds: [{alternatives: ["shared generate-types"]}]
}
This is especially useful when your invkfile expects another invkfile/module to be installed.
If you want workflows…
If you want deploy to actually run build first, do it explicitly in your script (or create a dedicated “workflow” command). Invowk doesn’t orchestrate command execution via depends_on.cmds.
invowk cmd build && invowk cmd deploy
Next Steps
- Capabilities - Check system capabilities
- Environment Variables - Check for required env vars