wunderunner
AI-Powered Docker Configuration Generator
Analyze your project, generate Dockerfiles & docker-compose.yaml, and learn from build errors with AI.
|
wunderunner ( Self-healing by design. When builds fail, wunderunner doesn't just report errors. It analyzes logs, identifies the root cause, fixes the configuration, and tries again. This iterative loop continues until your container runs successfully or the issue requires human intervention. Built with Pydantic AI for structured agent workflows. Inspired by Repo2Run and Railpack. |
Quick Start
# Set your API key
export ANTHROPIC_API_KEY=sk-ant-...
# Run on any project
uvx wunderunner /path/to/your/project
That's it. wunderunner analyzes your project and generates Docker configs.
How It Works
flowchart TD
Analyze[🔍 Analyze Project] --> secrets{Secrets?}
secrets -->|yes| CollectSecrets[🔐 Collect Secrets]
secrets -->|no| Dockerfile
CollectSecrets --> Dockerfile
Dockerfile[📄 Generate Dockerfile] --> Validate[✅ Validate]
Validate -->|pass| Services[🐳 Generate Compose]
Validate -->|fail| RetryOrHint
Services -->|success| Build[🔨 Build Image]
Services -->|fail| RetryOrHint
Build -->|success| Start[🚀 Start Containers]
Build -->|fail| RetryOrHint
Start -->|success| Healthcheck[💓 Healthcheck]
Start -->|fail| RetryOrHint
Healthcheck -->|healthy| Success((✨ Success))
Healthcheck -->|fail| RetryOrHint
RetryOrHint{Retry?} -->|validation/generation error| Dockerfile
RetryOrHint -->|runtime error| ImproveDockerfile[🔧 Improve Dockerfile]
RetryOrHint -->|exhausted| HumanHint[💬 Ask Human]
ImproveDockerfile -->|fixed| Validate
ImproveDockerfile -->|compose modified| Build
ImproveDockerfile -->|low confidence| HumanHint
HumanHint --> Dockerfile
The loop continues until success. Each failure feeds back as a learning, informing the next generation attempt with specific context about what went wrong and how to fix it.
Features
| Feature | Description |
|---|---|
| Project Analysis | Reads package.json, requirements.txt, Cargo.toml, go.mod, and more |
| Smart Defaults | Chooses appropriate base images, build stages, and runtime configs |
| Self-Healing Builds | Automatically diagnoses failures, fixes configs, and retries |
| Iterative Learning | Each error informs the next attempt until the build succeeds |
Key Concepts
Human in the Loop
When automatic retries are exhausted, wunderunner asks for help instead of giving up. You provide a hint, maybe the project needs a specific system dependency, or uses an unconventional setup. Your hint becomes part of the context for the next attempt.
❌ Build failed after 3 attempts
💬 What should I know about this project?
> This uses puppeteer and needs chromium installed
✓ Got it. Retrying with that context...
Learnings & Context
Every failure teaches the system something. Learnings accumulate across retry cycles:
- Phase: Where it failed (build, start, healthcheck)
- Error type: What kind of failure occurred
- Error message: The actual error output
- Context: Additional info (previous fixes tried, human hints)
The Dockerfile generator receives all learnings, allowing it to avoid repeating mistakes and build on what worked.
Caching
Analysis results are cached in .wunderunner/ to avoid re-scanning unchanged projects:
wxr /path/to/project # Uses cache if available
wxr /path/to/project --rebuild # Ignores cache, fresh analysis
Cached artifacts:
- Project structure analysis
- Detected runtime and framework
- Environment variables and secrets
- Generated Dockerfile and docker-compose.yaml
Runtime Healing
Failures during build, start, or healthcheck trigger the ImproveDockerfile agent. This unified agent can:
- Modify the Dockerfile (add missing packages, fix commands)
- Modify project files (remove problematic configs like
.babelrc) - Update docker-compose.yaml (fix port mappings, remove bad volumes)
- Add
.dockerignoreentries to exclude conflicting files
The agent reads error messages carefully and applies targeted fixes. If it modifies docker-compose.yaml, it skips regeneration and goes directly to build.
License: MIT | Python: 3.11+ | CLI: wxr
Metadata
Release files for wxr 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wxr-0.1.2.tar.gz | 208.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wxr-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 268.8 kB
Release files / wxr-0.1.2.tar.gz
| Download URL | wxr-0.1.2.tar.gz |
|---|---|
| Size | 208.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81012d07d0d0da4e0edd31ae074e7d97abfe3415ac20d17cb145c11f224ce57b
|
|
BLAKE2b-256 checksum How to use checksums |
f87d77356908c925a5cf9d4cc02d62d7f9386cf6f22baef46082f247c3b7a5c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 10, 2025.
Transparency logRelease files / wxr-0.1.2-py3-none-any.whl
| Download URL | wxr-0.1.2-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85076e5a2f5735f574ff3917e7880ce0bc60cb9f96c0c4c8ec90118c577c6044
|
|
BLAKE2b-256 checksum How to use checksums |
12d771902da4378018060e55f90967d18c2d63c6ff70f07b012d59765bd38410
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 10, 2025.
Transparency log