This works similar to a regular click Group but it
changes the behavior of the command() decorator so that it
automatically wraps the functions in with_appcontext().
Not to be confused with QuartGroup.
This works exactly like the method of the same name on a regular
click.Group but it wraps callbacks in with_appcontext()
if it’s enabled by passing with_appcontext=True.
A shortcut decorator for declaring and attaching a group to
the group. This takes the same arguments as group() but
immediately registers the created command with this instance by
calling into add_command().
Return the relevant command given the context and name.
This differs substantially from Flask in that it allows
for the inbuilt commands to be overridden.
Returns a list of subcommand names in the order they should
This is the way to invoke a script with all the bells and
whistles as a command line application. This will always terminate
the application after a call. If this is not wanted, SystemExit
needs to be caught.
This method is also available by directly calling the instance of
New in version 3.0: Added the standalone_mode flag to control the standalone mode.
args – the arguments that should be used for parsing. If not
provided, sys.argv[1:] is used.
prog_name – the program name that should be used. By default
the program name is constructed by taking the file
name from sys.argv.
complete_var – the environment variable that controls the
bash completion support. The default is
"_<prog_name>_COMPLETE" with prog_name in
standalone_mode – the default behavior is to invoke the script
in standalone mode. Click will then
handle exceptions and convert them into
error messages and the function will never
return but shut down the interpreter. If
this is set to False they will be
propagated to the caller and the return
value of this function is the return value
extra – extra keyword arguments are forwarded to the context
constructor. See Context for more information.