+
    PjN                        R t ^ RIt^ RIHt ^ RIt^ RIHtHt ^ RIH	t	 ^ RI
HtHtHtHt ^ RIHt ^RIHt ^RIHtHtHtHtHtHtHtHtHtHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t& ^R	I'H(t( ^R
I)H*t* ^RI+H,t,H-t- ^RI.H/t/H0t0 ]&! RR7      t1]1Pe                  RR7      R R l4       t3 ! R R]4]Pj                  4      t6 ! R R]4]Pj                  4      t7]]8R,          ]-! RRR7      3,          t9]]8R,          ]-! RRR7      3,          t:]]4R,          ]-! RR]	! ]4      R7      3,          t;]]R,          ]-! RRR7      3,          t<]]=R,          ]-! R R!R7      3,          t>]&! R"R7      t?]&! R#R7      t@]1P                  ]?R$R%7       ]1P                  ]@R&R%7       ]1P                  R'. RTOR(7      RRR]R)R3R* R+ ll4       tC]1P                  R,. RUOR(7      ]P                  RRRRRRR)RRRRRRRRRR3R- R. ll4       tE]1P                  R/. RVOR(7      R]P                  RRRRR)RRRRRRRR3R0 R1 ll4       tF]1P                  R2R3.R(7      ]P                  RR)R)3R4 R5 ll4       tG]1P                  R6R7.R(7      R]P                  3R8 R9 ll4       tH]1P                  R:. RWOR(7      RRRRR]P                  3R; R< ll4       tI]1P                  R=. RXOR(7      ]P                  RRRR)R3R> R? ll4       tJ]1P                  R@. RYORA7      ! ](! RB4      4       ]@P                  R,RCRD.R(7      RR]P                  R)3RE RF ll4       tK]@P                  R2RG.R(7      R]P                  3RH RI ll4       tL]?P                  R,RJRK.R(7      RRR]P                  3RL RM ll4       tM]?P                  R'RN.R(7      R]P                  3RO RP ll4       tN]?P                  R2RQ.R(7      R)R]P                  3RR RS ll4       tOR# )ZzHContains commands to interact with repositories on the Hugging Face Hub.N)	Annotated)SpaceHardwareSpaceStorage)
SoftChoice)CLIErrorHfHubHTTPErrorRepositoryNotFoundErrorRevisionNotFoundError)REPO_REGIONS)run_city_game)REPO_LIST_DEFAULT_LIMIT
EnvFileOptEnvOptLimitOpt
PrivateOpt	RepoIdArgRepoTypeRepoTypeOptRevisionOpt	SearchOptSecretsFileOpt
SecretsOptTokenOpt
VolumesOptenv_map_to_key_value_list
get_hf_apiparse_env_mapparse_volumestyper_factory)make_cp)format_size)ArgumentOption)OutputFormatoutzManage repos on the Hub.helpT)invoke_without_commandc                <    V ^8  d   QhR\         P                  RR/# )   ctxreturnN)clickContext)formats   "r/Users/ahmed/devFolder/Ultron/claude-voice/gateway/.venv/lib/python3.14/site-packages/huggingface_hub/cli/repos.py__annotate__r0   :   s"     G G G4 G    c                 X    V P                   R 8X  d   \        P                  ! R4       R# R# )repoz/`hf repo` is deprecated in favor of `hf repos`.N)	info_namer$   warning)r*   s   &r/   _repos_callbackr6   9   s     
}}EF r1   c                   &    ] tR t^?tRtRtRtRtRtR# )RepoTypeAllmodeldatasetspacebucket N)	__name__
__module____qualname____firstlineno__r9   r:   r;   r<   __static_attributes__r=   r1   r/   r8   r8   ?   s    EGEFr1   r8   c                   "    ] tR t^FtRtRtRtRtR# )GatedChoicesautomanualfalser=   N)r>   r?   r@   rA   rE   rF   rG   rB   r=   r1   r/   rD   rD   F   s    DFEr1   rD   z--publiczDWhether to make the repo public. Ignored if the repo already exists.z--protectedzVWhether to make the Space protected (Spaces only). Ignored if the repo already exists.z--flavorzOSpace hardware flavor (e.g. 'cpu-basic', 't4-medium', 'l4x4'). Only for Spaces.)r&   
click_typez	--storagezq(Deprecated, use volumes instead) Space persistent storage tier ('small', 'medium', or 'large'). Only for Spaces.z--sleep-timez[Seconds of inactivity before the Space is put to sleep. Use -1 to disable. Only for Spaces.z"Manage tags for a repo on the Hub.z&Manage branches for a repo on the Hub.tag)namebranchz	list | ls)examplesFc                   V ^8  d   QhR\         \        R,          \        RR7      3,          R\         \        R,          \        RRRR7      3,          R	\        R
\
        R\         \        \        RRR7      3,          R\        RR/# )r)   	namespaceNzKOrganization name. If not provided, lists repos for the authenticated user.r%   	repo_typez--typez--repo-typez=Filter by repository type (model, dataset, space, or bucket).searchlimitexplorez	--explorez-Explore your repos as an interactive 3D city.tokenr+   )r   strr"   r8   r   r   boolr   )r.   s   "r/   r0   r0      s     6T 6Td
^	
	6T dP	
	6T 6T  !6T" {!PQ	S#6T* +6T, 
-6Tr1   c                   \        VR7      p\        VP                  V R7      4      pVe.   V Uu. uF!  qP                  VP                  8X  g   K  VNK#  	  ppVeB   VP                  4       p	V Uu. uF%  qVP                  P                  4       9   g   K#  VNK'  	  pp\        V4      p
V'       d<   \        P                  \        P                  8X  d   \        V4       R# \        R4      hV^ 8  d   VRV pV Uu. uFk  pRVP                  RVP                  RVP                  P                  R4      R	VP                   R
\#        VP$                  RR7      RVP&                  R R2/NKm  	  pp\        P(                  ! VRR
RRR/R7       V^ 8  d(   W8  d    \        P*                  ! RV RV
 R24       R# R# R# u upi u upi u upi )zEList all repos (models, datasets, spaces, buckets) with storage info.rS   )rN   Nz5Repository exploration is only available in terminal.idtypeupdatedz%Y-%m-%d
visibilitystorageT)human_readablez
%_of_totalz.1f%right)id_key
alignmentszShowing z of z$ repos. Use `--limit 0` to list all.)r   listlist_user_reposrY   valuelowerrX   lenr$   moder#   humanr   r   
updated_atstrftimer[   r    r\   storage_percenttablehint)rN   rO   rP   rQ   rR   rS   apireposrsearch_lowertotalitemss   &&&&&&      r/   	repo_listrt   {   s   @ 5
!C$$y$9:E!?EqVVy%>E?||~!BEqQTTZZ\%AEBJE88|)))% NOOqyfu 
 A !$$AFFq||,,Z8!,,{199TBQ..s315	
  
 
 IIeDi,PW-XYqyU]8E7$ug-QRS #y5 @ C
s   F<F<1 GG<A1Gcreatec          (      &   V ^8  d   QhR\         R\        R\        \        R,          \	        RRRR7      3,          R	\        \        R,          \	        R
RR7      3,          R\
        R\        R\        R\        R\        \        \	        RR7      3,          R\        \        R,          \	        RR7      3,          R\        \        R,          \	        RRR7      3,          R\        R\        R\        R\        R\        R\         R\"        R\$        RR/# ) r)   repo_idrO   sdkNz--sdkz--space-sdkzEHugging Face Spaces SDK type. Required when --type is set to 'space'.r%   templatez
--templatezCreate a Space from an official template. Pass a template repo id (e.g. 'SpacesExamples/jupyterlab') or its short name (e.g. 'JupyterLab'). List available templates with `hf spaces templates`. Spaces only.privatepublic	protectedrS   exist_ok-Do not raise an error if repo already exists.resource_group_idzoResource group in which to create the repo. Resource groups is only available for Enterprise Hub organizations.regionz--regionzbCloud region in which to create the repo. Can be one of 'us' or 'eu'. Requires Team plan or above.hardwarer\   
sleep_timesecretssecrets_fileenvenv_filevolumer+   )r   r   r   rT   r"   r   	PublicOptProtectedOptr   rU   r
   SpaceHardwareOptSpaceStorageOptSpaceSleepTimeOptr   r   r   r   r   )r.   s   "r/   r0   r0      s    IL ILILIL 
d
X	
	
IL d
6	
	
IL, -IL. /IL0 1IL2 3IL4 @	
	5IL@ !d
 C	
	AILL tu	
	MILZ [IL\ ]IL^ "_IL` aILb !cILd 
eILf gILh iILj 
kILr1   c                b   \        VR7      pTP                  T VP                  V'       d   RMV'       d   RMV'       d   RMRVVV	V
VVVV\        \	        W4      4      \        \	        VV4      4      \        V4      VR7      p\        P                  ! RVP                  \        V4      R7       R# )	zCreate a new repo on the Hub.rW   rz   r{   r|   N)rw   rO   r[   rS   r}   r   r   	space_sdkspace_hardwarespace_storagespace_sleep_timespace_secretsspace_variablesspace_volumesspace_templatezRepo created)rw   url)
r   create_repord   r   r   r   r$   resultrw   rT   )rw   rO   rx   ry   rz   r{   r|   rS   r}   r   r   r   r\   r   r   r   r   r   r   rn   repo_urls   &&&&&&&&&&&&&&&&&&&  r/   repo_creater      s    D 5
!C// '9XT][cg+#/g0TU1-X2NO#F+  H" JJ~x'7'7S]Kr1   	duplicatec          "      F   V ^8  d   QhR\         R\        \        R,          \        RR7      3,          R\        R\
        R\        R	\        R
\        R\        \        \        RR7      3,          R\        R\        R\        R\        R\        R\         R\"        R\$        RR/# )r)   from_idto_idNz_Destination repo ID (e.g. `myorg/my-copy`). Defaults to your namespace with the same repo name.r%   rO   rz   r{   r|   rS   r}   r~   r   r\   r   r   r   r   r   r   r+   )r   r   rT   r!   r   r   r   r   r   rU   r"   r   r   r   r   r   r   r   r   )r.   s   "r/   r0   r0     s     ,^ ,^,^d
r	
	,^ ,^ ,^ ,^ ,^ ,^ @	
	,^& ',^( ),^* "+,^, -,^. !/,^0 
1,^2 3,^4 5,^6 
7,^r1   c                \   \        VR7      pTP                  T TVP                  V'       d   RMV'       d   RMV'       d   RMRVVVV	V
\        \	        W4      4      \        \	        W4      4      \        V4      R7      p\        P                  ! RV VP                  \        V4      R7       R# )	z7Duplicate a repo on the Hub (model, dataset, or Space).rW   rz   r{   r|   N)r   r   rO   r[   rS   r}   r   r   r   r   r   r   zRepo duplicated)r   r   r   )
r   duplicate_repord   r   r   r   r$   r   rw   rT   )r   r   rO   rz   r{   r|   rS   r}   r   r\   r   r   r   r   r   r   rn   r   s   &&&&&&&&&&&&&&&&  r/   repo_duplicater     s    J 5
!C!!// '9XT][cg#/g0TU1-2NO#F+ " H JJ '9I9IsS[}]r1   deletezhf repos delete my-modelc                    V ^8  d   QhR\         R\        R\        R\        \        \        RR7      3,          R\        \        \        RR	R
R7      3,          RR/# )r)   rw   rO   rS   
missing_okz=If set to True, do not raise an error if repo does not exist.r%   yes-y--yesz#Answer Yes to prompt automatically.r+   N)r   r   r   r   rU   r"   )r.   s   "r/   r0   r0   K  sz     0 000 0 P	
		0 
6	
	
0$ 
%0r1   c                    \         P                  ! RVP                   RV  R2VR7       \        VR7      pVP	                  V VP                  VR7       \         P
                  ! RV R7       R	# )
z>Delete a repo from the Hub. This is an irreversible operation.z$You are about to permanently delete  'z'. Proceed?r   rW   )rw   rO   r   zRepo deletedrw   N)r$   confirmrd   r   delete_repor   )rw   rO   rS   r   r   rn   s   &&&&& r/   repo_deleter   J  sa    * KK6y6Gr'R]^dgh
5
!COO//  
 JJ~w/r1   movez;hf repos move old-namespace/my-model new-namespace/my-modelc          
      L    V ^8  d   QhR\         R\         R\        R\        RR/# )r)   r   r   rS   rO   r+   Nr   r   r   )r.   s   "r/   r0   r0   j  s:     ; ;;; ; 	;
 
;r1   c                    \        VR7      pVP                  V VVP                  R7       \        P                  ! RWR7       R# )z8Move a repository from a namespace to another namespace.rW   )r   r   rO   z
Repo moved)r   r   N)r   	move_repord   r$   r   )r   r   rS   rO   rn   s   &&&& r/   	repo_mover   i  s<     5
!CMM//  
 JJ|W:r1   settingsc                    V ^8  d   QhR\         R\        \        R,          \        RR7      3,          R\        R\
        R\        R	\        R
\        RR/# )r)   rw   gatedNz$The gated status for the repository.r%   rz   r{   r|   rS   rO   r+   )	r   r   rD   r"   r   r   r   r   r   )r.   s   "r/   r0   r0     su     9 99t7	
	9 9 9 9 9 9 
9r1   c                   \        VR7      pTP                  T Vf   RM!V\        P                  J d   RMVP                  V'       d   RMV'       d   RMV'       d   RMRVP                  R7       \
        P                  ! RV R	7       R# )
z$Update the settings of a repository.rW   NFrz   r{   r|   )rw   r   r[   rO   zRepo settings updatedr   )r   update_repo_settingsrD   rG   rd   r$   r   )rw   r   rz   r{   r|   rS   rO   rn   s   &&&&&&& r/   repo_settingsr   z  sl    . 5
!C}t5L<N<N3N%TYT_T_ '9XT][cg//	   JJ&8r1   zdelete-filesc                f   V ^8  d   QhR\         R\        \        \        ,          \	        RR7      3,          R\
        R\        R\        \        R,          \        R	R7      3,          R
\        \        R,          \        RR7      3,          R\        \        \        RR7      3,          R\        RR/	# )r)   rw   patternszXGlob patterns to match files to delete. Based on fnmatch, '*' matches files recursively.r%   rO   revisioncommit_messageNz9The summary / title / first line of the generated commit.commit_descriptionz(The description of the generated commit.	create_prz7Whether to create a new Pull Request for these changes.rS   r+   )
r   r   rb   rT   r!   r   r   r"   rU   r   )r.   s   "r/   r0   r0     s     )A )A)AS	k	
	)A )A )A d
L	
	)A  "d
;	
	!)A, J	
	-)A8 9)A: 
;)Ar1   c           
         \        VR7      pVP                  VV VP                  VVVVR7      p	\        P                  ! RW	R7       R# )z$Delete files from a repo on the Hub.rW   )delete_patternsrw   rO   r   r   r   r   zFiles deleted)rw   
commit_urlN)r   delete_filesrd   r$   r   )
rw   r   rO   r   r   r   r   rS   rn   r   s
   &&&&&&&&  r/   repo_delete_filesr     sM    N 5
!C


 //%-  C JJ@r1   cp)rJ   rL   ro   z#hf repos branch create my-model devz5hf repos branch create my-model dev --revision abc123c                    V ^8  d   QhR\         R\        \        \        RR7      3,          R\        R\
        R\        R\        \        \        R	R7      3,          R
R/# )r)   rw   rK   z!The name of the branch to create.r%   r   rS   rO   r}   z?If set to True, do not raise an error if branch already exists.r+   N)	r   r   rT   r!   r   r   r   rU   r"   )r.   s   "r/   r0   r0     s     \ \\4	
	\ \ \ \ R	
	\" 
#\r1   c                    \        VR7      pVP                  V VVVP                  VR7       \        P                  ! RWP                  V R7       R# )z*Create a new branch for a repo on the Hub.rW   )rw   rK   r   rO   r}   zBranch createdrK   rO   rw   N)r   create_branchrd   r$   r   )rw   rK   r   rS   rO   r}   rn   s   &&&&&& r/   branch_creater     sL    4 5
!C//   JJ//SZ[r1   z#hf repos branch delete my-model devc          
      z    V ^8  d   QhR\         R\        \        \        RR7      3,          R\        R\
        RR/# )	r)   rw   rK   z!The name of the branch to delete.r%   rS   rO   r+   N)r   r   rT   r!   r   r   )r.   s   "r/   r0   r0   	  sY     \ \\4	
	\ \ \ 
\r1   c                    \        VR7      pVP                  V VVP                  R7       \        P                  ! RWP                  V R7       R# )z'Delete a branch from a repo on the Hub.rW   )rw   rK   rO   zBranch deletedr   N)r   delete_branchrd   r$   r   )rw   rK   rS   rO   rn   s   &&&& r/   branch_deleter     sF     5
!C//  
 JJ//SZ[r1   z!hf repos tag create my-model v1.0z4hf repos tag create my-model v1.0 -m "First release"c                    V ^8  d   QhR\         R\        \        \        RR7      3,          R\        \        R,          \	        RRR	R7      3,          R
\
        R\        R\        RR/# )r)   rw   rI   zThe name of the tag to create.r%   messageNz-mz	--messagez%The description of the tag to create.r   rS   rO   r+   )r   r   rT   r!   r"   r   r   r   )r.   s   "r/   r0   r0   %  s     !Q !Q!Q	1	
	
!Q d
8	
	!Q  !!Q" #!Q$ %!Q& 
'!Qr1   c                   VP                   p\        VR7      p VP                  WW#VR7       \        P                  ! RYT R7       R#   \         d&   p\	        TP                  4        RT  R24      ThRp?i\         d   p\	        RT R24      ThRp?i\         d5   pTP                  P                  R8X  d   \	        RT R	T  R
24      Thh Rp?ii ; i)zCreate a tag for a repo.rW   )rw   rI   tag_messager   rO   r   ' not found.Nz
Revision 'i  Tag 'z' already exists on ''.zTag createdrI   rO   rw   )rd   r   
create_tagr   r   
capitalizer	   r   responsestatus_coder$   r   )	rw   rI   r   r   rS   rO   repo_type_strrn   es	   &&&&&&   r/   
tag_creater     s    8 OOM
5
!C	wWcpq JJ}#P # V-2245RyMNTUU  CH:\:;B ::!!S(U3%'<WIRHIqPs;   A	 	C A44CCBCC /CCzhf repos tag list my-modelc                @    V ^8  d   QhR\         R\        R\        RR/# )r)   rw   rS   rO   r+   Nr   )r.   s   "r/   r0   r0   J  s0        
	r1   c           	     v   VP                   p\        VR7      p VP                  WR7      pTP                   Uu. uF)  pRTP                  RTP                  RTP                  /NK+  	  pp\        P                  ! T4       R#   \         d&   p\	        TP                  4        RT  R24      ThRp?ii ; iu upi )	zList tags for a repo.rW   )rw   rO   r   r   NrJ   target_commitref)rd   r   list_repo_refsr   r   r   tagsrJ   r   r   r$   rl   )	rw   rS   rO   r   rn   refsr   trs   s	   &&&      r/   tag_listr   I  s     OOM
5
!CV!!'!K X\W`W`aW`RSfaffoqquuMW`EaIIe # V-2245RyMNTUUVas   B /B6B3 B..B3z!hf repos tag delete my-model v1.0c                    V ^8  d   QhR\         R\        \        \        RR7      3,          R\        \        \        RRRR7      3,          R	\        R
\        RR/# )r)   rw   rI   zThe name of the tag to delete.r%   r   r   r   z"Answer Yes to prompt automaticallyrS   rO   r+   N)r   r   rT   r!   rU   r"   r   r   )r.   s   "r/   r0   r0   [  s     Q QQ	1	
	
Q 
5	
	
Q  !Q" #Q$ 
%Qr1   c                   VP                   p\        P                  ! RV RV RV  24       \        P                  ! RVR7       \	        VR7      p VP                  WVR7       \        P                  ! RYT R7       R
#   \         d&   p\        TP                  4        RT  R	24      ThR
p?i\         d   p\        RT RT  R24      ThR
p?ii ; i)zDelete a tag for a repo.zYou are about to delete tag z on  zProceed?r   rW   )rw   rI   rO   r   r   Nr   z' not found on 'r   zTag deletedr   )rd   r$   textr   r   
delete_tagr   r   r   r	   r   )rw   rI   r   rS   rO   r   rn   r   s   &&&&&   r/   
tag_deleter   Z  s    * OOMHH+C5]O1WINOKK
$
5
!CHw=I
 JJ}#P	 # V-2245RyMNTUU  Hse#3G9B?@aGHs*   A? ?C
 B**C7C8CC)zhf repos lszhf repos ls --explorez,hf repos ls --namespace my-org --search bert)zhf repos create my-modelz8hf repos create my-dataset --repo-type dataset --privatezrhf repos create my-space --type space --sdk gradio --flavor t4-medium --secrets HF_TOKEN -e THEME=dark --protectedzOhf repos create my-jupyterlab --type space --template SpacesExamples/jupyterlabzkhf repos create my-space --type space --sdk gradio -v hf://org/my-model:/models -v hf://buckets/org/b:/dataz$hf repos create my-model --region us)z/hf repos duplicate openai/gdpval --type datasetzzhf repos duplicate multimodalart/dreambooth-training my-dreambooth --type space --flavor l4x4 --secrets HF_TOKEN --privateznhf repos duplicate org/my-space my-space --type space -v hf://org/my-model:/models -v hf://buckets/org/b:/data)z$hf repos settings my-model --privatez'hf repos settings my-model --gated autoz8hf repos settings my-space --repo-type space --protected)z'hf repos delete-files my-model file.txtz'hf repos delete-files my-model "*.json"z&hf repos delete-files my-model folder/)	z:hf repos cp hf://username/my-model/config.json config.jsonz<hf repos cp hf://datasets/username/my-dataset/data.csv data/z0hf repos cp hf://username/my-model/config.json -zFhf repos cp model.safetensors hf://username/my-model/model.safetensorsz4hf repos cp config.json hf://username/my-model/logs/z0hf repos cp - hf://username/my-model/config.jsonzWhf repos cp hf://username/source-model/config.json hf://username/dest-model/config.jsonzghf repos cp hf://datasets/username/my-dataset/processed/ hf://datasets/username/dest-dataset/processed/zJhf repos cp hf://username/my-model/logs/ hf://username/archive-model/logs/)P__doc__enumtypingr   r,   huggingface_hubr   r   huggingface_hub.cli._cli_utilsr   huggingface_hub.errorsr   r   r   r	   huggingface_hub.hf_apir
   
_city_gamer   
_cli_utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   _cpr   _file_listingr    
_frameworkr!   r"   _outputr#   r$   	repos_cligroup_callbackr6   rT   Enumr8   rD   rU   r   r   r   r   intr   tag_cli
branch_cli	add_groupcommandrt   r9   r   r   r   r   r   r   r   r   r   r   r   r=   r1   r/   <module>r     s2   O    7 5 k k / %     *  & ( & 9:	 6G 7G
#tyy 3		  4K
S	 4K
e $J
^m,  4
 A $J
j  A
B HI
 	  G%  ( 	  JX  .    	 	- 	+6T6Tr   
 &^^ 	 	" 	 	 	!%#$(#'iIL
ILX    	%^^" 	!%#$(#'5,^,^^ 8'A&BC &^^ 	 	#0 D0< 6%b$cd %^^	; e;     	"%^^992     &^^  	 	 	9)A)AZ 
  	    
'!& -?   !%^^ 	!\\< H(M'NO %^^\ P\* 	+>  , 	 %^^%!Q!QH 	(D'EF %^^ G  	%H$IJ  	%^^#Q KQr1   