Serve click scripts over the web with minimal effort.

pip install click-web==0.8.5



Serve click scripts over the web with minimal effort.

Example screenshot


See this demo screen capture.

Take an existing click script, like this one:

import click
import time
def cli():
    'A stupid script to test click-web'

@click.option("--delay", type=float, default=0.01, help='delay for every line print')
@click.argument("lines", default=10, type=int)
def print_rows(lines, delay):
    'Print lines with a delay'
    click.echo(f"writing: {lines} with {delay}")
    for i in range(lines):
        click.echo(f"Hello row: {i}")

if __name__ == '__main__':

Create a minimal script to run with flask

from click_web import create_click_web_app
import example_command

app = create_click_web_app(example_command, example_command.cli)

Running example app:

In Bash:

export FLASK_ENV=development
flask run

Caution: If you plan to serve publicly make sure you setup security (SSL, login etc.) See Authentication


For an example of how to secure using http digest auth see the auth example.

Note: There is no permission system and all logged in users can access everything. If you plan to deploy in an open environment make sure to setup HTTPS.

Custom Styling

For an example of how to customize styling using CSS and add extra page head or footer see the custom example.

Unsupported click features

It has only been tested with basic click features, and most advanced features will probably not work.

  • Variadic arguments of file and path type
  • Promts (probably never will)
  • Custom ParamTypes (depending on implementation)


  • Abort started/running processes.
  • Browser history

Included 3:rd party libraries

SplitJs - Copyright (c) 2020 Nathan Cahill (MIT license)