Skip to main content

A developer-friendly scaffolding CLI for FastAPI and LangChain/LangGraph projects

Project description

⚒ AppGenerator CLI

CI PyPI version pytest

Scaffold production-ready Python projects in seconds — powered by uv.

CI runs uv run pytest tests/ -v --tb=short on Python 3.10, 3.11, and 3.12.

$ app-generator-cli create fastapi my_api
$ app-generator-cli create fastapi-with-frontend my_web_app --docker
$ app-generator-cli create ai my_ai_app --docker --postgres

Installation

pip install app-generator-cli
# or, with uv (recommended):
uv tool install app-generator-cli

Verify:

app-generator-cli --version

Commands

app-generator-cli create fastapi <name>

Scaffold a FastAPI backend.

Flag Description
--docker Add Dockerfile + docker-compose.yml
--postgres Use PostgreSQL (asyncpg) instead of SQLite
--redis Add Redis client (redis)
--output PATH Create the project in a custom directory

Example:

app-generator-cli create fastapi my_api --docker --postgres --redis
cd my_api
cp .env.example .env
uv run uvicorn app.main:app --reload

app-generator-cli create fastapi-with-frontend <name>

Scaffold a FastAPI + Jinja2 frontend project.

Flag Description
--docker Add Dockerfile + docker-compose.yml
--postgres Use PostgreSQL (asyncpg) instead of SQLite
--redis Add Redis client (redis)
--output PATH Create the project in a custom directory

Example:

app-generator-cli create fastapi-with-frontend my_web_app --docker
cd my_web_app
cp .env.example .env
uv run uvicorn app.main:app --reload
# open http://localhost:8000/ and http://localhost:8000/docs

app-generator-cli create ai <name>

Scaffold a LangChain / LangGraph AI application.

Flag Description
--docker Add Dockerfile + docker-compose.yml
--postgres Add pgvector PostgreSQL support
--redis Add Redis semantic cache
--output PATH Create the project in a custom directory

Example:

app-generator-cli create ai my_assistant --docker
cd my_assistant
cp .env.example .env   # add your OPENAI_API_KEY
uv run python main.py

Generated Project Structure

FastAPI

my_api/
├── app/
│   ├── main.py          # Application factory
│   ├── config.py        # Pydantic Settings
│   ├── dependencies.py  # FastAPI deps (DB session, etc.)
│   ├── api/v1/
│   │   └── health.py    # Health-check endpoint
│   ├── models/
│   │   └── base.py      # SQLModel base with timestamps
│   └── db/
│       └── session.py   # Async session factory
├── tests/
│   ├── conftest.py      # Async test client + DB fixtures
│   └── test_health.py
├── .env.example
├── .gitignore
├── pyproject.toml
├── Dockerfile           # (--docker)
└── docker-compose.yml   # (--docker)

AI (LangChain / LangGraph)

my_assistant/
├── main.py              # Interactive REPL
├── app/
│   ├── config.py        # Pydantic Settings
│   ├── agents/
│   │   └── assistant.py # LangGraph ReAct agent
│   ├── chains/
│   │   └── rag.py       # RAG chain example
│   └── tools/
│       ├── registry.py  # Tool registry
│       └── search.py    # Web search tool stub
├── tests/
│   └── test_agent.py
├── .env.example
├── .gitignore
├── pyproject.toml
├── Dockerfile           # (--docker)
└── docker-compose.yml   # (--docker)

FastAPI + Jinja Frontend

my_web_app/
├── app/
│   ├── main.py                    # App + homepage route
│   ├── templates/
│   │   ├── base.html              # Base layout
│   │   ├── index.html             # Homepage
│   │   └── partials/
│   │       ├── header.html        # Shared header
│   │       └── footer.html        # Shared footer
│   ├── api/v1/
│   │   └── health.py
│   └── ...                        # config/db/models/dependencies
├── tests/
│   ├── test_health.py
│   └── test_frontend.py
├── .env.example
├── pyproject.toml
├── Dockerfile                     # (--docker)
└── docker-compose.yml             # (--docker)

Packaging & Publishing to PyPI

1. Build

# Install build tools
pip install build twine

# Build wheel + sdist
python -m build
# Outputs: dist/app-generator-cli-0.1.0-py3-none-any.whl
#          dist/app-generator-cli-0.1.0.tar.gz

2. Test on TestPyPI

twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ app-generator-cli

3. Publish to PyPI

twine upload dist/*

Or with uv:

uv build
uv publish

Development Setup

git clone https://github.com/yourname/app-generator-cli
cd app-generator-cli

uv venv
uv sync --dev

# Run locally
uv run app-generator-cli --help

# Tests
uv run pytest

# Lint
uv run ruff check .
uv run ruff format .

Requirements

  • Python ≥ 3.10
  • uv installed on the system (for generated project env management)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

app_generator_cli-1.0.2.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

app_generator_cli-1.0.2-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

Details for the file app_generator_cli-1.0.2.tar.gz.

File metadata

  • Download URL: app_generator_cli-1.0.2.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for app_generator_cli-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d3e5b1e5f34a1e6c9236764c70e33f5726119288b0c7813a7b027a6f3bbd59ae
MD5 59cbc470610f304ff0a8e20ca008acc0
BLAKE2b-256 8f4c48a931109655b388ae926e03da9a15e424f43d35080f51611703f92d97bb

See more details on using hashes here.

File details

Details for the file app_generator_cli-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: app_generator_cli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for app_generator_cli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8ba04fabba01db7ce5165091fd0060def0f9f97c46125af53a9f4c6fc150ea98
MD5 a77958cc7f76b628d5d041d1ba525542
BLAKE2b-256 ac49a5e5db4dc54a8ba8c33d4853419d9a0cf1f57630ee731406256b0f64ef2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page