Skip to content

syed-mujtaba-stack/setupci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

setupci logo

Stop setting up boilerplate from scratch. Launch your next production-ready Python project in seconds with zero configuration.

PyPI version Tests status Python Versions License: MIT GitHub Stars Downloads


✨ Features

  • πŸ’» Interactive CLI Interface β€” Elegant, user-friendly interactive prompt powered by questionary and styled with rich.
  • πŸ“¦ Package Manager Selection β€” Choose between pip, uv, or Poetry to manage project dependencies automatically.
  • ⚑ Framework Support β€” FastAPI, Flask, Django, Litestar, Sanic, and Masonite templates out-of-the-box.
  • πŸ—οΈ Professional Backend Structure β€” Generate comprehensive production-ready layouts that separate configuration, routing, schemas, and databases.
  • πŸ”‘ Authentication Integration β€” Pre-configured JWT or OAuth2 flows for FastAPI, Flask, and Django backends.
  • πŸ—„οΈ Interactive Database Auto-Setup β€” Choose SQLite, PostgreSQL, or MySQL; dependencies and environment variables get configured automatically.
  • βš›οΈ Frontend Pairing β€” Bootstrap a Vite React/Vue 3/Svelte or Next.js App Router frontend alongside your backend automatically with a gorgeous, dark-themed premium landing page.
  • πŸ“‚ Multi-folder Generation β€” Generates separate backend/ and frontend/ directories at the workspace root when pairing backend and frontend, and sets up root orchestration files (docker-compose.yml, README.md, .gitignore).
  • πŸ€– AI-Powered Templates β€” Initialize custom structures based on conversational prompts using Google Gemini.
  • 🐳 Docker Ready β€” Fully-featured multi-stage Dockerfile configurations included automatically.
  • βš™οΈ Zero Boilerplate β€” Get linting, testing, and dependency configurations setup automatically.

πŸ“¦ Installation

To get started, install setupci from PyPI using pip:

pip install setupci

πŸ”„ Keep Up-to-date

Upgrade to the latest version to get the newest features and templates:

pip install --upgrade setupci

πŸš€ Usage

Navigate to your workspace and initialize a new project in the current directory (or specify a subfolder):

setupci init .

πŸ”„ Interactive Workflow

Once the CLI starts, it walks you through your project choices:

  1. Framework Selection β€” Choose between FastAPI, Flask, Django, Litestar, Sanic, Masonite, or General Python.
  2. Package Manager Selection β€” Choose between pip (with requirements.txt), uv, or Poetry.
  3. Project Type Selection β€”
    • Backend: Generates a professional structure with Docker configurations, databases, linting, and CRUD examples.
    • Simple: A streamlined single-file entrypoint ideal for quick scripts or lightweight services.
  4. Database Selection (Only for Backend types) β€” Choose between SQLite, PostgreSQL, or MySQL.
  5. Authentication Selection (Only for FastAPI, Flask, and Django Backend types) β€” Select None, JWT, or OAuth2 flows.
  6. Frontend Selection (Only for Backend types) β€” Choose None, React, Vue, Svelte, or Next.js.

πŸ“ Note: If a frontend is selected, setupci will generate separate backend/ and frontend/ directories in your workspace, plus root-level docker-compose.yml, .gitignore, and README.md files to run both services together easily.


πŸ’» Terminal Demo

Below is an example of what running setupci init looks like in your terminal:

$ setupci init .

 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—
 β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
 β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
 β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•   β•šβ•β•    β•šβ•β•β•β•β•β• β•šβ•β•      β•šβ•β•β•β•β•β•β•šβ•β•

                 Python Project Bootstrapper  β€’  v0.2.0

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ πŸš€ Getting Started ──────────────────────────────┐
β”‚ Answer a few questions and your project structure will be ready in seconds.      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

? Which framework would you like to use? FastAPI
? Which package manager would you like to use? uv
? Which project type would you like? Backend
? Which database would you like to configure? PostgreSQL
? Would you like to add Authentication? JWT
? Would you like to pair this backend with a frontend? Next.js

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ πŸ“‹ Project Summary ───────────────────────────────┐
β”‚  Framework:        FastAPI                                                      β”‚
β”‚  Package Manager:  uv                                                           β”‚
β”‚  Type:             Backend                                                      β”‚
β”‚  Database:         PostgreSQL                                                   β”‚
β”‚  Auth:             JWT                                                          β”‚
β”‚  Frontend:         Next.js                                                      β”‚
β”‚  Location:         E:\my-new-project                                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β ‹ Generating project files...
βœ“ Your FastAPI backend project is ready!

πŸ—‚οΈ Generated Structures

setupci designs clean layouts adhering to industry standards. Here is what gets generated:

⚑ FastAPI β€” Backend

A clean modular design using Pydantic, SQLAlchemy, and dependency injection.

app/
β”œβ”€β”€ main.py                # App entrypoint with middleware, routing, & setup
β”œβ”€β”€ core/
β”‚   └── config.py          # Settings management loading configs from .env using Pydantic
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ router.py          # Global API router aggregating separate endpoints
β”‚   └── endpoints/
β”‚       └── items.py       # Implements complete mock CRUD endpoints (GET, POST, etc.)
β”œβ”€β”€ models/
β”‚   └── item.py            # SQLAlchemy Database model definitions
β”œβ”€β”€ schemas/
β”‚   └── item.py            # Pydantic schemas validating API payloads
└── db/
    └── session.py         # DB connection setup and SessionLocal generator
requirements.txt           # Main API dependencies
Dockerfile                 # Multi-stage Docker build config
.env.example               # Template database and system environment variables

🌢️ Flask β€” Backend

A structure implementing the flask factory pattern, Blueprints, and Flask-SQLAlchemy.

app/
β”œβ”€β”€ __init__.py            # Application factory setup & extension loading
β”œβ”€β”€ config.py              # Configuration classes (Development, Production)
β”œβ”€β”€ api/
β”‚   └── items.py           # Blueprint definition mapping API routes
└── models/
    └── item.py            # Database model mapping using Flask-SQLAlchemy
wsgi.py                    # Entry point script to run the server
requirements.txt           # Web server, Flask, and DB drivers
Dockerfile                 # Gunicorn-based production Docker setup
.env.example               # Flask configurations template

🎸 Django β€” Backend

A modernized Django layout splitting apps, tracking settings with django-environ, and API-ready with DRF.

config/
β”œβ”€β”€ settings.py            # Core settings reading environment values from .env
β”œβ”€β”€ urls.py                # Main URL configurations
β”œβ”€β”€ wsgi.py                # WSGI entrypoint for web servers
└── asgi.py                # ASGI entrypoint for async channels or servers
apps/
└── items/                 # Pre-configured DRF API App
    β”œβ”€β”€ models.py          # Sample DB model definitions
    β”œβ”€β”€ views.py           # REST views implementing ModelViewSet
    β”œβ”€β”€ serializers.py     # Serializers converting model data to JSON
    └── urls.py            # App-level routing definitions
manage.py                  # Django execution utility
requirements.txt           # Django + DRF and dependencies
Dockerfile                 # Lightweight container setup for deployment
.env.example               # Configurable Django secret key and DB environment settings

🐍 General Python β€” Backend

A standard workspace ready for library publication or tool development.

src/
β”œβ”€β”€ __init__.py            # Main package initializer
└── main.py                # Main execution script
tests/
└── test_main.py           # Standard pytest script
pyproject.toml             # Modern setup configuration for packaging/publishing
README.md                  # Basic user guide for the created package

βš›οΈ Fullstack Layout (Backend + Frontend)

When pairing a backend with a frontend (e.g. Next.js, React, Vue, Svelte), a clean separated structure is generated.

my-project/
β”œβ”€β”€ backend/               # Backend API project (FastAPI, Flask, Django, etc.)
β”‚   β”œβ”€β”€ app/               # Source code
β”‚   β”œβ”€β”€ Dockerfile         # Backend container config
β”‚   └── requirements.txt   # Python dependencies
β”œβ”€β”€ frontend/              # Frontend web application (Next.js, React, Vue, Svelte)
β”‚   β”œβ”€β”€ app/ or src/       # Frontend UI pages & components
β”‚   β”œβ”€β”€ package.json       # JS dependencies & scripts
β”‚   └── README.md          # Setup guide
β”œβ”€β”€ docker-compose.yml     # Orchestrates both services for easy local execution
β”œβ”€β”€ .gitignore             # Root-level ignore entries
└── README.md              # Root setup instructions

❔ Why setupci?

Developers spend too much time repeating the same boilerplate setups. setupci bridges this gap:

  • πŸ•’ Saves Time: Avoid copying config files, writing database connections, or creating dockerfiles. Get to coding in 5 seconds.
  • πŸ›‘οΈ Production-Ready: Implements industry best-practices such as configuration-code separation, factory patterns, environment variables, and Docker containerization.
  • πŸ”° Beginner & Pro Friendly: Gives beginners a clear architecture to build on, and professionals a consistent, zero-fluff starter template.

πŸ—ΊοΈ Roadmap

We are constantly improving setupci. Check out our planned roadmap:

  • Database Scaffolding β€” Auto-configure SQLite, PostgreSQL, or MySQL (MongoDB/others planned).
  • Authentication Integration β€” Bootstrap JWT/OAuth2 flows out-of-the-box.
  • AI-Powered Templates β€” Prompt-to-structure project initialization.
  • Full-stack Support β€” Pair backend frameworks with React, Vue, or Svelte frontends.
  • Extended Frameworks β€” Support for Litestar, Sanic, and Masonite.
  • Extended Authentication β€” Support for Auth0, Cognito, and Firebase Auth.

🀝 Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please see our CONTRIBUTING.md to understand details on submitting PRs, setting up local tests, and reporting bugs.


πŸ“ License

Distributed under the MIT License. See LICENSE for more information.


πŸ”— Links

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors