Restore tunacode.cli.main Import Compatibility
Summary
Release validation exposed that tunacode.cli.main no longer existed after the CLI entrypoint moved to tunacode.ui.main, breaking import checks and any downstream scripts using the old path. We added a small compatibility shim that re-exports the Typer app and aligned linted isinstance checks with PEP 604 unions to keep release tooling green.
Context
- File:
src/tunacode/cli/main.py - Symptom:
ModuleNotFoundErroronfrom tunacode.cli.main import appduring release testing.
Root Cause
The CLI entrypoint was consolidated under tunacode.ui.main without leaving a compatibility package for the previous import path, so older references failed at import time.
Changes
- Added a
tunacode.clipackage with amain.pyshim that re-exportsappfromtunacode.ui.main. - Re-exported
appintunacode.cli.__init__for convenience. - Swapped tuple-based
isinstancechecks to PEP 604 union syntax to satisfy ruff pre-flight checks.
Behavioral Impact
tunacode.cli.mainimports now resolve without errors.- CLI behavior remains unchanged because the entrypoint still delegates to
tunacode.ui.main.
Related Cards
- [[cli-entrypoint]]