Flask 3 · Setup and CLI

Add a CLI command

Add your own command, run with flask --app app seed.

@app.cli.command("seed")
def seed():
    """Load sample data."""
    print("Seeded")

Official Flask 3 documentation

More setup and cli commands

All setup and cli commands · Flask 3 cheatsheet

Was this page helpful?