Tools — API
The facade of the domain package goga.commands.tool — the dynamic invocation of an installed tool package.
The signatures below are the CODEMANIFEST contract of the cell.
tool(name: str, args: list[str])
build_injections(main: Callable) -> dict[str, object]
tool— resolve thegoga_tool_<name>package installed in the running interpreter, import it, and call itsmainfacade withargs. The call is transparent: the tool's output and exit behavior pass through unchanged; a missing package or a broken import surfaces as a clean CLI error.build_injections— inspect a tool'smaincallable and build the opt-in injection values for the parameters it declares (the keyword-capableastparameter receives the project AST). Amainthat declares no injections receives an empty mapping and the AST is never built.
A tool package's own facade API — main(argv), install(user), register_hooks(hooks) — is authored by the tool; the callback contracts are covered in the Tools overview — Facade callbacks, with register_hooks detailed in Hooks.
Example
from goga.commands.tool import tool
tool("mkdocs", ["--help"])