| Crates.io | minifly |
| lib.rs | minifly |
| version | 0.1.1 |
| created_at | 2025-06-22 04:15:01.212424+00 |
| updated_at | 2025-06-22 11:02:17.94862+00 |
| description | Local Fly.io development simulator with incredible developer experience |
| homepage | https://minifly-docs.fly.dev |
| repository | https://github.com/NoHeadDotDev/minifly |
| max_upload_size | |
| id | 1721273 |
| size | 131,827 |
Local Fly.io development simulator with incredible developer experience
Minifly provides a complete local development environment that simulates the Fly.io platform, allowing you to develop, test, and debug your applications with the same APIs and behavior you'll see in production.
cargo install minifly
# Initialize Minifly environment
minifly init
# Start the platform
minifly serve
# Deploy your first app
minifly deploy
# Start the Minifly platform
minifly serve
# Start in development mode with enhanced logging
minifly serve --dev
# Stop the platform
minifly stop
# Create an application
minifly apps create my-app
# List applications
minifly apps list
# Delete an application
minifly apps delete my-app
# Create a machine
minifly machines create --app my-app --image nginx:latest
# List machines
minifly machines list --app my-app
# Start/stop machines
minifly machines start <machine-id>
minifly machines stop <machine-id>
# Deploy with automatic redeployment on changes
minifly deploy --watch
# View real-time logs with region context
minifly logs <machine-id> --follow
# Check platform status
minifly status
Minifly excels at simulating multi-tenant architectures with per-tenant databases:
// Each tenant gets their own replicated database
let db_path = format!("/litefs/{}.db", tenant_id);
let pool = SqlitePool::connect(&db_path).await?;
Get comprehensive observability with built-in structured logging:
# Enable debug logging
MINIFLY_DEBUG=1 minifly serve
# JSON formatted logs for production
MINIFLY_LOG_JSON=1 minifly deploy
All operations include:
Minifly implements the complete Fly.io Machines API v1:
# All standard Fly.io API endpoints work locally
curl -X POST http://localhost:4280/v1/apps/my-app/machines \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"config": {"image": "nginx:latest"}}'
MINIFLY_API_PORT: API server port (default: 4280)MINIFLY_LOG_LEVEL: Log level (default: info)MINIFLY_LOG_JSON: Use JSON logging formatMINIFLY_DEBUG: Enable debug loggingMINIFLY_DATA_DIR: Data directory for volumes (default: ./data)Create ~/.config/minifly/config.toml:
api_url = "http://localhost:4280"
token = "your-api-token"
[logging]
level = "info"
format = "human" # or "json"
# fly.toml
app = "my-web-app"
primary_region = "local"
[[services]]
internal_port = 8080
protocol = "tcp"
[[services.ports]]
port = 80
handlers = ["http"]
[[services.ports]]
port = 443
handlers = ["tls", "http"]
# Deploy and watch for changes
minifly deploy --watch
# fly.toml for multi-tenant app
app = "saas-app"
primary_region = "local"
[env]
DATABASE_URL = "/litefs/primary.db"
TENANT_ISOLATION = "database"
[[mounts]]
source = "sqlite_data"
destination = "/litefs"
Contributions are welcome! Please see our Contributing Guide for details.
Licensed under the MIT License. See LICENSE for details.
Happy local development! 🎉
For questions and support, visit our GitHub repository.