Skip to main content

A set of command line tools that help you scaffold out your flask application quickly.

Project description

Flask-Commands logo Flask-Commands

pypi tests coverage docs license stars

Flask-Commands is a local-first CLI that scaffolds Flask projects and automates the wiring between views, routes, controllers, and models so you ship faster with consistent structure.

Getting Started

Flask-Commands bundles opinionated, productivity-focused generators:

  • flask new boots a ready-to-run Flask project with virtualenv, dotenv, Tailwind wiring, and optional SQLite + migrations (use --db/--no-db).
  • flask make:view generates HTML views and can optionally wire controllers, routes/blueprints, and SQLAlchemy models.
  • flask make:controller scaffolds a controller class and registers it in app/controllers/__init__.py.
  • flask make:model scaffolds a SQLAlchemy model and can optionally wire RESTful controllers, routes, and views.

All generated code is plain Flask with no hidden runtime layers; every file is created on disk. The goal is to remove repetitive setup work while keeping everything local and transparent.

Installation

Flask-Commands is designed to be installed globally so you can create new Flask apps anywhere on your machine.

pip install Flask-Commands

Quick Start

flask new myproject          # prompts for SQLite; use --db/--no-db to skip the prompt
cd myproject

Recommended (macOS):

./run.sh

Manual startup:

source venv/bin/activate
flask run --debug

run.sh opens a Flask shell, starts the dev server, rebuilds tailwind.css and tailwind.min.css, opens VS Code and Safari, and hot-reloads changes in templates/, controllers/, forms/, models/, and routes/.

Docs quick links

Cheat sheet

  • flask new myproject — Scaffold a new Flask project.
  • flask make:view posts.index -rcm — View + route + controller + model. Nested paths supported.
  • flask make:controller PostController --crud -m — RESTful controller, routes, templates, and a model scaffold. Nested supported.
  • flask make:model Post --crud — Model plus RESTful controller, routes, and views. No nesting.

Examples

Here are a few commands and what they do so you can see the speed and consistency gains.

flask make:view about -rc

Creates a new template, adds a controller method, and wires up a route in one step.

flask make:view posts.index -rcm

Generates the view, controller method, route, and a matching model scaffold with consistent naming.

flask make:view recipes.comments.index -rcm

Scaffolds nested resources with dotted notation, keeping folders and routes consistent.

flask make:controller PostController --crud

Builds a full RESTful controller, routes, and templates so you do not hand-write seven actions.

flask make:model Comment --crud

Creates a model and wires a RESTful controller, routes, and views for a complete resource.

Contributing

I’m keeping development closed for now, but feedback is welcome. Please open an issue for bugs or ideas. 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

flask_commands-0.2.4.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

flask_commands-0.2.4-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file flask_commands-0.2.4.tar.gz.

File metadata

  • Download URL: flask_commands-0.2.4.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flask_commands-0.2.4.tar.gz
Algorithm Hash digest
SHA256 328d7e452a7fcaa756c1ea31ec3a5bb5df975db2ee2f6ab7b29ed5e88f89b953
MD5 e44205fcc405900242bd2060360d642c
BLAKE2b-256 5e8046a50fbd7ca9beb7114e5c14b2b51b8eac1084fc48bc312e2db5dbbcb7ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_commands-0.2.4.tar.gz:

Publisher: publish-to-pypi-on-version-change.yml on drewbutcher/flask-commands

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flask_commands-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: flask_commands-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 36.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flask_commands-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe7b5d1f8e3566e927fec6870015af0d0a6b27495e85f0f27e10be1dfc01086d
MD5 2b4bd73d6347f7109cf7e9ef434921db
BLAKE2b-256 16717dd7db68480611f00f0e9066a2d17973dea977232571b2ef136619846c65

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_commands-0.2.4-py3-none-any.whl:

Publisher: publish-to-pypi-on-version-change.yml on drewbutcher/flask-commands

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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