A set of command line tools that help you scaffold out your flask application quickly.
Project description
Flask-Commands
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 newboots a ready-to-run Flask project with virtualenv, dotenv, Tailwind wiring, and optional SQLite + migrations (use--db/--no-db).flask make:viewgenerates HTML views and can optionally wire controllers, routes/blueprints, and SQLAlchemy models.flask make:controllerscaffolds a controller class and registers it inapp/controllers/__init__.py.flask make:modelscaffolds 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
- Commands book: https://flask-commands.readthedocs.io/en/latest/commands/index.html
- Concepts: https://flask-commands.readthedocs.io/en/latest/commands/concepts.html
- REST actions: https://flask-commands.readthedocs.io/en/latest/commands/rest_actions.html
- Nested resources: https://flask-commands.readthedocs.io/en/latest/commands/nested_resources.html
- Changelog: https://flask-commands.readthedocs.io/en/latest/changelog.html
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
Release history Release notifications | RSS feed
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
328d7e452a7fcaa756c1ea31ec3a5bb5df975db2ee2f6ab7b29ed5e88f89b953
|
|
| MD5 |
e44205fcc405900242bd2060360d642c
|
|
| BLAKE2b-256 |
5e8046a50fbd7ca9beb7114e5c14b2b51b8eac1084fc48bc312e2db5dbbcb7ed
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_commands-0.2.4.tar.gz -
Subject digest:
328d7e452a7fcaa756c1ea31ec3a5bb5df975db2ee2f6ab7b29ed5e88f89b953 - Sigstore transparency entry: 855157936
- Sigstore integration time:
-
Permalink:
drewbutcher/flask-commands@3d62028c0163e1f81ef236ca5395ceab7ceb54cd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/drewbutcher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi-on-version-change.yml@3d62028c0163e1f81ef236ca5395ceab7ceb54cd -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe7b5d1f8e3566e927fec6870015af0d0a6b27495e85f0f27e10be1dfc01086d
|
|
| MD5 |
2b4bd73d6347f7109cf7e9ef434921db
|
|
| BLAKE2b-256 |
16717dd7db68480611f00f0e9066a2d17973dea977232571b2ef136619846c65
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_commands-0.2.4-py3-none-any.whl -
Subject digest:
fe7b5d1f8e3566e927fec6870015af0d0a6b27495e85f0f27e10be1dfc01086d - Sigstore transparency entry: 855157943
- Sigstore integration time:
-
Permalink:
drewbutcher/flask-commands@3d62028c0163e1f81ef236ca5395ceab7ceb54cd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/drewbutcher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi-on-version-change.yml@3d62028c0163e1f81ef236ca5395ceab7ceb54cd -
Trigger Event:
push
-
Statement type: