A powerful CLI tool to generate production-ready Python project boilerplates instantly. Skip the boring setup and jump straight into coding!
- 🚀 Quick Setup - Generate complete project structures in seconds
- 🎯 8 Framework Templates - FastAPI, Django, Flask, Bottle, Pyramid, Tornado, Sanic, CherryPy
- 📦 Batteries Included - Pre-configured with best practices
- 🐳 Docker Ready - Includes Dockerfile and docker-compose
- ✅ Testing Setup - pytest configuration out of the box
- 🔧 Smart Scaffolding - Add models, endpoints, services, middleware with one command
- 🔐 4 Authentication Methods - JWT, OAuth2, API Key, Basic Auth
- 🗄️ 5 Database Options - PostgreSQL, MySQL, MongoDB, SQLite, Redis
- 🎨 3 Template Styles - Minimal, Standard, Full
- 🎭 Beautiful CLI - Rich terminal output with progress indicators
- 🔄 CI/CD Ready - GitHub Actions, GitLab CI, CircleCI configs
- 📚 Documentation Tools - MkDocs and Sphinx setup
- 🧪 Enhanced Testing - Advanced pytest configs, fixtures, factories
- 🔍 Project Validation - Validate structure and dependencies
- 📊 Dependency Management - Check outdated packages, security audits
- 🌍 Environment Management - Multiple environment configurations
- 📝 Makefile Generator - Common development tasks automated
- ⚖️ License Selection - MIT, Apache, GPL, BSD, Unlicense
- 🙈 Smart .gitignore - Custom gitignore templates via gitignore.io
Modern, fast API framework with automatic documentation
Features:
- ✅ Async/await support
- ✅ Automatic API docs (Swagger UI)
- ✅ Pydantic models for validation
- ✅ SQLAlchemy ORM integration
- ✅ Alembic migrations
- ✅ JWT authentication ready
- ✅ Docker support
Perfect for: RESTful APIs, WebSocket apps, high-performance services
projex create my-api --template fastapiBatteries-included web framework for perfectionists
Features:
- ✅ Django REST Framework
- ✅ Admin panel out of the box
- ✅ ORM with migrations
- ✅ Custom user model ready
- ✅ CORS headers configured
- ✅ Environment variables
- ✅ pytest-django setup
Perfect for: Web applications, admin dashboards, CMS platforms
projex create my-site --template djangoLightweight and flexible web framework
Features:
- ✅ Flask-RESTful
- ✅ Flask-SQLAlchemy
- ✅ Flask-Migrate
- ✅ JWT authentication
- ✅ CORS support
- ✅ Blueprints structure
- ✅ Config management
Perfect for: Simple APIs, prototypes, custom architectures
projex create my-app --template flaskMicro web framework - simple and fast
Features:
- ✅ Single file framework
- ✅ No dependencies (except standard library)
- ✅ Built-in template engine
- ✅ Simple routing
- ✅ Fast and lightweight
- ✅ WSGI compliant
- ✅ Easy to learn
Perfect for: Small APIs, microservices, learning projects
projex create my-service --template bottleFlexible, scalable web framework
Features:
- ✅ URL generation
- ✅ Flexible authentication/authorization
- ✅ Extensible configuration
- ✅ SQLAlchemy integration
- ✅ Traversal and URL dispatch
- ✅ Built-in internationalization
- ✅ Highly modular
Perfect for: Large applications, complex routing, enterprise apps
projex create my-app --template pyramidAsync web framework and networking library
Features:
- ✅ Non-blocking network I/O
- ✅ WebSocket support
- ✅ High performance
- ✅ Asynchronous handlers
- ✅ Built-in authentication
- ✅ Template engine
- ✅ Long polling support
Perfect for: Real-time apps, WebSocket servers, long-polling services
projex create my-realtime --template tornadoFast async framework built on uvloop
Features:
- ✅ Blazing fast performance
- ✅ Async/await syntax
- ✅ Simple routing
- ✅ Class-based views
- ✅ Blueprint support
- ✅ Middleware support
- ✅ WebSocket support
Perfect for: High-performance APIs, async services, real-time apps
projex create my-fast-api --template sanicMinimalist Python web framework
Features:
- ✅ HTTP/1.1-compliant WSGI server
- ✅ Simple object-oriented approach
- ✅ Built-in tools (sessions, auth, caching)
- ✅ Thread-pooled web server
- ✅ Plugin system
- ✅ Configuration system
- ✅ Mature and stable
Perfect for: Embedded applications, traditional web apps, simple services
projex create my-server --template cherrypyAll templates include:
- ✅ Docker and docker-compose setup
- ✅ Database integration ready
- ✅ Testing setup with pytest
- ✅ Environment configuration (.env)
- ✅ CORS support configured
- ✅ Best practices structure
- ✅ README with documentation
- ✅ .gitignore configured
pip install projexgit clone https://github.com/ChAbdulWahhab/projex.git
cd projex
pip install -e .projex createThe CLI will guide you through:
- Project name
- Framework selection
- Database choice
- Authentication method
- Template style
- Additional options
# Simple FastAPI project
projex create my-api --template fastapi
# Complete production-ready setup
projex create my-api \
--template fastapi \
--db postgresql \
--auth jwt \
--style full \
--license mit
# Django with MongoDB
projex create my-site \
--template django \
--db mongodb \
--author "Your Name"
# Minimal Flask app
projex create my-app \
--template flask \
--style minimal \
--no-gitprojex create [PROJECT_NAME] [OPTIONS]
Options:
-t, --template TEXT Framework template
[fastapi|django|flask|bottle|pyramid|tornado|sanic|cherrypy]
-p, --path PATH Directory path (default: current directory)
-a, --author TEXT Author name
-d, --description TEXT Project description
--db TEXT Database type
[postgresql|mysql|mongodb|sqlite|redis]
--style TEXT Template style
[minimal|standard|full]
--auth TEXT Authentication method
[jwt|oauth2|apikey|basic]
--license TEXT License type
[mit|apache|gpl|bsd|unlicense]
--gitignore TEXT Gitignore templates (comma-separated)
Example: python,venv,pycharm,vscode
--no-git Skip git initialization
--no-venv Skip virtual environment creation
--help Show help messageprojex list
# Output shows all 8 frameworks with descriptionsAdd components to your existing project:
# Simple model
projex add model User --fields name:str,email:str,age:int
# Complex model with multiple field types
projex add model Product --fields name:str,price:float,stock:int,is_active:bool,created_at:datetime
# Supported field types:
# str, int, float, bool, date, datetime, list, dict# CRUD endpoints
projex add endpoint users --crud
# Generates: GET, POST, PUT, DELETE endpoints# Synchronous service
projex add service payment
# Asynchronous service
projex add service email --async# CORS middleware
projex add middleware cors
# Authentication middleware
projex add middleware authNote: All projex add commands automatically detect your framework and generate appropriate code!
projex create my-api --template fastapi --auth jwtIncludes:
- Login/register endpoints
- Password hashing with bcrypt
- Token generation and validation
- Protected route examples
- Refresh token support (optional)
projex create my-api --template fastapi --auth oauth2Includes:
- Google OAuth2 integration
- GitHub OAuth2 integration
- User profile endpoints
- Token management
- Environment variable configuration
projex create my-api --template fastapi --auth apikeyIncludes:
- API key generation
- Header-based authentication
- Key rotation support
- Rate limiting ready
projex create my-api --template flask --auth basicIncludes:
- Username/password authentication
- Base64 encoding
- Simple and straightforward
- Good for internal APIs
projex create my-api --template fastapi --db postgresqlIncludes:
- SQLAlchemy ORM configuration
- Alembic migrations
- Connection pooling
- docker-compose with PostgreSQL service
- Environment variables for connection
projex create my-api --template django --db mysqlIncludes:
- MySQL-specific SQLAlchemy config
- Docker setup with MySQL
- Character set configuration
projex create my-api --template fastapi --db mongodbIncludes:
- Motor (async) for FastAPI
- PyMongo for sync frameworks
- Document models
- Connection string configuration
- docker-compose with MongoDB
projex create my-api --template flask --db sqliteIncludes:
- Zero configuration needed
- File-based database
- Perfect for development/testing
- Easy to version control (optional)
projex create my-api --template fastapi --db redisIncludes:
- redis-py configuration
- Caching examples
- Session storage setup
- docker-compose with Redis
projex create my-api --template fastapi --style minimalIncludes:
- Basic project structure
- Essential files only
- No Docker
- Simple configuration
- Perfect for learning
projex create my-api --template fastapi --style standard
# or
projex create my-api --template fastapiIncludes:
- Complete project structure
- Docker and docker-compose
- Testing setup
- Environment configuration
- Production-ready
projex create my-api --template fastapi --style fullIncludes:
- Everything from Standard
- CI/CD configuration
- Documentation setup
- Enhanced testing
- Code quality tools
- Makefile
- Multiple environments
- Maximum batteries included!
Generate CI/CD configurations:
cd my-project
projex add cicd --provider githubGenerates: .github/workflows/ci.yml
Includes:
- Test job (pytest)
- Lint job (black, flake8)
- Build job (Docker)
- Deploy job (commented, ready to customize)
projex add cicd --provider gitlabGenerates: .gitlab-ci.yml
Includes:
- Test stage
- Build stage
- Deploy stage
- Docker image building
projex add cicd --provider circleGenerates: .circleci/config.yml
Includes:
- Workflows
- Jobs (test, build, deploy)
- Orbs integration
Manage multiple environments:
cd my-project
# Create environment files
projex env add development
projex env add staging
projex env add production
projex env add test
# List all environments
projex env list
# Show environment variables (sensitive values masked)
projex env show .env.development
projex env show .env.productionEach environment file includes:
- Database URL
- Secret keys (auto-generated)
- Debug settings
- Environment-specific configs
Manage project dependencies:
cd my-project
projex deps check
# Shows:
# - Current version
# - Latest version
# - Update recommendation# Interactive update (prompts for each package)
projex deps update
# Update specific package
projex deps update --package fastapi
# Update all (auto-confirm)
projex deps update --allprojex deps audit
# Uses pip-audit to check for vulnerabilities
# Shows CVE details and recommendationsAdd documentation to your project:
cd my-project
projex add docs --tool mkdocsGenerates:
docs/directory with structuremkdocs.ymlconfiguration- Material theme setup
- API documentation template
- Getting started guide
Usage:
mkdocs serve # Start local server
mkdocs build # Build static site
mkdocs gh-deploy # Deploy to GitHub Pagesprojex add docs --tool sphinxGenerates:
docs/directory- Sphinx configuration
- ReadTheDocs theme
- API autodoc setup
Usage:
cd docs
make html # Build HTML docs
make clean # Clean build filesAdd advanced testing configuration:
cd my-project
projex add test-config --enhancedAdds:
- pytest.ini - Advanced pytest configuration
- conftest.py - Common fixtures
- Test factories - Factory pattern for test data
- Coverage config - .coveragerc file
- Test markers - unit, integration, slow markers
- Example tests - Best practices examples
Test markers usage:
pytest -m unit # Run only unit tests
pytest -m integration # Run only integration tests
pytest -m "not slow" # Skip slow tests
pytest --cov=app # Run with coverageAdd common development tasks:
cd my-project
projex add makefileGenerated targets:
make install # Install dependencies
make test # Run tests
make test-cov # Run tests with coverage
make run # Start development server
make docker-build # Build Docker image
make docker-up # Start Docker containers
make docker-down # Stop Docker containers
make clean # Clean cache files
make lint # Run linters
make format # Format code
make migrate # Run database migrations (Django/Flask)
make help # Show all commandsFramework-aware: Commands adapt to your framework!
Add pre-commit hooks and linting:
cd my-project
projex add quality-toolsAdds:
- .pre-commit-config.yaml - Pre-commit hooks
- pyproject.toml - Tool configurations
- black - Code formatting
- isort - Import sorting
- flake8 - Linting
- mypy - Type checking
- pylint - Advanced linting
Setup:
pip install -r requirements-dev.txt
pre-commit install
pre-commit run --all-files # Run manuallyValidate your project structure:
cd my-project
projex validate
# or
projex doctor
# Checks:
# ✓ Required files exist
# ✓ Project structure is correct
# ✓ Dependencies are valid
# ✓ No import errors
# ✓ Docker files are configured
# ✓ Tests are runnableGet detailed project stats:
cd my-project
projex info
# Shows:
# - Project name and template
# - Python version
# - Total files and lines of code
# - Dependencies count
# - Last modified date
# - Git status
# - Docker configuration
# - Test count
# - Coverage percentageAdd license during creation:
# MIT License (permissive)
projex create my-api --template fastapi --license mit
# Apache 2.0 (with patent grant)
projex create my-api --template django --license apache
# GPL v3 (copyleft)
projex create my-api --template flask --license gpl
# BSD 3-Clause
projex create my-api --template bottle --license bsd
# Unlicense (public domain)
projex create my-api --template pyramid --license unlicenseGenerate custom .gitignore:
# Multiple templates
projex create my-api \
--template fastapi \
--gitignore python,venv,pycharm,vscode,macos
# Uses gitignore.io API to fetch latest templatesPopular templates:
python- Python-specificvenv- Virtual environmentspycharm- PyCharm IDEvscode- VS Codevisualstudio- Visual Studiomacos- macOS fileswindows- Windows fileslinux- Linux filesnode- Node.js (if using frontend)
my-api/
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── core/
│ │ ├── config.py
│ │ ├── database.py
│ │ └── security.py
│ ├── api/
│ │ └── v1/
│ │ ├── router.py
│ │ └── endpoints/
│ │ ├── users.py
│ │ └── items.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── user.py
│ ├── schemas/
│ │ ├── __init__.py
│ │ └── user.py
│ └── services/
│ └── __init__.py
├── tests/
│ ├── conftest.py
│ ├── test_main.py
│ └── api/
│ └── test_users.py
├── .env.example
├── .gitignore
├── .pre-commit-config.yaml (if quality-tools added)
├── Dockerfile
├── docker-compose.yml
├── Makefile (if generated)
├── pytest.ini
├── requirements.txt
├── requirements-dev.txt
└── README.md
my-site/
├── config/
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
├── apps/
│ ├── __init__.py
│ └── core/
│ ├── __init__.py
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ ├── admin.py
│ ├── serializers.py
│ └── tests.py
├── static/
├── media/
├── templates/
├── manage.py
├── .env.example
├── .gitignore
├── Dockerfile
├── docker-compose.yml
├── pytest.ini
├── requirements.txt
└── README.md
my-app/
├── app/
│ ├── __init__.py
│ ├── config.py
│ ├── api/
│ │ ├── __init__.py
│ │ └── routes.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── user.py
│ ├── schemas/
│ │ └── __init__.py
│ └── services/
│ └── __init__.py
├── tests/
│ ├── conftest.py
│ └── test_api.py
├── migrations/
├── run.py
├── .env.example
├── .gitignore
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── README.md
projex create production-api \
--template fastapi \
--db postgresql \
--auth jwt \
--style full \
--license mit \
--gitignore python,venv,pycharm,vscode
cd production-api
projex add cicd --provider github
projex add docs --tool mkdocs
projex add quality-tools
projex env add staging
projex env add production# User Service
projex create user-service --template fastapi --db postgresql
# Order Service
projex create order-service --template fastapi --db postgresql
# Payment Service
projex create payment-service --template fastapi --db redisprojex create my-app \
--template django \
--db mysql \
--auth oauth2 \
--style full
cd my-app
projex add cicd --provider gitlab
projex add docs --tool sphinxcd my-project
docker-compose updocker build -t my-app:latest .
docker run -p 8000:8000 --env-file .env.production my-app:latest# docker-compose automatically starts database service
docker-compose up
# Your app connects to database automatically via DATABASE_URLcd my-project
source venv/bin/activate
# Install dev dependencies
pip install -r requirements-dev.txt
# Run all tests
pytest
# With coverage
pytest --cov=app --cov-report=html
# Open coverage report
open htmlcov/index.html# Unit tests only
pytest -m unit
# Integration tests only
pytest -m integration
# Skip slow tests
pytest -m "not slow"
# Verbose output
pytest -v
# Stop on first failure
pytest -xWe welcome contributions! Please see CONTRIBUTING.md for details.
# Clone repository
git clone https://github.com/ChAbdulWahhab/projex.git
cd projex
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install in editable mode
pip install -e .
pip install -r requirements-dev.txt
# Run tests
pytest
# Install pre-commit hooks
pre-commit installThis project is licensed under the MIT License - see the LICENSE file for details.
- Built with Click for CLI
- Rich for beautiful terminal output
- Jinja2 for templating
- Framework logos and inspiration from respective communities
- 📧 Email: ch.abdul.wahhab@proton.me
- 💬 Discussions: GitHub Discussions
- 🐛 Bug Reports: GitHub Issues
- 📖 Documentation: Full Docs
- 8 Framework templates
- 5 Database options
- 4 Authentication methods
- 3 Template styles
- Smart scaffolding system
- CI/CD pipeline generation
- Environment management
- Dependency management
- Documentation setup
- Enhanced testing
- Code quality tools
- Project validation
- License selection
- Smart gitignore
- Frontend templates (React, Vue, Svelte)
- GraphQL templates
- Kubernetes deployment files
- Terraform configurations
- API Gateway templates
- Message queue integration (RabbitMQ, Kafka)
- Monitoring setup (Prometheus, Grafana)
- Plugin system
- Template marketplace
- Templates: 8 frameworks
- Databases: 5 options
- Auth Methods: 4 types
- CI/CD Providers: 3 platforms
- Commands: 15+ commands
- Active Users: Growing daily!
- GitHub Stars: ⭐ Give us a star!
If you find Projex helpful, please consider:
- ⭐ Starring the repository
- 🐦 Sharing on social media
- 📝 Writing a blog post
- 🤝 Contributing code
- 💬 Joining discussions
Made with ❤️ by Ch. Abdul Wahab
Project Link: https://github.com/ChAbdulWahhab/projex
PyPi Link: https://pypi.org/project/projex-cli/
Happy coding! 🚀
