Skip to content

Commit 83d8f8a

Browse files
committed
Hide
1 parent ab82b51 commit 83d8f8a

File tree

5 files changed

+45
-123
lines changed

5 files changed

+45
-123
lines changed

crates/uv-cli/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ pub enum Commands {
520520
/// Manage workspaces.
521521
#[command(
522522
after_help = "Use `uv help workspace` for more details.",
523-
after_long_help = ""
523+
after_long_help = "",
524+
hide = true
524525
)]
525526
Workspace(WorkspaceNamespace),
526527
/// The implementation of the build backend.
@@ -6850,6 +6851,7 @@ pub struct WorkspaceNamespace {
68506851
#[derive(Subcommand)]
68516852
pub enum WorkspaceCommand {
68526853
/// Display package metadata.
6854+
#[command(hide = true)]
68536855
Metadata(MetadataArgs),
68546856
}
68556857

crates/uv/src/commands/workspace/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct MetadataReport {
4949
members: Vec<WorkspaceMemberReport>,
5050
}
5151

52-
/// Display package metadata.
52+
/// Display metadata about the workspace.
5353
pub(crate) async fn metadata(
5454
project_dir: &Path,
5555
preview: Preview,

crates/uv/tests/it/help.rs

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ fn help() {
3333
venv Create a virtual environment
3434
build Build Python packages into source distributions and wheels
3535
publish Upload distributions to an index
36-
workspace Manage workspaces
3736
cache Manage uv's cache
3837
self Manage the uv executable
3938
generate-shell-completion Generate shell completion
@@ -99,27 +98,26 @@ fn help_flag() {
9998
Usage: uv [OPTIONS] <COMMAND>
10099
101100
Commands:
102-
auth Manage authentication
103-
run Run a command or script
104-
init Create a new project
105-
add Add dependencies to the project
106-
remove Remove dependencies from the project
107-
version Read or update the project's version
108-
sync Update the project's environment
109-
lock Update the project's lockfile
110-
export Export the project's lockfile to an alternate format
111-
tree Display the project's dependency tree
112-
format Format Python code in the project
113-
tool Run and install commands provided by Python packages
114-
python Manage Python versions and installations
115-
pip Manage Python packages with a pip-compatible interface
116-
venv Create a virtual environment
117-
build Build Python packages into source distributions and wheels
118-
publish Upload distributions to an index
119-
workspace Manage workspaces
120-
cache Manage uv's cache
121-
self Manage the uv executable
122-
help Display documentation for a command
101+
auth Manage authentication
102+
run Run a command or script
103+
init Create a new project
104+
add Add dependencies to the project
105+
remove Remove dependencies from the project
106+
version Read or update the project's version
107+
sync Update the project's environment
108+
lock Update the project's lockfile
109+
export Export the project's lockfile to an alternate format
110+
tree Display the project's dependency tree
111+
format Format Python code in the project
112+
tool Run and install commands provided by Python packages
113+
python Manage Python versions and installations
114+
pip Manage Python packages with a pip-compatible interface
115+
venv Create a virtual environment
116+
build Build Python packages into source distributions and wheels
117+
publish Upload distributions to an index
118+
cache Manage uv's cache
119+
self Manage the uv executable
120+
help Display documentation for a command
123121
124122
Cache options:
125123
-n, --no-cache Avoid reading from or writing to the cache, instead using a temporary
@@ -180,27 +178,26 @@ fn help_short_flag() {
180178
Usage: uv [OPTIONS] <COMMAND>
181179
182180
Commands:
183-
auth Manage authentication
184-
run Run a command or script
185-
init Create a new project
186-
add Add dependencies to the project
187-
remove Remove dependencies from the project
188-
version Read or update the project's version
189-
sync Update the project's environment
190-
lock Update the project's lockfile
191-
export Export the project's lockfile to an alternate format
192-
tree Display the project's dependency tree
193-
format Format Python code in the project
194-
tool Run and install commands provided by Python packages
195-
python Manage Python versions and installations
196-
pip Manage Python packages with a pip-compatible interface
197-
venv Create a virtual environment
198-
build Build Python packages into source distributions and wheels
199-
publish Upload distributions to an index
200-
workspace Manage workspaces
201-
cache Manage uv's cache
202-
self Manage the uv executable
203-
help Display documentation for a command
181+
auth Manage authentication
182+
run Run a command or script
183+
init Create a new project
184+
add Add dependencies to the project
185+
remove Remove dependencies from the project
186+
version Read or update the project's version
187+
sync Update the project's environment
188+
lock Update the project's lockfile
189+
export Export the project's lockfile to an alternate format
190+
tree Display the project's dependency tree
191+
format Format Python code in the project
192+
tool Run and install commands provided by Python packages
193+
python Manage Python versions and installations
194+
pip Manage Python packages with a pip-compatible interface
195+
venv Create a virtual environment
196+
build Build Python packages into source distributions and wheels
197+
publish Upload distributions to an index
198+
cache Manage uv's cache
199+
self Manage the uv executable
200+
help Display documentation for a command
204201
205202
Cache options:
206203
-n, --no-cache Avoid reading from or writing to the cache, instead using a temporary
@@ -895,7 +892,6 @@ fn help_unknown_subcommand() {
895892
venv
896893
build
897894
publish
898-
workspace
899895
cache
900896
self
901897
generate-shell-completion
@@ -925,7 +921,6 @@ fn help_unknown_subcommand() {
925921
venv
926922
build
927923
publish
928-
workspace
929924
cache
930925
self
931926
generate-shell-completion
@@ -984,7 +979,6 @@ fn help_with_global_option() {
984979
venv Create a virtual environment
985980
build Build Python packages into source distributions and wheels
986981
publish Upload distributions to an index
987-
workspace Manage workspaces
988982
cache Manage uv's cache
989983
self Manage the uv executable
990984
generate-shell-completion Generate shell completion
@@ -1108,7 +1102,6 @@ fn help_with_no_pager() {
11081102
venv Create a virtual environment
11091103
build Build Python packages into source distributions and wheels
11101104
publish Upload distributions to an index
1111-
workspace Manage workspaces
11121105
cache Manage uv's cache
11131106
self Manage the uv executable
11141107
generate-shell-completion Generate shell completion

docs/concepts/preview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The following preview features are available:
7272
- `format`: Allows using `uv format`.
7373
- `native-auth`: Enables storage of credentials in a
7474
[system-native location](../concepts/authentication/http.md#the-uv-credentials-store).
75+
- `workspace-metadata`: Allows using `uv workspace metadata`.
7576

7677
## Disabling preview features
7778

docs/reference/cli.md

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ uv [OPTIONS] <COMMAND>
2929
<dt><a href="#uv-venv"><code>uv venv</code></a></dt><dd><p>Create a virtual environment</p></dd>
3030
<dt><a href="#uv-build"><code>uv build</code></a></dt><dd><p>Build Python packages into source distributions and wheels</p></dd>
3131
<dt><a href="#uv-publish"><code>uv publish</code></a></dt><dd><p>Upload distributions to an index</p></dd>
32-
<dt><a href="#uv-workspace"><code>uv workspace</code></a></dt><dd><p>Manage workspaces</p></dd>
3332
<dt><a href="#uv-cache"><code>uv cache</code></a></dt><dd><p>Manage uv's cache</p></dd>
3433
<dt><a href="#uv-self"><code>uv self</code></a></dt><dd><p>Manage the uv executable</p></dd>
3534
<dt><a href="#uv-help"><code>uv help</code></a></dt><dd><p>Display documentation for a command</p></dd>
@@ -5905,79 +5904,6 @@ uv publish --publish-url https://upload.pypi.org/legacy/ --check-url https://pyp
59055904
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (<a href="https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives">https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives</a>)</p>
59065905
</dd></dl>
59075906

5908-
## uv workspace
5909-
5910-
Manage workspaces
5911-
5912-
<h3 class="cli-reference">Usage</h3>
5913-
5914-
```
5915-
uv workspace [OPTIONS] <COMMAND>
5916-
```
5917-
5918-
<h3 class="cli-reference">Commands</h3>
5919-
5920-
<dl class="cli-reference"><dt><a href="#uv-workspace-metadata"><code>uv workspace metadata</code></a></dt><dd><p>Display package metadata</p></dd>
5921-
</dl>
5922-
5923-
### uv workspace metadata
5924-
5925-
Display package metadata
5926-
5927-
<h3 class="cli-reference">Usage</h3>
5928-
5929-
```
5930-
uv workspace metadata [OPTIONS]
5931-
```
5932-
5933-
<h3 class="cli-reference">Options</h3>
5934-
5935-
<dl class="cli-reference"><dt id="uv-workspace-metadata--allow-insecure-host"><a href="#uv-workspace-metadata--allow-insecure-host"><code>--allow-insecure-host</code></a>, <code>--trusted-host</code> <i>allow-insecure-host</i></dt><dd><p>Allow insecure connections to a host.</p>
5936-
<p>Can be provided multiple times.</p>
5937-
<p>Expects to receive either a hostname (e.g., <code>localhost</code>), a host-port pair (e.g., <code>localhost:8080</code>), or a URL (e.g., <code>https://localhost</code>).</p>
5938-
<p>WARNING: Hosts included in this list will not be verified against the system's certificate store. Only use <code>--allow-insecure-host</code> in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.</p>
5939-
<p>May also be set with the <code>UV_INSECURE_HOST</code> environment variable.</p></dd><dt id="uv-workspace-metadata--cache-dir"><a href="#uv-workspace-metadata--cache-dir"><code>--cache-dir</code></a> <i>cache-dir</i></dt><dd><p>Path to the cache directory.</p>
5940-
<p>Defaults to <code>$XDG_CACHE_HOME/uv</code> or <code>$HOME/.cache/uv</code> on macOS and Linux, and <code>%LOCALAPPDATA%\uv\cache</code> on Windows.</p>
5941-
<p>To view the location of the cache directory, run <code>uv cache dir</code>.</p>
5942-
<p>May also be set with the <code>UV_CACHE_DIR</code> environment variable.</p></dd><dt id="uv-workspace-metadata--color"><a href="#uv-workspace-metadata--color"><code>--color</code></a> <i>color-choice</i></dt><dd><p>Control the use of color in output.</p>
5943-
<p>By default, uv will automatically detect support for colors when writing to a terminal.</p>
5944-
<p>Possible values:</p>
5945-
<ul>
5946-
<li><code>auto</code>: Enables colored output only when the output is going to a terminal or TTY with support</li>
5947-
<li><code>always</code>: Enables colored output regardless of the detected environment</li>
5948-
<li><code>never</code>: Disables colored output</li>
5949-
</ul></dd><dt id="uv-workspace-metadata--config-file"><a href="#uv-workspace-metadata--config-file"><code>--config-file</code></a> <i>config-file</i></dt><dd><p>The path to a <code>uv.toml</code> file to use for configuration.</p>
5950-
<p>While uv configuration can be included in a <code>pyproject.toml</code> file, it is not allowed in this context.</p>
5951-
<p>May also be set with the <code>UV_CONFIG_FILE</code> environment variable.</p></dd><dt id="uv-workspace-metadata--directory"><a href="#uv-workspace-metadata--directory"><code>--directory</code></a> <i>directory</i></dt><dd><p>Change to the given directory prior to running the command.</p>
5952-
<p>Relative paths are resolved with the given directory as the base.</p>
5953-
<p>See <code>--project</code> to only change the project root directory.</p>
5954-
<p>May also be set with the <code>UV_WORKING_DIRECTORY</code> environment variable.</p></dd><dt id="uv-workspace-metadata--help"><a href="#uv-workspace-metadata--help"><code>--help</code></a>, <code>-h</code></dt><dd><p>Display the concise help for this command</p>
5955-
</dd><dt id="uv-workspace-metadata--managed-python"><a href="#uv-workspace-metadata--managed-python"><code>--managed-python</code></a></dt><dd><p>Require use of uv-managed Python versions.</p>
5956-
<p>By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.</p>
5957-
<p>May also be set with the <code>UV_MANAGED_PYTHON</code> environment variable.</p></dd><dt id="uv-workspace-metadata--native-tls"><a href="#uv-workspace-metadata--native-tls"><code>--native-tls</code></a></dt><dd><p>Whether to load TLS certificates from the platform's native certificate store.</p>
5958-
<p>By default, uv loads certificates from the bundled <code>webpki-roots</code> crate. The <code>webpki-roots</code> are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).</p>
5959-
<p>However, in some cases, you may want to use the platform's native certificate store, especially if you're relying on a corporate trust root (e.g., for a mandatory proxy) that's included in your system's certificate store.</p>
5960-
<p>May also be set with the <code>UV_NATIVE_TLS</code> environment variable.</p></dd><dt id="uv-workspace-metadata--no-cache"><a href="#uv-workspace-metadata--no-cache"><code>--no-cache</code></a>, <code>--no-cache-dir</code>, <code>-n</code></dt><dd><p>Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation</p>
5961-
<p>May also be set with the <code>UV_NO_CACHE</code> environment variable.</p></dd><dt id="uv-workspace-metadata--no-config"><a href="#uv-workspace-metadata--no-config"><code>--no-config</code></a></dt><dd><p>Avoid discovering configuration files (<code>pyproject.toml</code>, <code>uv.toml</code>).</p>
5962-
<p>Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.</p>
5963-
<p>May also be set with the <code>UV_NO_CONFIG</code> environment variable.</p></dd><dt id="uv-workspace-metadata--no-managed-python"><a href="#uv-workspace-metadata--no-managed-python"><code>--no-managed-python</code></a></dt><dd><p>Disable use of uv-managed Python versions.</p>
5964-
<p>Instead, uv will search for a suitable Python version on the system.</p>
5965-
<p>May also be set with the <code>UV_NO_MANAGED_PYTHON</code> environment variable.</p></dd><dt id="uv-workspace-metadata--no-progress"><a href="#uv-workspace-metadata--no-progress"><code>--no-progress</code></a></dt><dd><p>Hide all progress outputs.</p>
5966-
<p>For example, spinners or progress bars.</p>
5967-
<p>May also be set with the <code>UV_NO_PROGRESS</code> environment variable.</p></dd><dt id="uv-workspace-metadata--no-python-downloads"><a href="#uv-workspace-metadata--no-python-downloads"><code>--no-python-downloads</code></a></dt><dd><p>Disable automatic downloads of Python.</p>
5968-
</dd><dt id="uv-workspace-metadata--offline"><a href="#uv-workspace-metadata--offline"><code>--offline</code></a></dt><dd><p>Disable network access.</p>
5969-
<p>When disabled, uv will only use locally cached data and locally available files.</p>
5970-
<p>May also be set with the <code>UV_OFFLINE</code> environment variable.</p></dd><dt id="uv-workspace-metadata--project"><a href="#uv-workspace-metadata--project"><code>--project</code></a> <i>project</i></dt><dd><p>Run the command within the given project directory.</p>
5971-
<p>All <code>pyproject.toml</code>, <code>uv.toml</code>, and <code>.python-version</code> files will be discovered by walking up the directory tree from the project root, as will the project's virtual environment (<code>.venv</code>).</p>
5972-
<p>Other command-line arguments (such as relative paths) will be resolved relative to the current working directory.</p>
5973-
<p>See <code>--directory</code> to change the working directory entirely.</p>
5974-
<p>This setting has no effect when used in the <code>uv pip</code> interface.</p>
5975-
<p>May also be set with the <code>UV_PROJECT</code> environment variable.</p></dd><dt id="uv-workspace-metadata--quiet"><a href="#uv-workspace-metadata--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
5976-
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
5977-
</dd><dt id="uv-workspace-metadata--verbose"><a href="#uv-workspace-metadata--verbose"><code>--verbose</code></a>, <code>-v</code></dt><dd><p>Use verbose output.</p>
5978-
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (<a href="https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives">https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives</a>)</p>
5979-
</dd></dl>
5980-
59815907
## uv cache
59825908

59835909
Manage uv's cache

0 commit comments

Comments
 (0)