INNER CODE UNIT · Python
_handle_play_shortcut
ohdearquant/lionagi · lionagi/cli/main.py:189
def _handle_play_shortcut(argv: list[str]) -> list[str] | int:
"""Expand `li play` sugar into `li o flow -p NAME ...`.
Returns the rewritten argv (list[str]), or an exit code (int) if the
subcommand fully handled the invocation (e.g. `li play list`).
"""
if not argv or argv[0] != "play":
return argv
rest = argv[1:]
if not rest:
print("Usage: li play <name> [args...] | li play list")
return 1
head = rest[0]
if head == "list":
from .orchestrate import list_playbooks
names = list_playbooks()
if not names: