Metadata-Version: 2.5
Name: fastapi-init-cli
Version: 1.0.2
Summary: A production-ready interactive CLI generator for modern FastAPI backends.
Author: FastAPI Init Team
License: MIT
License-File: LICENSE
Keywords: async,cli,fastapi,generator,jwt,oauth,scaffold,sqlalchemy
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.10
Requires-Dist: email-validator>=2.1.0
Requires-Dist: jinja2>=3.1.3
Requires-Dist: pydantic[email]>=2.7.0
Requires-Dist: questionary>=2.0.1
Requires-Dist: rich>=13.7.0
Requires-Dist: typer[all]>=0.12.0
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Requires-Dist: twine>=5.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# fastapi-init-cli 🚀

> An interactive, production-ready CLI tool to scaffold modern FastAPI backends in seconds.

[![PyPI version](https://img.shields.io/pypi/v/fastapi-init-cli.svg)](https://pypi.org/project/fastapi-init-cli/)
[![Python versions](https://img.shields.io/pypi/pyversions/fastapi-init-cli.svg)](https://pypi.org/project/fastapi-init-cli/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## ✨ Features

- **Async-First & Sync Support**: Async SQLAlchemy 2.0 (`asyncpg`, `aiomysql`, `aiosqlite`) or standard Sync.
- **Multiple Databases**: PostgreSQL, MySQL, and SQLite.
- **Modular Authentication**:
  - JWT (Access & Refresh tokens with Bearer auth)
  - Google OAuth 2.0 integration
  - OTP-based Email Verification
  - OTP-based Forgot & Reset Password flow
  - Secure bcrypt password hashing
- **Clean Architecture**:
  - `app/core/` (Pydantic v2 settings, database session dependency, security)
  - `app/models/` (SQLAlchemy 2.0 models)
  - `app/schemas/` (Pydantic v2 request/response schemas)
  - `app/services/` (Clean business logic layer)
  - `app/routes/` (Versioned FastAPI routers)
- **Database Migrations**: Automatic async/sync Alembic migration setup.
- **Zero Runtime Lock-in**: The scaffolded project is 100% standard FastAPI with no dependency on `fastapi-init-cli`.

---

## 📦 Installation

```bash
pip install fastapi-init-cli
```

---

## 🚀 Quickstart

Run the interactive CLI:

```bash
fastapi-init
```
*(or `fastapi-init-cli`)*

### Interactive Walkthrough:
```text
╭─────────────────────────────────────────────────────────────╮
│                        FastAPI Init                         │
│       Create a production-ready FastAPI backend in seconds.  │
╰─────────────────────────────────────────────────────────────╯

? Project / Folder name: backend
? Select database engine: PostgreSQL
? Select execution architecture: Async
? Do you want authentication? Yes
? Select authentication method: JWT + Google OAuth
? Do you want email verification? (OTP-based) Yes
? Do you want forgot-password functionality? (OTP-based) Yes
? Do you want database migrations with Alembic? Yes
```

Then start your new backend:

```bash
cd backend
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload
```

---

## 🛠️ Development & Contributing

1. Clone the repository:
   ```bash
   git clone https://github.com/your-username/fastapi-init-cli.git
   cd fastapi-init-cli
   ```

2. Install in editable mode with development dependencies:
   ```bash
   pip install -e ".[dev]"
   ```

3. Run tests:
   ```bash
   pytest
   ```

---

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
