Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>FlaskLensNew to Visual Studio Code? Get it now.
FlaskLens

FlaskLens

codeif

|
2 installs
| (0) | Free
CodeLens support for Flask CLI commands in VSCode.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FlaskLens

CodeLens support for Flask CLI commands in VS Code. FlaskLens detects Flask blueprint CLI commands (and optional inline hints) and lets you run them directly from the editor.

Features

  • CodeLens for @bp.cli.command("name") decorators.
  • CodeLens for inline hints like # flask-cli: flask mycommand.
  • Runs commands in the active VS Code terminal (or creates one).

How It Works

FlaskLens scans Python files for:

  • Blueprint declarations like bp = Blueprint("admin", __name__)
  • CLI decorators like @bp.cli.command("seed")
  • Inline hints like # flask-cli: flask db upgrade

It then adds CodeLens entries at those locations to run the related CLI command.

Quick Start

  1. Install the extension from the VS Code Marketplace.
  2. Open a Python file in your Flask project.
  3. Hover above a CLI decorator or inline hint and click the CodeLens.

Examples

Blueprint CLI command:

from flask import Blueprint

bp = Blueprint("admin", __name__)

@bp.cli.command("seed")
def seed():
    ...

Inline CLI hint:

# flask-cli: flask db upgrade

Commands

  • FlaskLens: Open Route (flasklens.openRoute)
  • FlaskLens: Run CLI Command (flasklens.runCliCommand)

Requirements

  • VS Code 1.108.0 or newer
  • Python files in your workspace

Release Notes

See CHANGELOG.md for version history.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft