diff --git a/STATUS.md b/STATUS.md index 456e899a..563462bf 100644 --- a/STATUS.md +++ b/STATUS.md @@ -2,7 +2,7 @@ > Auto-generated by `drone @prax status sync`. Do not edit manually. -**Last sync:** 2026-03-31 16:42 +**Last sync:** 2026-03-31 16:55 **Summary:** 9 operational | 0 in-progress | 0 not started --- diff --git a/pyproject.toml b/pyproject.toml index a1c3620d..8e05d91d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ dev = [ [project.scripts] drone = "aipass.drone.cli:main" +aipass = "aipass.cli:cli_entry" [tool.hatch.build.targets.wheel] packages = ["src/aipass"] diff --git a/src/aipass/cli/.seedgo/bypass.json b/src/aipass/cli/.seedgo/bypass.json index 506a5cc2..57fb26e1 100644 --- a/src/aipass/cli/.seedgo/bypass.json +++ b/src/aipass/cli/.seedgo/bypass.json @@ -66,6 +66,11 @@ "file": "system_logs", "standard": "log_structure", "reason": "Prax branch detection bug \u2014 CLI logs land as unknown_branch. Prax confirmed known limitation (2026-03-23), fix pending on prax side." + }, + { + "file": "__init__.py", + "standard": "unused_function", + "reason": "cli_entry() is the console_scripts entry point — called by pyproject.toml [project.scripts] aipass = 'aipass.cli:cli_entry', not from within the codebase" } ], "notes": { diff --git a/src/aipass/cli/__init__.py b/src/aipass/cli/__init__.py index 58350d19..1852b737 100644 --- a/src/aipass/cli/__init__.py +++ b/src/aipass/cli/__init__.py @@ -1,2 +1,14 @@ """CLI - Display formatting for AIPass.""" +import sys + from aipass.cli.apps.modules.display import console, header, success, error, warning, section + + +def cli_entry(): + """Console_scripts entry point for the `aipass` command.""" + from aipass.cli.apps.cli import main + + try: + sys.exit(main()) + except KeyboardInterrupt: + sys.exit(0) diff --git a/src/aipass/cli/tests/test_integration.py b/src/aipass/cli/tests/test_integration.py index 0b2c611b..44aadad8 100644 --- a/src/aipass/cli/tests/test_integration.py +++ b/src/aipass/cli/tests/test_integration.py @@ -13,8 +13,10 @@ import sys from io import StringIO from unittest.mock import patch +import pytest from rich.console import Console +from aipass.cli import cli_entry from aipass.cli.apps import cli as cli_module from aipass.cli.apps.cli import main from aipass.cli.apps.modules import display @@ -136,3 +138,13 @@ class TestModuleRunnable: cwd="/home/patrick/Projects/AIPass/src", ) assert result.returncode == 0 + + def test_cli_entry_callable(self): + """cli_entry() is the console_scripts entry point — verify it's callable.""" + cons, _get_output = _make_capture_console() + with patch.object(cli_module, "CONSOLE", cons), \ + patch.object(display, "CONSOLE", cons), \ + patch("sys.argv", ["aipass", "--version"]), \ + pytest.raises(SystemExit) as exc_info: + cli_entry() + assert exc_info.value.code == 0