class octoprint.cli.HiddenOption(param_decls=None, show_default=False, prompt=False, confirmation_prompt=False, hide_input=False, is_flag=None, flag_value=None, multiple=False, count=False, allow_from_autoenv=True, type=None, help=None, hidden=False, show_choices=True, show_envvar=False, **attrs)

Custom option sub class with empty help.

class octoprint.cli.OctoPrintContext(configfile=None, basedir=None, verbosity=0, safe_mode=False)

Custom context wrapping the standard options.


Utility decorator to decorate a function with a list of click decorators.

The provided list of options will be reversed to ensure correct processing order (inverse from what would be intuitive).

octoprint.cli.hidden_option(*param_decls, **attrs)

Attaches a hidden option to the command. All positional arguments are passed as parameter declarations to Option; all keyword arguments are forwarded unchanged. This is equivalent to creating an Option instance manually and attaching it to the Command.params list.


Legacy options available directly on the “octoprint” command in earlier versions. Kept available for reasons of backwards compatibility, but hidden from the generated help pages.


Decorator to pass in the OctoPrintContext instance.

octoprint.cli.set_ctx_obj_option(ctx, param, value)

Helper for setting eager options on the context.


Decorator to add the standard options shared among all “octoprint” commands.

Adds the options --basedir, --config and --verbose. If hidden is set to True, the options will be available on the command but not listed in its help page.


class octoprint.cli.dev.OctoPrintDevelCommands(*args, **kwargs)

Custom click.MultiCommand implementation that provides commands relevant for (plugin) development based on availability of development dependencies.


class octoprint.cli.plugins.OctoPrintPluginCommands(*args, **kwargs)

Custom click.MultiCommand implementation that collects commands from the plugin hook octoprint.cli.commands.


The global Settings instance.


The PluginManager instance.



Decorator to add the options for the daemon subcommand: --pid.

octoprint.cli.server.run_server(basedir, configfile, host, port, v6_only, debug, allow_root, logging_config, verbosity, safe_mode, ignore_blacklist, octoprint_daemon=None)

Initializes the environment and starts up the server.


Decorator to add the options shared among the server commands: --host, --port, -4, -6 --logging, --iknowwhatimdoing and --debug.