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.
โจ 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.ymlwith service definitionsDockerfilefor 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca2a5be539635aa23f32e3156e7a1b8edafc7a7dc67ed3f4521c38d9bf41d214
|
|
| MD5 |
c0b899635a4ce21151a3816876f57439
|
|
| BLAKE2b-256 |
e9b0abd99ba8b62792dcdc1d86f02965cae4635b602fe5ff47128eac48d32592
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac6cfb413d0f85a7637977a6a943bb848e9c96a8a3910eef0cd2bef416926c1d
|
|
| MD5 |
0a68ab8a350d7b565bb656f4f2cbd985
|
|
| BLAKE2b-256 |
c27884efa7573dd2e7aeb0dcfbefe2374cb10c5e4e8e8b418796ca84e3988fcb
|