> ## 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.

# docker-agent-tail

> Auto-discover Docker containers, tail their logs in real-time, and write structured files optimized for AI coding agents.

<img className="block dark:hidden" src="https://mintcdn.com/scotello/cXT2q4ZV4KnCEilc/logo-light.svg?fit=max&auto=format&n=cXT2q4ZV4KnCEilc&q=85&s=de325203b93a209e6cc86e35f03e55d0" alt="docker-agent-tail" noZoom width="140" height="36" data-path="logo-light.svg" />

<img className="hidden dark:block" src="https://mintcdn.com/scotello/cXT2q4ZV4KnCEilc/logo.svg?fit=max&auto=format&n=cXT2q4ZV4KnCEilc&q=85&s=5a4a3578b1ba80096f48f3fcb154f8df" alt="docker-agent-tail" noZoom width="140" height="36" data-path="logo.svg" />

## Docker logs for AI agents

Auto-discover Docker containers, tail their logs in real-time, and write structured files optimized for AI coding agents like Claude Code and Cursor.

<CardGroup cols={2}>
  <Card title="Get Started" icon="rocket" href="/quickstart">
    5-minute tutorial to get up and running
  </Card>

  <Card title="Installation" icon="download" href="/installation">
    Install via Homebrew, Go, or curl
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli-reference">
    Complete command and flag reference
  </Card>

  <Card title="AI Agents" icon="robot" href="/agents">
    Integrate with Claude Code, Cursor, and Windsurf
  </Card>
</CardGroup>

## Key Features

<CardGroup cols={2}>
  <Card title="Auto-Discovery" icon="magnifying-glass">
    Automatically detects all running Docker containers without manual configuration.
  </Card>

  <Card title="Real-Time Streaming" icon="bolt">
    Tail logs as they happen with configurable filtering and output formatting.
  </Card>

  <Card title="AI-Optimized Output" icon="file-lines">
    Structured JSONL log files with normalized levels and metadata, perfect for AI analysis.
  </Card>

  <Card title="Docker Compose Support" icon="cubes">
    Works seamlessly with Docker Compose projects and services.
  </Card>

  <Card title="Flexible Filtering" icon="filter">
    Filter logs by regex patterns, exclude noisy lines, and mute specific containers from terminal output.
  </Card>

  <Card title="lnav Integration" icon="chart-bar" href="/lnav">
    View structured JSONL logs with lnav — SQL queries, regex filtering, and color-coded levels.
  </Card>
</CardGroup>

## Quick Install

<Tabs>
  <Tab title="Homebrew">
    ```bash theme={null}
    brew install Mscotello/tap/docker-agent-tail
    ```
  </Tab>

  <Tab title="Go Install">
    ```bash theme={null}
    go install github.com/Mscotello/docker-agent-tail@latest
    ```

    <Note>
      Make sure `$HOME/go/bin` is in your PATH. Add this to your shell profile (e.g., `~/.zshrc` or `~/.bashrc`):

      ```bash theme={null}
      export PATH="$PATH:$HOME/go/bin"
      ```
    </Note>
  </Tab>

  <Tab title="Curl">
    ```bash theme={null}
    curl -sSL https://github.com/Mscotello/docker-agent-tail/releases/latest/download/install.sh | bash
    ```
  </Tab>
</Tabs>

## Basic Usage

```bash theme={null}
# Tail all container logs in real-time
docker-agent-tail --all --follow

# Tail specific containers
docker-agent-tail --names api,web --follow

# Filter logs with regex
docker-agent-tail --all --exclude 'health' --mute 'worker'

# View saved logs with lnav
lnav logs/latest/combined.jsonl
```

## Ready to get started?

Read the full getting started guide to learn how to use docker-agent-tail with AI agents.

<Card title="Getting Started Guide" icon="arrow-right" href="/quickstart">
  Follow the 5-minute tutorial
</Card>
