+
    QV-j¿  ã                   ó2  € R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^RIH	t	H
t
HtHt ^RIHtHtHt ^RIHtHt ^RIHt ]P,                  ! ]4      t]! R	R
7      t]P5                  R. R)OR7      R*R R ll4       t]P5                  RRR.R7      R+R R ll4       tR R lt]P5                  RRR.R7      R,R R ll4       t]P5                  RR.R7      R R l4       t]P5                  RR R!.R7      R" R# l4       t ]P5                  R$R%R&.R7      R' R( l4       t!R# )-a�  Contains commands to authenticate to the Hugging Face Hub and interact with your repositories.

Usage:
    # login and save token locally.
    hf auth login --token=hf_*** --add-to-git-credential

    # switch between tokens
    hf auth switch

    # list all tokens
    hf auth list

    # logout from all tokens
    hf auth logout

    # check which account you are logged in as
    hf auth whoami
)Ú	AnnotatedN)ÚENDPOINT)Úwhoami)Ú	auth_listÚauth_switchÚloginÚlogout)Úget_stored_tokensÚ	get_tokenÚlogging)ÚTokenOptÚtyper_factory)Úoutz,Manage authentication (login, logout, etc.).©Úhelpr   )Úexamplesc                óÈ   € V ^8„  d   QhR\         R\        \        \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          RR/# )	é   ÚtokenÚadd_to_git_credentialúTSave to git credential helper. Useful only if you plan to run git commands directly.r   Úforcez)Force re-login even if already logged in.ÚreturnN)r   r   ÚboolÚtyperÚOption)Úformats   "Úi/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/huggingface_hub/cli/auth.pyÚ__annotate__r   =   sn   € ÷ añ aÜðaä$ÜÜ�ŠØgô	
ð	õðaô ÜÜ�ŠØ<ô	
ð	õðað 
ñaó    c                ó*   € \        WV'       * R7       R# )z8Login using a token from huggingface.co/settings/tokens.)r   r   Úskip_if_logged_inN)r   )r   r   r   s   &&&r   Ú
auth_loginr"   4   s   € ô2 
�ÐZ_ÔV_×`r   r   zhf auth logoutz$hf auth logout --token-name my-tokenc                óz   € V ^8„  d   QhR\         \        R,          \        P                  ! RR7      3,          RR/# )r   Ú
token_nameNzName of token to logoutr   r   )r   Ústrr   r   )r   s   "r   r   r   T   s<   € ÷ "ñ "ÜÜˆd�
Ü�ŠÐ3Ô4ð	6õð"ð
 
ñ"r   c                ó   € \        V R7       R# )zLogout from a specific token.©r$   N)r   r'   s   &r   Úauth_logoutr(   P   s   € ô �j×!r   c                ó2   € V ^8„  d   QhR\         R,          /# ©r   r   N)r%   )r   s   "r   r   r   ^   s   € ÷ Jñ JœC $�Jñ Jr   c                  óè  € \        \        4       P                  4       4      p V '       g   \        P	                  R 4       R# \        R4       \        V ^4       F  w  r\        V RV 24       K  	    \        R4      pVP                  4       R8X  d   R# \        V4      ^,
          p^ Tu;8:  d   \        V 4      8  d   M MW,          # \        R4       Kf    \         d    \        R4        K  i ; i)z+No stored tokens found. Please login first.NzAvailable stored tokens:z. z=Enter the number of the token to switch to (or 'q' to quit): Úqz$Invalid selection. Please try again.z4Invalid input. Please enter a number or 'q' to quit.)Úlistr	   ÚkeysÚloggerÚerrorÚprintÚ	enumerateÚinputÚlowerÚintÚlenÚ
ValueError)Útoken_namesÚir$   ÚchoiceÚindexs        r   Ú_select_token_namer<   ^   sË   € ÜÔ(Ó*×/Ñ/Ó1Ó2€KçÜ�‰ÐBÔCÙä	Ð
$Ô%Ü" ;°Ö2‰ˆÜ���2�j�\Ð"Ö#ñ 3à
ð
	JÜÐZÓ[ˆFØ�|‰|‹~ Ô$ÙÜ˜“K !•OˆEØ�EÖ,œC Ó,×,Ø"Õ)Ð)äÐ<Ö=øÜô 	JÜÐH×Ið	Jús   Á3 C Â4C Ã
C ÃC1Ã0C1Úswitchzhf auth switchz$hf auth switch --token-name my-tokenc          	      óÊ   € V ^8„  d   QhR\         \        R,          \        P                  ! RR7      3,          R\         \        \        P                  ! RR7      3,          RR/# )r   r$   NzName of the token to switch tor   r   r   r   )r   r%   r   r   r   )r   s   "r   r   r   z   si   € ÷ Iñ IÜÜˆd�
Ü�ŠØ1ô	
ð	õðIô %ÜÜ�ŠØgô	
ð	õðIð 
ñIr   c                ó‚   € V f   \        4       p V f!   \        R4       \        P                  ! 4       h\	        WR7       R# )zSwitch between access tokens.Nz!No token name provided. Aborting.)r   )r<   r1   r   ÚExitr   )r$   r   s   &&r   Úauth_switch_cmdrA   v   s5   € ð& ÒÜ'Ó)ˆ
ØÒÜÐ1Ô2Ü�jŠj‹lÐÜ�
×Hr   z	list | lszhf auth listc                ó   € V ^8„  d   QhRR/# r*   © )r   s   "r   r   r   ’   s   € ÷ ñ �tñ r   c                 ó   € \        4        R# )zList all stored access tokens.N)r   rC   r   r   Úauth_list_cmdrE   ‘   s	   € ô †Kr   r   zhf auth tokenz8hf auth token | xargs curl -H 'Authorization: Bearer {}'c                ó   € V ^8„  d   QhRR/# r*   rC   )r   s   "r   r   r   ˜   s   € ÷ Qñ Q�Dñ Qr   c                 ó¾   € \        4       p V f.   \        P                  ! R4       \        P                  ! ^R7      h\        V 4       \        P                  ! R4       R# )z)Print the current access token to stdout.Nz)Not logged in. Run `hf auth login` first.©Úcodez@Run `hf auth whoami` to see which account this token belongs to.)r
   r   r0   r   r@   r1   Úhint)r   s    r   Ú
auth_tokenrK   —   s@   € ô ‹K€EØ‚}Ü�	Š	Ð=Ô>Ü�jŠj˜aÔ Ð Ü	ˆ%„LÜ‡H‚HÐOÖPr   r   zhf auth whoamizhf auth whoami --format jsonc                ó   € V ^8„  d   QhRR/# r*   rC   )r   s   "r   r   r   £   s   € ÷ Mñ M�Tñ Mr   c                 óJ  € \        4       p V f.   \        P                  ! R4       \        P                  ! ^R7      h\        V 4      pRP                  R VR,           4       4      ;'       g    Rp\        R8w  d   \        MRp\        P                  ! RVR	,          W#R
7       R# )z;Find out which huggingface.co account you are logged in as.NzNot logged inrH   Ú,c              3   ó2   "  € T F  qR ,          x € K  	  R# 5i)ÚnameNrC   )Ú.0Úorgs   & r   Ú	<genexpr>Úauth_whoami.<locals>.<genexpr>¬   s   é € Ð8©< C˜—K’K«<ùs   ‚Úorgszhttps://huggingface.coz	Logged inrP   )ÚuserrU   Úendpoint)	r
   r   r0   r   r@   r   Újoinr   Úresult)r   ÚinforU   rW   s       r   Úauth_whoamir[   ¢   sw   € ô ‹K€EØ‚}Ü�	Š	�/Ô"Ü�jŠj˜aÔ Ð ä�%‹=€DØ�8‰8Ñ8¨4°®<Ó8Ó8×@Ð@¸D€DÜ#Ð'?Ô?�xÀT€HÜ‡J‚Jˆ{  f¥°D×Lr   )zhf auth loginzhf auth login --token $HF_TOKENz7hf auth login --token $HF_TOKEN --add-to-git-credentialzhf auth login --force)NFF)N)NF)"Ú__doc__Útypingr   r   Úhuggingface_hub.constantsr   Úhuggingface_hub.hf_apir   Ú_loginr   r   r   r   Úutilsr	   r
   r   Ú
_cli_utilsr   r   Ú_outputr   Ú
get_loggerÚ__name__r/   Úauth_cliÚcommandr"   r(   r<   rA   rE   rK   r[   rC   r   r   Ú<module>rh      sa  ðñõ& ã å .Ý )ç :Ó :ß 9Ñ 9ß /Ý ð 
×	Ò	˜HÓ	%€ñ ÐLÔM€ð 
×ÑØòð ó öaóðað& 
×ÑØØÐ FÐGð ó ö"ó	ð"õJð0 
×ÑØØÐ FÐGð ó öIó	ðIð. 
×Ñ�+¨Ð(8ÐÓ9ôó :ðð
 
×Ñ�' _Ð6pÐ$qÐÓrôQó sðQð 
×Ñ�(Ð&6Ð8VÐ%WÐÓXôMó YòMr   