Skip to content
Back to skills

1494 2026 02 02 Cli Main Compatibility 9278552b

ASecurity

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.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentpythontesting

Works with

  • cli

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1494-2026-02-02-cli-main-compatibility_9278552b --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1494 2026 02 02 Cli Main Compatibility 9278552b?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1494 2026 02 02 Cli Main Compatibility 9278552b
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1494-2026-02-02-cli-main-compatibility-9278552b/badge)](https://www.skillsdirectory.com/skills/tools-only-1494-2026-02-02-cli-main-compatibility-9278552b)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
title: Restore tunacode.cli.main Import Compatibility
link: cli-main-compatibility
type: delta
path: src/tunacode/cli/main.py
depth: 0
seams: [E, M]
ontological_relations:
  - relates_to: [[cli-entrypoint]]
  - affects: [[python-package]]
  - fixes: [[cli-import-compatibility]]
tags:
  - cli
  - compatibility
  - release
  - lint
created_at: 2026-02-02T12:45:00-06:00
updated_at: 2026-02-02T12:45:00-06:00
uuid: c7977f36-a39f-4e9b-b972-d93c1a7a359b
---

# 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: `ModuleNotFoundError` on `from tunacode.cli.main import app` during 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.cli` package with a `main.py` shim that re-exports `app` from `tunacode.ui.main`.
- Re-exported `app` in `tunacode.cli.__init__` for convenience.
- Swapped tuple-based `isinstance` checks to PEP 604 union syntax to satisfy ruff pre-flight checks.

## Behavioral Impact

- `tunacode.cli.main` imports now resolve without errors.
- CLI behavior remains unchanged because the entrypoint still delegates to `tunacode.ui.main`.

## Related Cards

- [[cli-entrypoint]]

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.