bytesbrains-pi-docker-logs

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-docker-logs

Docker log gateway for pi agents — tail complete raw logs from Docker containers using the docker CLI. Works with the wrok.in AI Factory.

For label-filtered structured logs (by agent/service), use pi-loki-gate.

Install

pi install npm:@bytesbrains/pi-docker-logs

Configuration

Add a .dockerlogs.yml to your repo root:

tail: 200
Key Default Description
tail 200 Default number of log lines to tail

Tools

docker_container_list

List running factory containers.

docker_container_list()

docker_worker_logs

Fetch complete logs from a factory worker container. Captures all output (console.log + structured JSON).

docker_worker_logs(worker="1")
docker_worker_logs(worker="2", tail=500, search="error")
docker_worker_logs(worker="3", since="30m")

docker_container_logs

Fetch complete logs from any Docker container.

docker_container_logs(container="ai-factory-orchestrator")
docker_container_logs(container="ai-factory-worker-1", search="exit=")
docker_container_logs(container="ai-factory-gitea", tail=100, since="1h")

Docker vs Loki Logs

Docker Logs Loki
Captures All stdout/stderr Structured JSON only
Per-container
Label filtering ❌ (text search) ✅ (agent, service)
Best for Complete job output, console messages Service/agent exploration, error patterns

Requirements

  • Docker CLI (docker) must be installed and on PATH
  • Current user must have Docker socket access

License

MIT


Built and maintained by BytesBrains — AI automation & agents, engineered to production standards. The model proposes, code guarantees.