diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index f883344713926..4fb33b032976e 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -5662,12 +5662,13 @@ pub struct PublishArgs { /// /// With these settings, the following two calls are equivalent: /// - /// ``` + /// ```shell /// uv publish --index pypi /// uv publish --publish-url https://upload.pypi.org/legacy/ --check-url https://pypi.org/simple /// ``` #[arg( long, + verbatim_doc_comment, env = EnvVars::UV_PUBLISH_INDEX, conflicts_with = "publish_url", conflicts_with = "check_url" diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 293a41e6ca789..5916ab7ba9eb8 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -8821,9 +8821,17 @@ uv publish [OPTIONS] [FILES]...

The index must have a publish-url setting, for example:

-
The index `url` will be used to check for existing files to skip duplicate uploads.
+
[[tool.uv.index]]
+name = "pypi"
+url = "https://pypi.org/simple"
+publish-url = "https://upload.pypi.org/legacy/"
-With these settings, the following two calls are equivalent:
+

The index url will be used to check for existing files to skip duplicate uploads.

+ +

With these settings, the following two calls are equivalent:

+ +
uv publish --index pypi
+uv publish --publish-url https://upload.pypi.org/legacy/ --check-url https://pypi.org/simple

May also be set with the UV_PUBLISH_INDEX environment variable.

--keyring-provider keyring-provider

Attempt to use keyring for authentication for remote requirements files.