> ## Documentation Index
> Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# tally — Dockerfile Linter & Formatter

> Keep your Dockerfiles and Containerfiles clean, modern, and consistent. tally uses BuildKit's official parser with safe auto-fixes.

tally is a production-grade **Dockerfile and Containerfile linter + formatter** that catches issues before they reach production. It uses the same
parser behind `docker buildx`, understands modern BuildKit syntax, and can fix many issues automatically.

```bash theme={null}
# Lint everything in your repo
tally lint .

# Apply all safe fixes automatically
tally lint --fix Dockerfile
```

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install via Homebrew, mise, npm, Bun, uv, pip, RubyGems, WinGet, Go, or Docker.
  </Card>

  <Card title="Quick start" icon="rocket" href="/quickstart">
    Lint your first Dockerfile in under a minute.
  </Card>

  <Card title="Rules reference" icon="list-check" href="/rules/overview">
    Rules across BuildKit, tally, Hadolint, and ShellCheck namespaces.
  </Card>

  <Card title="Configuration" icon="gear" href="/guides/configuration">
    Configure rules, output formats, and fix modes with `.tally.toml`.
  </Card>

  <Card title="Build invocations" icon="layers" href="/guides/build-invocations">
    Lint Dockerfiles through Bake targets and Compose services.
  </Card>
</CardGroup>

## Why tally?

<CardGroup cols={2}>
  <Card title="BuildKit-native" icon="docker">
    Understands heredocs, `RUN --mount`, `COPY --link`, and `ADD --checksum`. No lag behind new Docker features.
  </Card>

  <Card title="Fixes, not just findings" icon="wrench">
    `--fix` applies safe, mechanical rewrites. `--fix-unsafe` unlocks AI-powered improvements via ACP.
  </Card>

  <Card title="Broad rule coverage" icon="shield-check">
    BuildKit checks, tally rules, Hadolint rules, and embedded ShellCheck for shell snippets.
  </Card>

  <Card title="CI & editor ready" icon="circle-check">
    Outputs text, JSON, SARIF, GitHub Actions annotations, and Markdown. VS Code and JetBrains extensions included.
  </Card>

  <Card title="Bake and Compose aware" icon="layers">
    Resolves build args, contexts, platforms, and target stages from orchestrator entrypoints.
  </Card>

  <Card title="No Docker daemon required" icon="server">
    Pure static analysis. Registry-aware checks use a Podman-compatible client — no Docker Desktop needed.
  </Card>

  <Card title="Windows-container aware" icon="windows">
    Detects Windows containers, understands Windows paths, and semantically parses PowerShell `RUN` instructions, including
    [syntax and analyzer diagnostics](/rules/powershell/PowerShell).
  </Card>
</CardGroup>

## Get started

<Steps>
  <Step title="Install tally">
    Pick your preferred package manager:

    ```bash theme={null}
    # Homebrew (macOS/Linux)
    brew trust --formula wharflab/tap/tally
    brew install --require-sha wharflab/tap/tally

    # mise
    mise use -g github:wharflab/tally@latest

    # npm
    npm install -g tally-cli

    # Bun
    bun add -g tally-cli

    # uv
    uv tool install tally-cli

    # Go
    go install github.com/wharflab/tally@latest
    ```
  </Step>

  <Step title="Lint your Dockerfile">
    Run tally against your Dockerfile or recursively across your whole repo:

    ```bash theme={null}
    tally lint Dockerfile
    tally lint .
    ```
  </Step>

  <Step title="Apply auto-fixes">
    Fix safe, mechanical issues automatically:

    ```bash theme={null}
    tally lint --fix Dockerfile
    ```
  </Step>

  <Step title="Add a config file">
    Create `.tally.toml` to set project-wide defaults:

    ```toml .tally.toml theme={null}
    [output]
    format = "text"
    fail-level = "warning"

    [rules]
    include = ["buildkit/*", "tally/*", "hadolint/*"]
    ```
  </Step>
</Steps>

## Explore the docs

<CardGroup cols={2}>
  <Card title="Auto-fix guide" icon="wand-magic-sparkles" href="/guides/auto-fix">
    Learn how safe fixes and AI-powered fixes work.
  </Card>

  <Card title="AI AutoFix via ACP" icon="robot" href="/guides/ai-autofix">
    Use your own AI agent to apply complex Dockerfile improvements.
  </Card>

  <Card title="CI/CD integration" icon="code-branch" href="/guides/ci-cd">
    Add tally to GitHub Actions, GitLab CI, and other pipelines.
  </Card>

  <Card title="Build invocations" icon="layers" href="/guides/build-invocations">
    Lint the builds declared by Docker Buildx Bake and Docker Compose.
  </Card>

  <Card title="IDE integration" icon="display" href="/guides/ide-integration">
    Real-time linting in VS Code, JetBrains, and any LSP editor.
  </Card>
</CardGroup>
