Documentation Index Fetch the complete documentation index at: https://docker-agent-tail.michaelscotello.com/llms.txt
Use this file to discover all available pages before exploring further.
Commands
Command Description initSet up AI agent config files (skills, CLAUDE.md, and agent-specific rule files) agent-helpPrint a usage guide for AI coding agents to read cleanRemove old log sessions. Use --retain N to keep the last N sessions (default: 5). Use --dry-run to preview lnavOpen the latest session in lnav . Use --session <name> for a specific session lnav-installInstall the lnav format definition for viewing JSONL logs with lnav
# Examples
docker-agent-tail init
docker-agent-tail clean --retain 3
docker-agent-tail clean --dry-run
docker-agent-tail lnav
docker-agent-tail lnav --session 2026-03-04-143700
docker-agent-tail lnav-install
Global Flags
Flag Description --all, -aDiscover and tail all running containers --names, -nComma-separated list of container names to tail (e.g., api,web,db) --compose, -cTail all services in a Docker Compose project (requires docker-compose.yml) --follow, -fReattach on container restart (default: false) --jsonOutput logs as JSON Lines to stdout instead of human-readable format --output, -oOutput directory for log files (default: ./logs) --since, -sOnly show logs since a duration ago (e.g., 5m, 1h) --no-colorDisable colored output (useful for piping to files) --version, -vShow version and exit --help, -hShow help message
Filter Flags
Flag Description --exclude, -eExclude log lines matching a regex pattern. Example: --exclude 'health.*check' --mute, -mHide log lines matching a regex pattern from terminal output (still written to log files). Example: --mute 'worker'
Positional Arguments
PATTERN
Optional glob pattern to filter containers by name. Example: web-* matches all containers starting with “web-”.
docker-agent-tail 'api-*' --follow
Examples
Tail all containers
Docker Compose services
Filter by name pattern
JSON Lines output to stdout
Save logs with filtering
Logs from the last 5 minutes
Without ANSI colors
Output Files
When using --output (default: ./logs), a timestamped session directory is created with the following files:
File Description combined.jsonlAll logs from all containers in one JSONL file <container-name>.jsonlIndividual JSONL log file for each container metadata.jsonSession metadata (start time, command, container list)
A latest symlink always points to the most recent session directory.
Log files use JSON Lines (.jsonl). Each line is a valid JSON object.
Plain text container output
Structured JSON (merged + level normalized)
{ "ts" : "2026-03-04T10:30:01.789Z" , "container" : "api" , "stream" : "stdout" , "message" : "GET /api/users 200 12ms" }
ts : ISO 8601 timestamp (RFC3339Nano)
container : Container name
stream : stdout or stderr
level : Normalized log level (when detected from structured JSON)
message : Log message (plain text output only)
Structured JSON from containers is automatically merged with metadata fields. Log levels are normalized to canonical values (debug, info, warning, error, fatal, trace).
Exit Codes
Code Meaning 0Success 1General error 2No containers found matching criteria 3Docker daemon error (connection failed, timeout) 64Usage error (invalid flags or arguments)
Environment Variables
Variable Description DOCKER_HOSTDocker socket or daemon address. Default: ~/.docker/run/docker.sock or /var/run/docker.sock