Prepare CmdForge 0.2.0 for PyPI

This commit is contained in:
rob
2026-07-21 15:19:02 -03:00
parent ca6135ac72
commit 1e698996b2
12 changed files with 342 additions and 25 deletions
+14
View File
@@ -451,9 +451,23 @@ def pick_args(tty_input: TTYInput, tool: dict) -> Optional[dict]:
def main():
"""Entry point for cf command."""
global _ui_out
import argparse
import subprocess
import signal
# Parse metadata flags before touching stdin or /dev/tty. This keeps
# ``cf --help`` and ``cf --version`` usable in packaging checks, CI, and
# other non-interactive environments.
parser = argparse.ArgumentParser(
prog="cf",
description="Interactively find and run local or registry CmdForge tools",
)
from .. import __version__
parser.add_argument(
"--version", action="version", version=f"%(prog)s {__version__}"
)
parser.parse_args()
# Handle Ctrl+C gracefully
def handle_sigint(sig, frame):
# Restore cursor and exit cleanly