octoprint.cli

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, **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.

octoprint.cli.bulk_options(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.

octoprint.cli.legacy_options(f)

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.

octoprint.cli.pass_octoprint_ctx(f)

Decorator to pass in the OctoPrintContext instance.

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

Helper for setting eager options on the context.

octoprint.cli.standard_options(hidden=False)

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.

octoprint.cli.dev

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

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

octoprint.cli.plugins

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

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

settings

The global Settings instance.

plugin_manager

The PluginManager instance.

octoprint.cli.server

octoprint.cli.server.daemon_options(f)

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

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

Initializes the environment and starts up the server.

octoprint.cli.server.server_options(f)

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