Install — API
The facade of the domain package goga.commands.install — the pip install/uninstall of tool packages with the post-install hooks and agent activation.
The signatures below are the CODEMANIFEST contract of the cell.
install(ctx: click.Context, name: str | None, sudo: bool, version: str | None,
local: str | None, no_connect: bool = False) -> int
uninstall(ctx: click.Context, name: str, sudo: bool = False, yes: bool = False,
target_user: str | None = None) -> int
install— pip-install a tool into the running interpreter (single mode withname, local mode withlocal, bulk mode with neither — thetools:declarations), then run the post-install hooks and activate the registered agents (skipped withno_connect). Returns the exit code.uninstall— remove exactly one tool package after the confirmation (yesskips it; a non-interactive terminal withoutyesis a clean error), then re-sync the agents.sudotargets a system-Python install;target_userre-syncs another user's installation.
resolve_initiating_user() -> str
run_install_hooks(tools: list[str]) -> None
call_install_hook(tool: str, user: str) -> bool
resolve_initiating_user— the initiating user of the run (SUDO_USERunder sudo, else the current OS user) — the value passed to keyword-capable hooks.run_install_hooks— run the post-install hook of each named tool (the pip-fresh set); a failing hook raises.call_install_hook— invoke one tool'sinstallfacade callable (True— the package declares one and it ran).
Example
import click
from goga.commands.install import install
exit_code = install(click.get_current_context(), name="mkdocs", sudo=False,
version="1.0.x", local=None, no_connect=False)