@@ -372,8 +372,6 @@ pub(crate) struct PipCompileArgs {
372372 #[ arg( long, env = "UV_CUSTOM_COMPILE_COMMAND" ) ]
373373 pub ( crate ) custom_compile_command : Option < String > ,
374374
375- /// Run offline, i.e., without accessing the network.
376-
377375 /// Refresh all cached data.
378376 #[ arg( long, conflicts_with( "offline" ) , overrides_with( "no_refresh" ) ) ]
379377 pub ( crate ) refresh : bool ,
@@ -1786,6 +1784,33 @@ pub(crate) struct RunArgs {
17861784 #[ arg( long) ]
17871785 pub ( crate ) with : Vec < String > ,
17881786
1787+ /// Refresh all cached data.
1788+ #[ arg( long, conflicts_with( "offline" ) , overrides_with( "no_refresh" ) ) ]
1789+ pub ( crate ) refresh : bool ,
1790+
1791+ #[ arg(
1792+ long,
1793+ conflicts_with( "offline" ) ,
1794+ overrides_with( "refresh" ) ,
1795+ hide = true
1796+ ) ]
1797+ pub ( crate ) no_refresh : bool ,
1798+
1799+ /// Refresh cached data for a specific package.
1800+ #[ arg( long) ]
1801+ pub ( crate ) refresh_package : Vec < PackageName > ,
1802+
1803+ /// Allow package upgrades, ignoring pinned versions in the existing lockfile.
1804+ #[ arg( long, short = 'U' , overrides_with( "no_upgrade" ) ) ]
1805+ pub ( crate ) upgrade : bool ,
1806+
1807+ #[ arg( long, overrides_with( "upgrade" ) , hide = true ) ]
1808+ pub ( crate ) no_upgrade : bool ,
1809+
1810+ /// Allow upgrades for a specific package, ignoring pinned versions in the existing lockfile.
1811+ #[ arg( long, short = 'P' ) ]
1812+ pub ( crate ) upgrade_package : Vec < PackageName > ,
1813+
17891814 /// The Python interpreter to use to build the run environment.
17901815 ///
17911816 /// By default, `uv` uses the virtual environment in the current working directory or any parent
@@ -1822,6 +1847,22 @@ pub(crate) struct SyncArgs {
18221847 #[ arg( long, overrides_with( "all_extras" ) , hide = true ) ]
18231848 pub ( crate ) no_all_extras : bool ,
18241849
1850+ /// Refresh all cached data.
1851+ #[ arg( long, conflicts_with( "offline" ) , overrides_with( "no_refresh" ) ) ]
1852+ pub ( crate ) refresh : bool ,
1853+
1854+ #[ arg(
1855+ long,
1856+ conflicts_with( "offline" ) ,
1857+ overrides_with( "refresh" ) ,
1858+ hide = true
1859+ ) ]
1860+ pub ( crate ) no_refresh : bool ,
1861+
1862+ /// Refresh cached data for a specific package.
1863+ #[ arg( long) ]
1864+ pub ( crate ) refresh_package : Vec < PackageName > ,
1865+
18251866 /// The Python interpreter to use to build the run environment.
18261867 ///
18271868 /// By default, `uv` uses the virtual environment in the current working directory or any parent
@@ -1840,6 +1881,33 @@ pub(crate) struct SyncArgs {
18401881#[ derive( Args ) ]
18411882#[ allow( clippy:: struct_excessive_bools) ]
18421883pub ( crate ) struct LockArgs {
1884+ /// Refresh all cached data.
1885+ #[ arg( long, conflicts_with( "offline" ) , overrides_with( "no_refresh" ) ) ]
1886+ pub ( crate ) refresh : bool ,
1887+
1888+ #[ arg(
1889+ long,
1890+ conflicts_with( "offline" ) ,
1891+ overrides_with( "refresh" ) ,
1892+ hide = true
1893+ ) ]
1894+ pub ( crate ) no_refresh : bool ,
1895+
1896+ /// Refresh cached data for a specific package.
1897+ #[ arg( long) ]
1898+ pub ( crate ) refresh_package : Vec < PackageName > ,
1899+
1900+ /// Allow package upgrades, ignoring pinned versions in the existing lockfile.
1901+ #[ arg( long, short = 'U' , overrides_with( "no_upgrade" ) ) ]
1902+ pub ( crate ) upgrade : bool ,
1903+
1904+ #[ arg( long, overrides_with( "upgrade" ) , hide = true ) ]
1905+ pub ( crate ) no_upgrade : bool ,
1906+
1907+ /// Allow upgrades for a specific package, ignoring pinned versions in the existing lockfile.
1908+ #[ arg( long, short = 'P' ) ]
1909+ pub ( crate ) upgrade_package : Vec < PackageName > ,
1910+
18431911 /// The Python interpreter to use to build the run environment.
18441912 ///
18451913 /// By default, `uv` uses the virtual environment in the current working directory or any parent
0 commit comments