+
    &jJN                        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R7      t.].P_                  RR7      R R l4       t0 ! R R]1]Pd                  4      t3 ! R R]1]Pd                  4      t4]]5R,          ]Pl                  ! RRR7      3,          t7]]5R,          ]Pl                  ! RRR7      3,          t8]]1R,          ]Pl                  ! RR]	! ]4      R7      3,          t9]]R,          ]Pl                  ! RRR7      3,          t:]];R,          ]Pl                  ! RR R7      3,          t<]&! R!R7      t=]&! R"R7      t>].P                  ]=R#R$7       ].P                  ]>R%R$7       ].P                  R&. RSOR'7      RRR]R(R3R) R* ll4       tA].P                  R+. RTOR'7      ]P                  RRRRRR(RRRRRRRRRR3R, R- ll4       tC].P                  R.. RUOR'7      R]P                  RRRRR(RRRRRRRR3R/ R0 ll4       tD].P                  R1R2.R'7      ]P                  RR(R(3R3 R4 ll4       tE].P                  R5R6.R'7      R]P                  3R7 R8 ll4       tF].P                  R9. RVOR'7      RRRRR]P                  3R: R; ll4       tG].P                  R<. RWOR'7      ]P                  RRRR(R3R= R> ll4       tH].P                  R?. RXOR@7      ! ](! RA4      4       ]>P                  R+RBRC.R'7      RR]P                  R(3RD RE ll4       tI]>P                  R1RF.R'7      R]P                  3RG RH ll4       tJ]=P                  R+RIRJ.R'7      RRR]P                  3RK RL ll4       tK]=P                  R&RM.R'7      R]P                  3RN RO ll4       tL]=P                  R1RP.R'7      R(R]P                  3RQ RR ll4       tMR# )Yae  Contains commands to interact with repositories on the Hugging Face Hub.

Usage:
    # create a new dataset repo on the Hub
    hf repos create my-cool-dataset --repo-type=dataset

    # create a private model repo on the Hub
    hf repos create my-cool-model --private

    # delete files from a repo on the Hub
    hf repos delete-files my-model file.txt
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)OutputFormatoutzManage repos on the Hub.helpT)invoke_without_commandc                <    V ^8  d   QhR\         P                  RR/# )   ctxreturnN)typerContext)formats   "q/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/huggingface_hub/cli/repos.py__annotate__r.   D   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_callbackr4   C   s     
}}EF r/   c                   &    ] tR t^ItRtRtRtRtRtR# )RepoTypeAllmodeldatasetspacebucket N)	__name__
__module____qualname____firstlineno__r7   r8   r9   r:   __static_attributes__r;   r/   r-   r6   r6   I   s    EGEFr/   r6   c                   "    ] tR t^PtRtRtRtRtR# )GatedChoicesautomanualfalser;   N)r<   r=   r>   r?   rC   rD   rE   r@   r;   r/   r-   rB   rB   P   s    DFEr/   rB   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                R   V ^8  d   QhR\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RRRR7      3,          R	\
        R
\        R\         \        \        P                  ! 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*   Optionr6   r   r   boolr   )r,   s   "r-   r.   r.      s     6T 6Td
^	
	6T dP	
	6T 6T  !6T" ['VW	Y#6T* +6T, 
-6Tr/   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.rQ   )rL   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_reposrX   valuelowerrW   lenr"   moder!   humanr   r   
updated_atstrftimerZ   r    r[   storage_percenttablehint)rL   rM   rN   rO   rP   rQ   apireposrsearch_lowertotalitemss   &&&&&&      r-   	repo_listrs      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          &      0   V ^8  d   QhR\         R\        R\        \        R,          \        P
                  ! RR7      3,          R\        R\        R	\        R
\        R\        \        \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RR7      3,          R\        \        R,          \        P
                  ! RRR7      3,          R\        R\        R\        R\        R\         R\"        R\$        R\&        RR/# )r'   repo_idrM   	space_sdkNzEHugging Face Spaces SDK type. Required when --type is set to 'space'.r#   privatepublic	protectedrQ   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   rR   r*   rS   r   	PublicOptProtectedOptr   rT   r
   SpaceHardwareOptSpaceStorageOptSpaceSleepTimeOptr   r   r   r   r   )r,   s   "r-   r.   r.      sp    ;L ;L;L;L d
X	
	;L ;L ;L ;L ;L @	
	;L& !d
 C	
	';L2 tu	
	3;L@ A;LB C;LD "E;LF G;LH !I;LJ 
K;LL M;LN O;LP 
Q;Lr/   c                `   \        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      R7      p\        P                  ! RVP                  \        V4      R7       R# )	zCreate a new repo on the Hub.rV   rx   ry   rz   N)rv   rM   rZ   rQ   r{   r}   r~   rw   space_hardwarespace_storagespace_sleep_timespace_secretsspace_variablesspace_volumeszRepo created)rv   url)
r   create_reporc   r   r   r   r"   resultrv   rR   )rv   rM   rw   rx   ry   rz   rQ   r{   r}   r~   r   r[   r   r   r   r   r   r   rm   repo_urls   &&&&&&&&&&&&&&&&&&  r-   repo_creater      s    h 5
!C// '9XT][cg+#/g0TU1-X2NO#F+  H  JJ~x'7'7S]Kr/   	duplicatec          "      r   V ^8  d   QhR\         R\        \        R,          \        P                  ! RR7      3,          R\
        R\        R\        R	\        R
\        R\        \        \        P                  ! 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#   rM   rx   ry   rz   rQ   r{   r|   r   r[   r   r   r   r   r   r   r)   )r   r   rR   r*   Argumentr   r   r   r   r   rT   rS   r   r   r   r   r   r   r   r   )r,   s   "r-   r.   r.     s    ,^ ,^,^d
r	
	,^ ,^ ,^ ,^ ,^ ,^ @	
	,^& ',^( ),^* "+,^, -,^. !/,^0 
1,^2 3,^4 5,^6 
7,^r/   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).rV   rx   ry   rz   N)r   r   rM   rZ   rQ   r{   r   r   r   r   r   r   zRepo duplicated)r   r   r   )
r   duplicate_reporc   r   r   r   r"   r   rv   rR   )r   r   rM   rx   ry   rz   rQ   r{   r   r[   r   r   r   r   r   r   rm   r   s   &&&&&&&&&&&&&&&&  r-   repo_duplicater     s    J 5
!C!!// '9XT][cg#/g0TU1-2NO#F+ " H JJ '9I9IsS[}]r/   deletezhf repos delete my-modelc                    V ^8  d   QhR\         R\        R\        R\        \        \
        P                  ! RR7      3,          R\        \        \
        P                  ! RR	R
R7      3,          RR/# )r'   rv   rM   rQ   
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   rT   r*   rS   )r,   s   "r-   r.   r.   F  s     0 000 0 P	
		0 
6	
	
0$ 
%0r/   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   rV   )rv   rM   r   zRepo deletedrv   N)r"   confirmrc   r   delete_repor   )rv   rM   rQ   r   r   rm   s   &&&&& r-   repo_deleter   E  sa    * KK6y6Gr'R]^dgh
5
!COO//  
 JJ~w/r/   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   rQ   rM   r)   Nr   r   r   )r,   s   "r-   r.   r.   e  s:     ; ;;; ; 	;
 
;r/   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.rV   )r   r   rM   z
Repo moved)r   r   N)r   	move_reporc   r"   r   )r   r   rQ   rM   rm   s   &&&& r-   	repo_mover   d  s<     5
!CMM//  
 JJ|W:r/   settingsc                    V ^8  d   QhR\         R\        \        R,          \        P                  ! RR7      3,          R\
        R\        R\        R	\        R
\        RR/# )r'   rv   gatedNz$The gated status for the repository.r#   rx   ry   rz   rQ   rM   r)   )
r   r   rB   r*   rS   r   r   r   r   r   )r,   s   "r-   r.   r.   }  sy     9 99t7	
	9 9 9 9 9 9 
9r/   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.rV   NFrx   ry   rz   )rv   r   rZ   rM   zRepo settings updatedr   )r   update_repo_settingsrB   rE   rc   r"   r   )rv   r   rx   ry   rz   rQ   rM   rm   s   &&&&&&& r-   repo_settingsr   u  sl    . 5
!C}t5L<N<N3N%TYT_T_ '9XT][cg//	   JJ&8r/   zdelete-filesc                   V ^8  d   QhR\         R\        \        \        ,          \        P
                  ! RR7      3,          R\        R\        R\        \        R,          \        P                  ! R	R7      3,          R
\        \        R,          \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        RR/	# )r'   rv   patternszXGlob patterns to match files to delete. Based on fnmatch, '*' matches files recursively.r#   rM   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.rQ   r)   )r   r   ra   rR   r*   r   r   r   rS   rT   r   )r,   s   "r-   r.   r.     s     )A )A)AS	k	
	)A )A )A d
L	
	)A  "d
;	
	!)A, J	
	-)A8 9)A: 
;)Ar/   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.rV   )delete_patternsrv   rM   r   r   r   r   zFiles deleted)rv   
commit_urlN)r   delete_filesrc   r"   r   )
rv   r   rM   r   r   r   r   rQ   rm   r   s
   &&&&&&&&  r-   repo_delete_filesr     sM    N 5
!C


 //%-  C JJ@r/   cp)rH   rJ   rn   z#hf repos branch create my-model devz5hf repos branch create my-model dev --revision abc123c                    V ^8  d   QhR\         R\        \        \        P                  ! RR7      3,          R\
        R\        R\        R\        \        \        P                  ! R	R7      3,          R
R/# )r'   rv   rI   z!The name of the branch to create.r#   r   rQ   rM   r{   z?If set to True, do not raise an error if branch already exists.r)   N)
r   r   rR   r*   r   r   r   r   rT   rS   )r,   s   "r-   r.   r.     s     \ \\4	
	\ \ \ \ R	
	\" 
#\r/   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.rV   )rv   rI   r   rM   r{   zBranch createdrI   rM   rv   N)r   create_branchrc   r"   r   )rv   rI   r   rQ   rM   r{   rm   s   &&&&&& r-   branch_creater     sL    4 5
!C//   JJ//SZ[r/   z#hf repos branch delete my-model devc          
          V ^8  d   QhR\         R\        \        \        P                  ! RR7      3,          R\
        R\        RR/# )	r'   rv   rI   z!The name of the branch to delete.r#   rQ   rM   r)   N)r   r   rR   r*   r   r   r   )r,   s   "r-   r.   r.     s]     \ \\4	
	\ \ \ 
\r/   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.rV   )rv   rI   rM   zBranch deletedr   N)r   delete_branchrc   r"   r   )rv   rI   rQ   rM   rm   s   &&&& r-   branch_deleter     sF     5
!C//  
 JJ//SZ[r/   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\        \        \        P                  ! RR7      3,          R\        \        R,          \        P
                  ! RRR	R7      3,          R
\        R\        R\        RR/# )r'   rv   rG   zThe name of the tag to create.r#   messageNz-mz	--messagez%The description of the tag to create.r   rQ   rM   r)   )	r   r   rR   r*   r   rS   r   r   r   )r,   s   "r-   r.   r.      s     !Q !Q!Q	1	
	
!Q d
8	
	!Q  !!Q" #!Q$ %!Q& 
'!Qr/   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.rV   )rv   rG   tag_messager   rM   r   ' not found.Nz
Revision 'i  Tag 'z' already exists on ''.zTag createdrG   rM   rv   )rc   r   
create_tagr   r   
capitalizer	   r   responsestatus_coder"   r   )	rv   rG   r   r   rQ   rM   repo_type_strrm   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'   rv   rQ   rM   r)   Nr   )r,   s   "r-   r.   r.   E  s0        
	r/   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.rV   )rv   rM   r   r   NrH   target_commitref)rc   r   list_repo_refsr   r   r   tagsrH   r   r   r"   rk   )	rv   rQ   rM   r   rm   refsr   trr   s	   &&&      r-   tag_listr   D  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\        \        \        P                  ! RR7      3,          R\        \
        \        P                  ! RRRR7      3,          R	\        R
\        RR/# )r'   rv   rG   zThe name of the tag to delete.r#   r   r   r   z"Answer Yes to prompt automaticallyrQ   rM   r)   N)	r   r   rR   r*   r   rT   rS   r   r   )r,   s   "r-   r.   r.   V  s     Q QQ	1	
	
Q 
5	
	
Q  !Q" #Q$ 
%Qr/   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   rV   )rv   rG   rM   r   r   Nr   z' not found on 'r   zTag deletedr   )rc   r"   textr   r   
delete_tagr   r   r   r	   r   )rv   rG   r   rQ   rM   r   rm   r   s   &&&&&   r-   
tag_deleter   U  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 --privatezxhf repos create my-space --type space --space-sdk gradio --flavor t4-medium --secrets HF_TOKEN -e THEME=dark --protectedzqhf repos create my-space --type space --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/)N__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    _outputr!   r"   	repos_clicallbackr4   rR   Enumr6   rB   rT   rS   r   r   r   r   intr   tag_cli
branch_cli	add_typercommandrs   r7   r   r   r   r   r   r   r   r   r   r   r   r;   r/   r-   <module>r      s=      7 5 k k / %     *  & & 9:	 40G 1G
#tyy 3		  4K	LLS	 4K	LLe $J	LL^m,  4	LL A $J	LLj  A
B HI
 	  G%  ( 	  JX  .    	 	- 	+6T6Tr   	 &^^ 	" 	 	 	!%#$(#'O;L	;L|    	%^^" 	!%#$(#'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r/   