betty.cli.commands package - Betty 0.4.0a4 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.cli.commands package

## Submodules

- betty.cli.commands.clear_caches module
- betty.cli.commands.config module
- betty.cli.commands.demo module
- betty.cli.commands.dev_init_translation module
- betty.cli.commands.dev_update_translations module
- betty.cli.commands.docs module
- betty.cli.commands.generate module
- betty.cli.commands.serve module

## Module contents

Provide the Command Line Interface.

betty.cli.commands.COMMAND_REPOSITORY: PluginRepository[Command] = <betty.cli.commands._CommandRepository object>

  The Command Line Interface command repository.

class betty.cli.commands.Command

  Bases: `Plugin`

  Define a CLI command plugin.

  classmethod click_command() → Command

    Get the plugin’s Click command.

  classmethod plugin_description() → Localizable | None

    Get the human-readable long plugin description.

  classmethod plugin_id() → str

    Get the plugin ID.

    IDs are unique per plugin type: - A plugin repository MUST at most have a single plugin for any ID. - Different plugin repositories MAY each have a plugin with the same ID.

  classmethod plugin_label() → Localizable

    Get the human-readable short plugin label.

betty.cli.commands.command(f: Callable[_P, Coroutine[Any, Any, None]]) → Callable[Concatenate[_P], None]

  Mark something a Betty command.

betty.cli.commands.pass_app(f: Callable[Concatenate[App, _P], None]) → Callable[_P, None]

  Decorate a command to receive the currently running `betty.app.App` as its first argument.

betty.cli.commands.pass_project(f: Callable[Concatenate[Project, _P], None]) → Callable[_P, None]

  Decorate a command to receive the currently running `betty.project.Project` as its first argument.