betty.cli package - Betty 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 package

## Subpackages

- 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_new_translation module
    - betty.cli.commands.dev_update_translations module
    - betty.cli.commands.docs module
    - betty.cli.commands.generate module
    - betty.cli.commands.new module
    - betty.cli.commands.new_translation module
    - betty.cli.commands.serve module
    - betty.cli.commands.update_translations module
  - Module contents
    - `BettyCommand`
      - `BettyCommand.invoke()`
    - `COMMAND_REPOSITORY`
    - `Command`
      - `Command.click_command()`
      - `Command.plugin_description()`
      - `Command.plugin_id()`
      - `Command.plugin_label()`
    - `command()`
    - `pass_app()`
    - `pass_project()`

## Submodules

- betty.cli.error module
  - `user_facing_error_to_bad_parameter()`

## Module contents

Provide the Command Line Interface.

betty.cli.ctx_app(ctx: Context) → App

  Get the running application from a context.

  Parameters:

    ctx – The context to get the application from. Defaults to the current context.

betty.cli.main(*args: str) → Any

  Launch Betty’s Command-Line Interface.

  This is a stand-alone entry point that will manage an event loop and Betty application.

async betty.cli.new_main_command(app: App) → Command

  Create a new Click command for the Betty Command Line Interface.