left4me/components/l4d2-host-lib
2026-04-23 01:01:14 +02:00
..
src/l4d2host docs(l4d2): finalize v1 CLI contracts and web-facing read APIs 2026-04-23 01:01:14 +02:00
tests docs(l4d2): finalize v1 CLI contracts and web-facing read APIs 2026-04-23 01:01:14 +02:00
pyproject.toml feat(l4d2): scaffold package and v1 CLI entrypoint 2026-04-23 00:53:19 +02:00
README.md docs(l4d2): finalize v1 CLI contracts and web-facing read APIs 2026-04-23 01:01:14 +02:00

l4d2-host-lib

Python host library and CLI for managing L4D2 instances.

CLI

l4d2ctl exposes exactly these commands in v1:

  • install
  • initialize <name> -f <spec.yaml>
  • start <name>
  • stop <name>
  • delete <name>

Subprocess failures are fail-fast. Raw stderr is written to stderr and the command exits with the same subprocess return code.

Runtime Paths

The host library uses hard-coded runtime paths under /opt/l4d2:

  • /opt/l4d2/installation
  • /opt/l4d2/overlays/<overlay>
  • /opt/l4d2/instances/<name>
  • /opt/l4d2/runtime/<name>/{upper,work,merged}

Web App Read APIs

These read APIs are provided for web app integration:

  • get_instance_status(name)
  • stream_instance_logs(name, lines=200, follow=True)