Skip to main content

A modern project generator CLI for web frameworks

Project description

AppGen ๐Ÿš€

A modern project generator CLI for web frameworks. Quickly scaffold projects for Next.js, React, Express, Flask, Django, and more with support for TypeScript, Tailwind CSS, databases, and modern tooling.

โœจ Features

  • Multiple Frameworks: Next.js, React, Express, Flask, Django, Svelte
  • Database Support: MongoDB, PostgreSQL, Supabase, AWS DynamoDB
  • Modern Tooling: TypeScript, Tailwind CSS, Prisma ORM, shadcn/ui
  • Interactive CLI: Guided setup with beautiful UI
  • Serverless Ready: AWS SAM templates for serverless deployment (JavaScript, TypeScript, Python, Go)
  • Fullstack Presets: MERN stack, Next.js + Prisma, and more
  • Clean Architecture: Modular, maintainable codebase
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Smart Dependency Install: After project creation, choose and auto-detect your preferred package manager (npm, yarn, pnpm, bun)
  • Editor Detection: Choose your code editor (VS Code, Cursor, Sublime, Atom, Vim, Nano) with installed status shown

๐Ÿ—๏ธ Architecture

AppGen uses a clean, modular architecture for maintainability and extensibility:

appgen/
โ”œโ”€โ”€ __init__.py              # Package initialization
โ”œโ”€โ”€ cli.py                   # Main CLI orchestration
โ”œโ”€โ”€ ui_helper.py             # UI operations and styling
โ”œโ”€โ”€ framework_selector.py    # Framework selection logic
โ””โ”€โ”€ project_manager.py       # Project creation and management

๐Ÿ› ๏ธ Installation

From PyPI (Recommended)

pip install appgen

From Source

# Clone the repository
git clone https://github.com/yourusername/appgen.git
cd appgen

# Create and activate virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Upgrade pip
pip install --upgrade pip

# Install in development mode
pip install -e .

Verify Installation

appgen --help

You should see the CLI help with all available commands.

๐Ÿš€ Quick Start

Interactive Mode (Easiest)

appgen -i
# or
appgen create --interactive

This will guide you through:

  1. Framework selection with beautiful tables
  2. Feature configuration (TypeScript, Tailwind, etc.)
  3. Project directory setup
  4. Project generation with progress indicators

Command Line Mode

# Create a Next.js project with App Router
appgen create --framework nextjs --dir my-app --router app

# Create an Express project with MongoDB
appgen create --framework express --dir my-api --db mongodb

# Create a React project with TypeScript
appgen create --framework reactjs --dir my-react-app --features typescript

๐Ÿ“š Usage Examples

Next.js Projects

# Basic Next.js with App Router
appgen create --framework nextjs --dir my-next-app --router app

# Next.js with TypeScript and Tailwind
appgen create --framework nextjs --dir my-next-app --router app --features typescript,tailwind

# Next.js with Prisma ORM
appgen create --framework nextjs --dir my-next-app --router app --features typescript,prisma

# Next.js with shadcn/ui components
appgen create --framework nextjs --dir my-next-app --router app --features shadcn

# Next.js with t3 stack (TypeScript + Tailwind + tRPC)
appgen create --framework nextjs --dir my-next-app --router app --features t3

Express.js Projects

# Basic Express server
appgen create --framework express --dir my-api

# Express with MongoDB
appgen create --framework express --dir my-api --db mongodb

# Express with PostgreSQL
appgen create --framework express --dir my-api --db postgresql

# Express with Supabase
appgen create --framework express --dir my-api --db supabase

# Express with AWS Lambda (serverless)
appgen create --framework express --dir my-api --db serverless

React Projects

# Basic React app
appgen create --framework reactjs --dir my-react-app

# React with TypeScript
appgen create --framework reactjs --dir my-react-app --features typescript

# React with Tailwind CSS
appgen create --framework reactjs --dir my-react-app --features tailwind

# React with both TypeScript and Tailwind
appgen create --framework reactjs --dir my-react-app --features typescript,tailwind

Python Projects

# Flask application
appgen create --framework flask --dir my-flask-app

# Django application
appgen create --framework django --dir my-django-app

Svelte Projects

# Svelte application
appgen create --framework svelte --dir my-svelte-app

Fullstack Presets

# MERN Stack (MongoDB + Express + React + Node.js)
appgen preset mern --dir my-mern-app

# Next.js Fullstack with Prisma
appgen preset nextjs-fullstack --dir my-nextjs-app

Serverless Projects

# JavaScript (Node.js) serverless
appgen create --framework serverless --language javascript --dir my-serverless-js

# TypeScript serverless
appgen create --framework serverless --language typescript --dir my-serverless-ts

# Python serverless
appgen create --framework serverless --language python --dir my-serverless-py

# Go serverless
appgen create --framework serverless --language go --dir my-serverless-go

๐Ÿ“‹ Available Commands

# List all available frameworks and features
appgen list-frameworks

# Show current configuration
appgen config

# Create a new project
appgen create [OPTIONS]

# Generate from preset
appgen preset [OPTIONS]

# Interactive mode (shortcut)
appgen -i

# Show help for any command
appgen --help
appgen create --help
appgen preset --help

๐ŸŽฏ Available Frameworks

Interactive Frameworks

  • Next.js: App Router & Pages Router, TypeScript, Tailwind, Prisma, shadcn/ui, t3
  • React: TypeScript, Tailwind CSS

Simple Frameworks

  • Express.js: MongoDB, PostgreSQL, Supabase, AWS Lambda (serverless)
  • Flask: Lightweight Python web framework
  • Django: Full-featured Python web framework
  • Svelte: Cybernetically enhanced web apps

๐Ÿ—„๏ธ Database Support

Express.js Databases

  • MongoDB: NoSQL database with Mongoose ODM
  • PostgreSQL: Relational database with Sequelize ORM
  • Supabase: Open-source Firebase alternative
  • AWS DynamoDB: Serverless NoSQL database (with SAM template)

๐ŸŽจ Features & Integrations

Next.js Features

  • App Router: Next.js 13+ App Router
  • Pages Router: Traditional Pages Router
  • TypeScript: Full TypeScript support
  • Tailwind CSS: Utility-first CSS framework
  • Prisma: Modern database toolkit
  • shadcn/ui: Re-usable component library
  • t3: Type-safe full-stack development with tRPC

React Features

  • TypeScript: Type-safe development
  • Tailwind CSS: Utility-first styling
  • Vite: Fast build tool

๐Ÿ—๏ธ Generated Project Structure

After generation, your project will include:

my-project/
โ”œโ”€โ”€ README.md           # Project documentation
โ”œโ”€โ”€ package.json        # Dependencies and scripts
โ”œโ”€โ”€ .env.example        # Environment variables template
โ”œโ”€โ”€ .gitignore          # Git ignore rules
โ”œโ”€โ”€ tsconfig.json       # TypeScript config (if applicable)
โ”œโ”€โ”€ tailwind.config.js  # Tailwind config (if applicable)
โ””โ”€โ”€ src/                # Source code
    โ”œโ”€โ”€ components/     # Reusable components
    โ”œโ”€โ”€ pages/          # Pages (Next.js Pages Router)
    โ”œโ”€โ”€ app/            # App directory (Next.js App Router)
    โ”œโ”€โ”€ lib/            # Utility functions
    โ””โ”€โ”€ ...

๐Ÿš€ Next Steps

After creating your project:

cd my-project
# For JS/TS: You will be prompted to install dependencies interactively with your choice of npm, yarn, pnpm, or bun (auto-detected)
# For Python: pip install -r requirements.txt
# For Go: go mod tidy
npm run dev  # or python run.py for Python projects

๐Ÿ–ฅ๏ธ Editor and Package Manager Selection

After project generation (in interactive mode):

  • Editor Selection: Choose from Visual Studio Code, Cursor, Sublime Text, Atom, Vim, or Nano. The selection table shows an 'Installed?' column (โœ…/โŒ) so you can only select editors that are available on your system.
  • Package Manager Selection: For JS/TS projects, you are prompted to install dependencies. Choose from npm, yarn, pnpm, or bun. Only installed package managers are shown.

Example editor selection table:

# Editor Command Installed?
1 Visual Studio Code code โœ…
2 Cursor cursor โœ…
3 Sublime Text subl โŒ
4 Atom atom โŒ
5 Vim vim โœ…
6 Nano nano โœ…

If you select an editor that is not installed, you will be prompted to choose again.

Example package manager selection:

# Package Manager Installed?
1 npm โœ…
2 yarn โŒ
3 pnpm โœ…
4 bun โŒ

Only installed package managers are available for selection.

๐Ÿ”ง Development

Local Development Setup

# Clone the repository
git clone https://github.com/yourusername/appgen.git
cd appgen

# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Upgrade pip
pip install --upgrade pip

# Install development dependencies (includes pre-commit hooks)
make install-dev

# Test the CLI
appgen --help
appgen list-frameworks

Development Commands

make help              # Show all available commands
make install           # Install package in development mode
make install-dev       # Install development dependencies
make test              # Run tests with coverage
make lint              # Run linting checks
make format            # Format code
make security          # Run security checks
make clean             # Clean build artifacts
make build             # Build package
make ci                # Run all CI checks locally
make pre-commit        # Run pre-commit hooks on all files

Code Quality Tools

  • Black: Code formatting
  • isort: Import sorting
  • flake8: Linting
  • mypy: Type checking
  • bandit: Security checks
  • pre-commit: Git hooks for code quality
  • commitizen: Conventional commit messages

Testing

# Test project generation
appgen create --framework flask --dir test-flask
appgen create --framework express --dir test-express --db mongodb

# Clean up test projects
rm -rf test-flask test-express

Building for Distribution

# Build package
python -m build

# Install from local build
pip install dist/appgen-*.whl

# Test installed package
appgen --help

Contributing

We welcome contributions! Please see our Contributing Guide for detailed information.

Quick start:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Install development dependencies (make install-dev)
  4. Make your changes
  5. Run tests (make test) and linting (make lint)
  6. Commit using conventional commits (cz commit)
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

CI/CD Pipeline

We use GitHub Actions for continuous integration:

  • Tests: Run on Python 3.8-3.12
  • Linting: Code style and type checking
  • Security: Automated security scans
  • Integration Tests: Test all framework generations
  • Build: Package building and validation
  • Release: Automated PyPI publishing on tags

See .github/workflows/ for workflow details.

๐Ÿ› Troubleshooting

Common Issues

CLI not found after installation:

# Reinstall in editable mode
pip uninstall appgen -y
pip install -e .

Virtual environment issues:

# Remove and recreate virtual environment
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Permission errors:

# Use user installation
pip install --user appgen

๐Ÿ“ License

MIT License - see LICENSE file for details.

๐Ÿค Support

๐Ÿ™ Acknowledgments

  • Built with Typer for CLI
  • Beautiful UI with Rich
  • Inspired by modern project generators

Happy coding! ๐ŸŽ‰

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

appgen-0.3.3.tar.gz (9.8 MB view details)

Uploaded Source

Built Distribution

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

appgen-0.3.3-py3-none-any.whl (9.8 MB view details)

Uploaded Python 3

File details

Details for the file appgen-0.3.3.tar.gz.

File metadata

  • Download URL: appgen-0.3.3.tar.gz
  • Upload date:
  • Size: 9.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for appgen-0.3.3.tar.gz
Algorithm Hash digest
SHA256 fd5eff322a326cd8e3140e4f8409a25673a70642d07f9cae36f7bf8c10404310
MD5 8e5f20963fc2b42528cae47277a18fb0
BLAKE2b-256 13d6bbfb76062fc482aa28d0b0426731e7f9c15a443962857698a2be9e59ca4a

See more details on using hashes here.

File details

Details for the file appgen-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: appgen-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 9.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for appgen-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 34c97bfe9e7de11d6029de35706f61bf43a40c0a471c7c28a56f2f00460e4666
MD5 c19da33fb2fc8a771a663892e2e72325
BLAKE2b-256 3ec7359c9c157a0d16ad65b272ef507f555c0449f987db59f0a0ae636e6c2cc8

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