๐ modal-for-noobs
Async-first, idiot-proof Gradio deployment CLI for Modal
Deploy your Gradio apps to Modal with zero configuration. Perfect for noobs who just want things to work! ๐ฏ
โจ Features
- ๐ Zero-config deployment - Just point at your Gradio app and go!
- โก --time-to-get-serious - Migrate HuggingFace Spaces to Modal in seconds
- ๐ Async-first - Built with modern Python async/await patterns using uvloop
- ๐ฏ Three modes: Minimum (CPU), Optimized (GPU + ML), Gra-Jupy (Jupyter + Gradio)
- ๐ Auto-authentication - Handles Modal setup automatically
- ๐ช Smart detection - Finds your Gradio interface automatically
- ๐ฆ Dependency magic - Auto-installs requirements from HF Spaces or drop folder
- ๐งโโ๏ธ Interactive wizard - Step-by-step deployment guidance
- ๐ฅ Log milking - Beautiful log viewing with --milk-logs
- ๐ Deployment killer - Easy cleanup with --kill-a-deployment
- ๐ Modal Examples Explorer - Browse and deploy Modal's example gallery
- ๐ Beautiful UI - Modal's signature green theme throughout
- ๐ง๐ท Modo brasileiro - Brazilian Portuguese support with --br-huehuehue
๐ Quick Start
1. Installation
# Clone and install
git clone https://github.com/arthrod/modal-for-noobs.git
cd modal-for-noobs
uv sync
# Or install directly (future)
pip install modal-for-noobs
2. Deploy Your Gradio App
# ๐ SUPER EASY MODE - Just use our launcher scripts!
# Unix/Linux/macOS
./mn.sh app.py # Quick deploy (CPU)
./mn.sh app.py --optimized # GPU + ML libraries
./mn.sh # Wizard mode (default)
# Windows
mn.bat app.py # Quick deploy (CPU)
mn.bat app.py --optimized # GPU + ML libraries
mn.bat # Wizard mode (default)
# ๐ก Install permanent 'mn' alias to use from anywhere!
./mn.sh --install-alias # Unix/Linux/macOS
mn.bat --install-alias # Windows
# Then just use 'mn' from anywhere:
mn app.py --optimized
mn --milk-logs # View deployment logs
# Alternative: Direct CLI usage (if installed via pip)
modal-for-noobs deploy my_app.py --dry-run
modal-for-noobs deploy my_app.py --wizard # Interactive wizard
modal-for-noobs deploy my_app.py --gra-jupy # Jupyter + Gradio combo
# Configuration commands
modal-for-noobs config # Show configuration (new command)
modal-for-noobs config-info # Legacy alias (backward compatible)
# MCP Server for IDE integration
modal-for-noobs mcp # Start MCP server on port 8000
modal-for-noobs mcp --port 9000 # Use custom port
๐ Detailed Examples
๐ฏ Simple Gradio App
Create a file my_app.py:
import gradio as gr
def greet(name):
return f"Hello {name}! ๐"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
if __name__ == "__main__":
demo.launch()
Deploy it:
./mn.sh my_app.py --optimized
๐ง ML Model App with Custom Requirements
- Create
drop-ur-precious-stuff-here/requirements.txt:
transformers==4.35.0
torch>=2.0.0
accelerate
- Create your ML app:
import gradio as gr
from transformers import pipeline
# The wizard will automatically detect and include your requirements!
classifier = pipeline("sentiment-analysis")
def analyze_sentiment(text):
result = classifier(text)
return f"Sentiment: {result[0]['label']} ({result[0]['score']:.2f})"
demo = gr.Interface(
fn=analyze_sentiment,
inputs="text",
outputs="text",
title="๐ง Sentiment Analysis with Modal-for-noobs!"
)
if __name__ == "__main__":
demo.launch()
- Deploy with wizard:
./mn.sh ml_app.py --wizard
๐ง๐ท Modo Brasileiro (Brazilian Mode)
./mn.sh meu_app.py --optimized --br-huehuehue
# Outputs everything in Portuguese with Brazilian humor! ๐
๐ ๏ธ Advanced Commands
๐ฅ Milk the Logs (View Deployment Logs)
mn --milk-logs # List all apps
mn --milk-logs my-app # View logs for specific app
mn --milk-logs my-app --follow # Follow logs in real-time
mn --milk-logs my-app --br-huehuehue # Brazilian mode logs! ๐ง๐ท
๐ Kill Deployments
mn --kill-a-deployment # List active deployments
mn --kill-a-deployment my-app-id # Kill specific deployment
mn --kill-a-deployment --br-huehuehue # Brazilian terminator mode! ๐
๐ Sanity Check
mn --sanity-check # Check what's deployed
mn --sanity-check --br-huehuehue # Brazilian sanity check! ๐ง
๐ช Time to Get SERIOUS! (HuggingFace Migration)
# The nuclear option - migrate HuggingFace Spaces! ๐
modal-for-noobs time-to-get-serious https://huggingface.co/spaces/user/space-name
# With dry run (see what happens first)
modal-for-noobs time-to-get-serious https://huggingface.co/spaces/user/space-name --dry-run
4. Authentication (auto-setup!)
# If no Modal keys found, it automatically starts auth setup!
# But you can also manually trigger it:
modal-for-noobs auth
CLI Commands
deploy- deploy a Gradio appmn- quick deploy alias fordeploytime-to-get-serious- migrate a HuggingFace Spaceauth- configure Modal credentialskill-a-deployment- stop a running deploymentsanity-check- list active deploymentsconfig- show configuration infomcp- start a local MCP server for Claude, Cursor, Roo and VSCode
The MCP server exposes several core RPC methods:
list_toolscall_toollist_resourcesread_resourcelist_promptsget_prompt
๐ ๏ธ Development
Adding Dependencies
uv add requests # Add runtime dependency
uv add pytest --dev # Add development dependency
Code Quality
uv run ruff check # Lint code
uv run ruff format # Format code
uv run mypy src/ # Type check
uv run pytest # Run tests
Pre-commit Hooks
The project uses pre-commit hooks to ensure code quality:
- Trailing whitespace removal
- YAML/TOML/JSON validation
- Ruff linting and formatting
- MyPy type checking
- Bandit security checks
๐ฅ Contributing
- ๐ด Fork the repository
- ๐ฟ Create your feature branch (git checkout -b feature/amazing-feature)
- ๐พ Commit your changes (git commit -m 'Add some amazing feature')
- ๐ข Push to the branch (git push origin feature/amazing-feature)
- ๐ Open a Pull Request
โ ๏ธ Trusted publishing failure
That's good news!
You are not able to publish to PyPI unless you have registered your project on PyPI. You get the following message:
Trusted publishing exchange failure:
Token request failed: the server refused the request for
the following reasons:
invalid-publisher: valid token, but no corresponding
publisher (All lookup strategies exhausted)
This generally indicates a trusted publisher
configuration error, but could
also indicate an internal error on GitHub or PyPI's part.
The claims rendered below are for debugging purposes only.
You should not
use them to configure a trusted publisher unless they
already match your expectations.
Please register your repository. The 'release.yml' flow is publishing from the 'release' environment. Once you have registered your new repo it should all work.
๐ Credits
Made with <3 by Neurotic Coder and assisted by Beloved Claude โจ
This project represents the beautiful chaos of neurotic coding meets AI assistance - resulting in something absolutely AMAZING! ๐๐
Metadata
Release files for modal-for-noobs 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| modal_for_noobs-0.3.2.tar.gz | 132.8 kB | Without provenance | Details for modal_for_noobs-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modal_for_noobs-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for modal_for_noobs-0.3.2-py3-none-any.whl |
Total release size: 313.8 kB
Release files / modal_for_noobs-0.3.2.tar.gz
| Download URL | modal_for_noobs-0.3.2.tar.gz |
|---|---|
| Size | 132.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af8d2661aa956ab8e8941c2b40c3de41f4c56bdd156f111a4b2bf8fd84a57a68
|
|
BLAKE2b-256 checksum How to use checksums |
cf6fab762e0c04778341c972bc71bda50f98712168d950d3dd8029d5a345730d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / modal_for_noobs-0.3.2-py3-none-any.whl
| Download URL | modal_for_noobs-0.3.2-py3-none-any.whl |
|---|---|
| Size | 181.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd5744ac2a5f21307339de83226343de866c10c51dcaef9e01ee6106f751f902
|
|
BLAKE2b-256 checksum How to use checksums |
87bcead42078daf0907920cae3b80c35109fc704fdf8fd6e00b5f40ea3683869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for modal-for-noobs 0.3.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.