
    tni                         d Z ddlZddlZddlmZmZ  ej        dd           ej        dd	d
           ej        ddd           ej        ddd          d                                                 Z	dS )z'
Commands for the config command group
    N   )check_credentialsset_credentialsconfigz2Configures the Runpod CLI with the user's API key.)helpzapi-keyF)requireddefaultz	--profiler	   z'The profile to set the credentials for.)r	   r   z--checkTz%Check if credentials are already set.)is_flagr   c                    t          |          \  }}|r.|r,t          j        d|z              t          j        d           n,|r*|s(t          j        |           t          j        d           |rt          j        d| dd           | ?t          j        d           t          j        d	           t          j        d
dd          } t          | |d           t          j        d| d           dS )zStarts the configuration wizard to set up the Runpod CLI.
    If credentials are already set, prompts the user to overwrite them.
    z%Credentials already set for profile: r   r   z. Overwrite?T)abortNz!Please enter your Runpod API Key.z:You can find it at https://console.runpod.io/user/settingsz    > Runpod API KeyF)
hide_inputconfirmation_prompt)	overwritezCredentials set for profile: z in ~/.runpod/config.toml)r   clickechosysexitconfirmpromptr   )api_keyprofilecheckvaliderrors        ^/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/runpod/cli/groups/config/commands.pyconfig_wizardr      s&    %W--LE5  
:WDEEE	 u 
5 
IGIIIQU	
 	
 	
 	
 
6777
OPPP,"u%
 
 
 GW5555	JQwQQQRRRRR    )
__doc__r   r   	functionsr   r   commandargumentoptionr    r   r   <module>r$      s     


  9 9 9 9 9 9 9 9 xRSSS	E4888)R   i,STTTS S UT  98 TSS S Sr   