Skip to main content

Interactive CLI tool to scaffold production-ready Generative AI projects with customizable tech stacks

Project description

genai-scaffold

genai-scaffold is an interactive Python CLI tool that bootstraps production-ready Generative AI project structures with customizable tech stacks, best practices, and modular organization.

PyPI License


โœจ Features

  • ๐ŸŽฏ Interactive CLI: Choose your tech stack interactively with a beautiful terminal UI
  • ๐Ÿง  Multiple LLM Providers: OpenAI, Anthropic (Claude), Azure OpenAI, or Ollama (local)
  • ๐Ÿ”ง Orchestration Frameworks: LangChain, LlamaIndex, DSPy, or raw Python
  • ๐Ÿ’พ Vector Databases: Pinecone, ChromaDB, Qdrant, or PostgreSQL with pgvector
  • ๐ŸŽจ UI Frameworks: Streamlit, Gradio, FastAPI, or headless
  • ๐Ÿ“ฆ Dependency Management: Poetry or pip (requirements.txt)
  • ๐Ÿณ Docker Support: Automatic docker-compose configuration for local services
  • ๐Ÿ“Š Observability: Optional LangSmith or Weights & Biases integration
  • ๐Ÿงช Testing: Pre-configured pytest setup with example tests
  • ๐Ÿ“ Prompt Management: YAML-based prompt templates with versioning
  • ๐Ÿš€ Production-Ready: Makefile, .env management, logging, and best practices

๐Ÿ“ฆ Installation

You can install it via PyPI:

pip install genai-scaffold

Or using pipx:

pipx install genai-scaffold

๐Ÿš€ Usage

Interactive Mode (Recommended)

Simply run the create command with the --interactive flag or without any arguments:

genai-scaffold create --interactive

Or just:

genai-scaffold create

This will launch an interactive wizard that guides you through selecting:

  • Project name
  • LLM provider (OpenAI, Anthropic, Azure, Ollama)
  • Orchestration framework (LangChain, LlamaIndex, DSPy, None)
  • Vector database (ChromaDB, Pinecone, Qdrant, pgvector)
  • UI framework (Streamlit, Gradio, FastAPI, None)
  • Dependency manager (pip or Poetry)
  • Docker configuration
  • Observability tools

Command-Line Mode

For automation or quick scaffolding, specify all options via flags:

genai-scaffold create my-rag-app \
  --provider openai \
  --orchestrator langchain \
  --vector-db chromadb \
  --ui streamlit \
  --deps pip

Example: Create a RAG App with LangChain and Streamlit

genai-scaffold create my-chatbot \
  --provider anthropic \
  --orchestrator langchain \
  --vector-db pinecone \
  --ui streamlit

Example: Create a DSPy App with Local Models

genai-scaffold create local-ai-app \
  --provider ollama \
  --orchestrator dspy \
  --vector-db chromadb \
  --ui gradio \
  --no-docker

Generated Project Structure

my-rag-app/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ llm/              # LLM client implementation
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ client.py
โ”‚   โ”œโ”€โ”€ prompts/          # Prompt templates and management
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ loader.py
โ”‚   โ”‚   โ””โ”€โ”€ templates.yaml
โ”‚   โ”œโ”€โ”€ utils/            # Utility functions (logging, etc.)
โ”‚   โ”œโ”€โ”€ config.py         # Configuration management
โ”‚   โ”œโ”€โ”€ vector_store.py   # Vector database interface
โ”‚   โ””โ”€โ”€ rag_pipeline.py   # RAG implementation (if orchestrator selected)
โ”œโ”€โ”€ tests/                # Pytest test suite
โ”‚   โ”œโ”€โ”€ conftest.py
โ”‚   โ””โ”€โ”€ test_example.py
โ”œโ”€โ”€ data/                 # Data directories
โ”‚   โ”œโ”€โ”€ cache/
โ”‚   โ”œโ”€โ”€ outputs/
โ”‚   โ””โ”€โ”€ embeddings/
โ”œโ”€โ”€ notebooks/            # Jupyter notebooks (optional)
โ”œโ”€โ”€ app.py                # UI application (Streamlit/Gradio/FastAPI)
โ”œโ”€โ”€ docker-compose.yml    # Docker services (if enabled)
โ”œโ”€โ”€ Dockerfile            # Application container
โ”œโ”€โ”€ .env.example          # Environment variables template
โ”œโ”€โ”€ Makefile              # Common tasks (setup, test, run, etc.)
โ”œโ”€โ”€ requirements.txt      # Python dependencies (or pyproject.toml)
โ”œโ”€โ”€ pytest.ini            # Pytest configuration
โ””โ”€โ”€ README.md             # Project documentation

๐ŸŽฏ Quick Start with Generated Project

After scaffolding your project:

# 1. Navigate to your project
cd my-rag-app

# 2. Set up environment variables
cp .env.example .env
# Edit .env with your API keys

# 3. Install dependencies
make setup
# or: pip install -r requirements.txt

# 4. Start services with Docker (if enabled)
docker-compose up -d

# 5. Run the application
make run

# 6. Run tests
make test

๐Ÿ› ๏ธ Available Commands

Create Command

genai-scaffold create [PROJECT_NAME] [OPTIONS]

Options:

  • --provider: LLM provider (openai, anthropic, azure, ollama)
  • --orchestrator: Framework (langchain, llamaindex, dspy, none)
  • --vector-db: Vector database (pinecone, chromadb, qdrant, pgvector)
  • --ui: UI framework (streamlit, gradio, fastapi, none)
  • --deps: Dependency manager (pip, poetry)
  • --docker/--no-docker: Enable/disable Docker configuration
  • --interactive, -i: Use interactive mode

Version Command

genai-scaffold version

๐Ÿ”ง Tech Stack Options

LLM Providers

  • OpenAI: GPT-4, GPT-3.5, and embedding models
  • Anthropic: Claude 3 (Opus, Sonnet, Haiku)
  • Azure OpenAI: Enterprise-grade OpenAI models
  • Ollama: Local models (Llama 2, Mistral, etc.)

Orchestration Frameworks

  • LangChain: Full-featured LLM framework with chains and agents
  • LlamaIndex: Data framework for LLM applications
  • DSPy: Declarative language model programming
  • None: Raw Python with custom implementation

Vector Databases

  • ChromaDB: Easy-to-use, local-first vector store
  • Pinecone: Managed vector database service
  • Qdrant: High-performance vector search engine
  • pgvector: PostgreSQL extension for vector operations

UI Frameworks

  • Streamlit: Fast way to build data apps
  • Gradio: Quick ML model interfaces
  • FastAPI: Modern, fast API framework
  • None: Headless/CLI application

๐Ÿ“š Generated Features

Prompt Management

The generated projects include a sophisticated prompt management system:

from src.prompts import load_prompt

# Load and format a prompt template
prompt = load_prompt("rag_query", context="...", question="...")

Prompts are stored in src/prompts/templates.yaml with versioning support.

Configuration Management

Environment-based configuration with validation:

from src.config import Config

# Access configuration
api_key = Config.OPENAI_API_KEY
model = Config.OPENAI_MODEL

Logging

Pre-configured logging utilities:

from src.utils import get_logger

logger = get_logger(__name__)
logger.info("Processing request...")

Observability (Optional)

If enabled, automatic tracing with LangSmith or W&B:

from src.observability import trace_llm_call

@trace_llm_call
def my_llm_function():
    # Automatically traced
    pass

๐Ÿงช Testing

Generated projects include a complete test setup:

# Run tests
make test

# Run with coverage
make test-coverage

# Run specific test
pytest tests/test_example.py -v

๐Ÿณ Docker Support

When Docker is enabled, projects include:

  • docker-compose.yml with service definitions
  • Dockerfile for the application
  • Automatic configuration for:
    • ChromaDB server (if selected)
    • Qdrant server (if selected)
    • PostgreSQL with pgvector (if selected)

Start all services:

docker-compose up -d

๐Ÿ”„ Makefile Commands

Generated projects include a Makefile with common tasks:

make setup          # Install dependencies
make test           # Run tests
make test-coverage  # Run tests with coverage
make run            # Run the application
make format         # Format code (black, isort)
make lint           # Run linter (ruff)
make clean          # Clean build artifacts
make docker-up      # Start Docker services (if Docker enabled)
make docker-down    # Stop Docker services

๐Ÿค Contributing

Pull requests are welcome! For major changes, open an issue first to discuss what you'd like to change.


๐Ÿ“„ License

This project is licensed under the MIT License.


๐Ÿ™Œ Acknowledgements

Built for developers who want to quickly scaffold production-ready GenAI applications with best practices and flexibility.

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

genai_scaffold-0.2.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

genai_scaffold-0.2.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file genai_scaffold-0.2.0.tar.gz.

File metadata

  • Download URL: genai_scaffold-0.2.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for genai_scaffold-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ca2a5be539635aa23f32e3156e7a1b8edafc7a7dc67ed3f4521c38d9bf41d214
MD5 c0b899635a4ce21151a3816876f57439
BLAKE2b-256 e9b0abd99ba8b62792dcdc1d86f02965cae4635b602fe5ff47128eac48d32592

See more details on using hashes here.

File details

Details for the file genai_scaffold-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: genai_scaffold-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for genai_scaffold-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac6cfb413d0f85a7637977a6a943bb848e9c96a8a3910eef0cd2bef416926c1d
MD5 0a68ab8a350d7b565bb656f4f2cbd985
BLAKE2b-256 c27884efa7573dd2e7aeb0dcfbefe2374cb10c5e4e8e8b418796ca84e3988fcb

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