Skip to main content

AI-driven Dockerfile generator for any Python project

Project description

Orchify

PyPI version Python versions

AI-driven Dockerfile and .dockerignore generator for any Python project.


🚀 Overview

Orchify is a command-line tool that uses AI agents (via Agno and the Model Context Protocol) to:

  1. Scan a Python project and analyze its structure, dependencies, and entrypoints.
  2. Generate a production-grade, multi-stage Dockerfile and corresponding .dockerignore—tailored to the project—without manual template editing.

Whether you're containerizing a microservice, a Flask app, or a complex multi-package repository, Orchify will craft best-practice container configurations in seconds.


🔧 Features

  • Framework Agnostic: Works with plain Python scripts, Flask, FastAPI, Django, and more.
  • AI-Powered: Leverages Anthropic Claude or OpenAI GPT models to write idiomatic Dockerfiles.
  • Two-Step Workflow: scangen for clear separation of analysis and generation.
  • Production-Ready: Generates multi-stage builds, non-root users, cache optimizations.
  • Customizable: Override prompts, model choices, output paths via CLI flags.

📦 Installation

pip install orchify

Or from source:

git clone https://github.com/yourusername/Orchify.git
cd Orchify
docker run -it --rm \
  -v "$PWD":/workspace \
  python:3.11-slim bash -c "pip install -e ."

🔨 Usage

Orchify exposes three primary commands via the orchify CLI:

1. hello

A sanity-check command:

orchify hello
# 👋 Welcome to Orchify!

2. scan

Analyze your project and write out orchify.json metadata.

orchify scan \
  --dir /path/to/your/project \
  --prompt "Summarize my project for Dockerfile generation"

Options:

  • -d, --dir : Project directory (default: current directory).
  • -p, --prompt : Custom AI analysis prompt.

3. gen

Generate Dockerfile and .dockerignore based on the scan metadata.

orchify gen \
  --model-id claude-3-7-sonnet-latest \
  --output Dockerfile

Options:

  • -m, --model-id : Anthropic/OpenAI model to use.
  • -o, --output : Path for the generated Dockerfile (default: Dockerfile).

⚙️ Configuration

Orchify uses environment variables to authenticate with AI providers:

Variable Description
ANTHROPIC_API_KEY Your Anthropic Claude API token.
OPENAI_API_KEY Your OpenAI API key (optional).

Set them in your shell or .env before running commands.


🛠️ Development

From your dev clone:

# Install editable
pip install -e .

# Run tests
pytest tests/

# Lint & format
flake8 orchify tests
black orchify tests

🤝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repo.
  2. Create a feature branch: git checkout -b feature/awesome.
  3. Commit your changes and push.
  4. Open a Pull Request.

Please adhere to the existing code style and add tests for any new functionality.


📄 License

This project is licensed under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orchify-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orchify-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file orchify-0.1.0.tar.gz.

File metadata

  • Download URL: orchify-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for orchify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a900848a93cbbe9d5d2c4ddc4ae18b9ec1d1e684a9782e17596db7e9c089f0f
MD5 42e11d23145c5cddf1fb38b8bc82cb97
BLAKE2b-256 7de1a615d947d2f705fe9c8a606be118e24b8167699a1cfaca4d4b552d1497ea

See more details on using hashes here.

File details

Details for the file orchify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: orchify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for orchify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 777803afb8e2b04d42859556b8a070367c8614b4563dea8c75507f3ac43ee95b
MD5 0beff6ff025bf99b8de487251226fba0
BLAKE2b-256 be0d7bef2c8fc2fcb9c9b438e697bc66091b4951caa1655754e2be15a9d06e2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page