Prepare CmdForge 0.2.0 for PyPI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user