Initialize a Modal project with proper structure, configuration, and best practices
Initialize a new Modal project with proper structure, configuration, and best practices. Use this when starting Modal apps for APIs, batch processing, ML inference, or scheduled tasks.
/plugin marketplace add JosiahSiegel/claude-plugin-marketplace/plugin install modal-master@claude-plugin-marketplaceInitialize a Modal project with proper structure, configuration, and best practices.
Set up a new Modal project with the following:
Project Structure Analysis
Create Core Files
Configure Based on Use Case
Best Practices Implementation
@modal.enter() for initializationuv_pip_install for faster buildsproject/
├── modal_app.py # Main Modal application
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── src/ # Source code
│ └── __init__.py
└── README.md # Project documentation
import modal
app = modal.App("my-app")
image = (
modal.Image.debian_slim(python_version="3.11")
.uv_pip_install("fastapi", "uvicorn")
)
@app.function(image=image)
def hello(name: str = "World") -> str:
return f"Hello, {name}!"
@app.local_entrypoint()
def main():
result = hello.remote()
print(result)
# Install Modal CLI
pip install modal
# Authenticate (opens browser)
modal setup
# Test the app
modal run modal_app.py
# Start development server
modal serve modal_app.py
modal run