WARNING: These docs are not yet updated and do not reflect the actual Flite documentation as of Sep. 25, 2025.
-->

Flite Documentation

A Python CLI tool for generating Flask applications with modern best practices.

v2.0 Python 3.8+ Flask
๐Ÿš€

Installation

Flite is a Python CLI tool for generating Flask projects. Since it's currently in development, you'll need to install it from source.

Terminal
# Clone the repository
git clone https://github.com/Artbyo3/flite.git
cd flite

# Install in development mode
pip install -e .

Note

Make sure you have Python 3.8+ installed and pip available.

Verify Installation

Check if Flite is installed correctly:

Terminal
flite --version
โšก

Quick Start

Create your first Flask project in under 2 minutes.

1

Initialize Project

Create a new Flask project with Flite's default template.

flite create
2

Navigate to Project

Move into your project directory and explore the structure.

cd my-project
3

Run Development Server

Start the development server and see your app in action.

flite run

Success!

Your Flask application is now running at http://localhost:5000. Open your browser and start building!

๐Ÿ“

Project Structure

Understanding the default project structure created by Flite.

Project Structure
my-project/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ views/
โ”‚   โ”œโ”€โ”€ templates/
โ”‚   โ””โ”€โ”€ static/
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ config.py
โ”œโ”€โ”€ run.py
โ””โ”€โ”€ README.md
๐Ÿ“ฆ

app/

Main application package containing all your Flask code

๐Ÿ—ƒ๏ธ

models/

Database models and data structures

๐ŸŽฏ

views/

Route handlers and business logic

๐ŸŽจ

templates/

Jinja2 HTML templates

๐Ÿ“„

static/

CSS, JavaScript, and image assets

๐Ÿงช

tests/

Unit and integration tests

โšก

Commands

Complete reference of all available Flite CLI commands.

flite init

Core

Initialize a new Flask project with the specified template.

flite init <project-name> [options]

Options:

  • --template Specify template to use
  • --database Database type (sqlite, postgresql, mysql)
  • --auth Include authentication system

flite run

Development

Start the Flask development server with hot reload.

flite run [options]

Options:

  • --host Host to bind to (default: 127.0.0.1)
  • --port Port to bind to (default: 5000)
  • --debug Enable debug mode

flite generate

Utility

Generate additional components for your existing project.

flite generate [component] [--name NAME]

Components:

  • model Create a new database model
  • view Generate a new view/route
  • template Create a new HTML template

flite build

Production

Build the application for production deployment.

flite build [options]

Options:

  • --optimize Optimize assets and code
  • --minify Minify CSS and JavaScript
  • --output Output directory
๐Ÿ“‹

Templates

Choose from our pre-built templates to get started quickly with different types of Flask applications.

๐ŸŒ

Web Application

Complete web application with frontend templates, static files, and responsive design.

๐Ÿ”Œ

API Only

RESTful API with authentication, serialization, and comprehensive error handling.

โšก

Full Stack

Complete full-stack application with frontend, backend, and database integration.

โš™๏ธ

Configuration

Customize your Flask application with flexible configuration options.

Configuration File

Flite generates a comprehensive configuration file for your project:

config.py
import os

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key'
    SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///app.db'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    
class DevelopmentConfig(Config):
    DEBUG = True
    
class ProductionConfig(Config):
    DEBUG = False
๐Ÿ”ง

Troubleshooting

Common issues and their solutions to help you get unstuck.

ImportError: No module named 'flite'

Solution: Make sure Flite is installed in your current Python environment. Try running pip install flite or check your virtual environment activation.

Port 5000 already in use

Solution: Use a different port with flite serve --port 5001 or stop the process using port 5000.

Database connection errors

Solution: Check your database configuration in config.py and ensure your database server is running.