o
    i                  	   @   s~   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ejddd	eee
d
df deee
d
df fddZdS )z.Run Cyclopts applications from Python scripts.    )Path)	Annotated)app)load_app_from_script)	Parameter )
help_flagsscriptT)allow_leading_hyphenargsc                G   s.   t | tjv rt  dS t| \}}||S )ab  Run a Cyclopts application from a Python script with dynamic shell completion.

    All arguments after the script path are passed to the loaded application.

    Shell completion is available. Run once to install (persistent):
    ``cyclopts --install-completion``

    Parameters
    ----------
    script : str
        Python script path with optional ':app_object' notation.
    args : str
        Arguments to pass to the loaded application.

    Examples
    --------
    Run a script:
        cyclopts run myapp.py --verbose foo bar

    Specify app object:
        cyclopts run myapp.py:app --help
    N)strr   r   
help_printr   )r	   r   app_obj_ r   V/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/cyclopts/cli/run.pyrun   s
   r   N)__doc__pathlibr   typingr   cyclopts.clir   cyclopts.loaderr   cyclopts.parameterr   commandr   r   r   r   r   r   <module>   s     
