Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
Disable typer completion options
jinzhenja19b59d90251
diff --git a/mineru/cli/main.py b/mineru/cli/main.pyindex 5491f557..5c995d48 100644--- a/mineru/cli/main.py+++ b/mineru/cli/main.py@@ -47,6 +47,7 @@ app = typer.Typer(cls=OrderedRootGroup,help="MinerU — your personal document center, built for agents",no_args_is_help=True,+ add_completion=False,)diff --git a/mineru/kit/main.py b/mineru/kit/main.pyindex f847effe..b14cb85c 100644--- a/mineru/kit/main.py+++ b/mineru/kit/main.py@@ -28,6 +28,7 @@ app = typer.Typer(cls=OrderedRootGroup,help="MinerU Kit — parsing and service tools",no_args_is_help=True,+ add_completion=False,)app.add_typer(models.app, name="models")diff --git a/tests/unittest/test_cli_next_command_design.py b/tests/unittest/test_cli_next_command_design.pyindex 555834c1..584dd497 100644--- a/tests/unittest/test_cli_next_command_design.py+++ b/tests/unittest/test_cli_next_command_design.py@@ -90,6 +90,21 @@ def test_version_command_is_last_in_root_help() -> None:assert result.output.rfind("version") > result.output.rfind("cleanup")+def test_root_help_hides_typer_completion_options() -> None:+ result = runner.invoke(app, ["--help"])++ assert result.exit_code == 0+ assert "--install-completion" not in result.output+ assert "--show-completion" not in result.output+++def test_root_show_completion_is_not_a_supported_option() -> None:+ result = runner.invoke(app, ["--show-completion"])++ assert result.exit_code != 0+ assert "No such option" in result.output++def test_search_and_find_help_list_filter_values() -> None:search_result = runner.invoke(app, ["search", "--help"])find_result = runner.invoke(app, ["find", "--help"])diff --git a/tests/unittest/test_kit_commands.py b/tests/unittest/test_kit_commands.pyindex f36f01b3..1016c6b6 100644--- a/tests/unittest/test_kit_commands.py+++ b/tests/unittest/test_kit_commands.py@@ -34,6 +34,21 @@ def test_kit_root_and_models_help() -> None:assert "router" in result.output+def test_kit_root_help_hides_typer_completion_options() -> None:+ result = runner.invoke(app, ["--help"])++ assert result.exit_code == 0+ assert "--install-completion" not in result.output+ assert "--show-completion" not in result.output+++def test_kit_root_show_completion_is_not_a_supported_option() -> None:+ result = runner.invoke(app, ["--show-completion"])++ assert result.exit_code != 0+ assert "No such option" in result.output++def test_kit_main_import_does_not_import_legacy_router() -> None:repo_root = Path(__file__).resolve().parents[2]code = """