Harmonize by calling top-level click cmds group in CliRunner.invoke(cli.cli) Merge the command in the same line Directly monkeypatch the imported 'bma' module