AI-powered Docker configuration generator with self-healing builds
Project description
wunderunner
AI-Powered Docker Configuration Generator
Analyze your project, generate Dockerfiles & docker-compose.yaml, and learn from build errors—all 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]
Services --> Build[🔨 Build Image]
Build --> Start[🚀 Start Containers]
Start --> Healthcheck[💓 Healthcheck]
Healthcheck -->|healthy| Success((✨ Success))
Validate -->|fail| RetryOrHint
Build -->|fail| FixProject[🔧 Fix Project]
Start -->|fail| FixProject
Healthcheck -->|fail| FixProject
FixProject -->|fixed| Dockerfile
FixProject -->|can't fix| RetryOrHint
RetryOrHint{Retry?} -->|attempts left| Dockerfile
RetryOrHint -->|exhausted| HumanHint[💬 Ask Human]
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 FixProject agent. This agent can:
- Modify project files (add missing configs, fix entry points)
- Update package dependencies
- Add required system packages to Dockerfile
- Fix environment variable issues
If FixProject succeeds, it resets the retry counter—giving the workflow fresh attempts with the fixed configuration.
License: MIT | Python: 3.11+ | CLI: wxr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wxr-0.1.0.tar.gz.
File metadata
- Download URL: wxr-0.1.0.tar.gz
- Upload date:
- Size: 202.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbff328ec66dab3255fe98394acc3f2f8e1e0d8ae44048ff106be75892b63ad5
|
|
| MD5 |
af3b03d15b3e4569839ebb6e267ef5a0
|
|
| BLAKE2b-256 |
f0d5a056295ee7622a6954a68c006ec89f27cb1c64a68ec4ee6d46feffbf3d18
|
Provenance
The following attestation bundles were made for wxr-0.1.0.tar.gz:
Publisher:
ci.yml on wunderlabs-dev/wunderunner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wxr-0.1.0.tar.gz -
Subject digest:
bbff328ec66dab3255fe98394acc3f2f8e1e0d8ae44048ff106be75892b63ad5 - Sigstore transparency entry: 757366954
- Sigstore integration time:
-
Permalink:
wunderlabs-dev/wunderunner@3f0d007502e949af49d0d14f51ba1d73dacc451a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/wunderlabs-dev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3f0d007502e949af49d0d14f51ba1d73dacc451a -
Trigger Event:
push
-
Statement type:
File details
Details for the file wxr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wxr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 55.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b37c6c9349aa7c3de7591146726124f64dac5c31e078ec72e3afd1dd61b8b4ce
|
|
| MD5 |
62a5b5041f76306f440382c604be3812
|
|
| BLAKE2b-256 |
1c732a80455142489df22bf178375933fe53c4d584aedc05d2ac4f087d3dbf98
|
Provenance
The following attestation bundles were made for wxr-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on wunderlabs-dev/wunderunner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wxr-0.1.0-py3-none-any.whl -
Subject digest:
b37c6c9349aa7c3de7591146726124f64dac5c31e078ec72e3afd1dd61b8b4ce - Sigstore transparency entry: 757366958
- Sigstore integration time:
-
Permalink:
wunderlabs-dev/wunderunner@3f0d007502e949af49d0d14f51ba1d73dacc451a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/wunderlabs-dev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3f0d007502e949af49d0d14f51ba1d73dacc451a -
Trigger Event:
push
-
Statement type: