Skip to content

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Oct 30, 2025

This adds the scaffolding for a uv workspace metadata command, as an equivalent to cargo metadata, for integration with downstream tools. I didn't do much here beyond emit the workspace root path and the paths of the workspace members. I explored doing a bit more in #16638, but I think we're actually going to want to come up with a fairly comprehensive schema like cargo metadata has. I've started exploring that too, but I don't have a concrete proposal to share yet.

I don't want this to be a top-level command because I think people would expect uv metadata <PACKAGE> to show metadata about arbitrary packages (this has been requested several times). I also think we can do other things in the workspace namespace to make trivial integrations simpler, like uv workspace list (enumerate members) and uv workspace dir (show the path to the workspace root).

I don't expect this to be stable at all to start. I've both gated it with preview and hidden it from the help. The intent is to merge so we can iterate on it as we figure out what integrations need.

@elephantum
Copy link

elephantum commented Nov 7, 2025

I was looking exactly for this sort of functionality today.

It would be great if alongside with names of workspace packages, this command could return their dependencies (I'm specifically interested in dependency relations between workspace members)

@zanieb
Copy link
Member Author

zanieb commented Nov 7, 2025

I actually have that implemented locally — I need the exact same feature :) it's just more complicated so I was going to open a separate pull request.

@zanieb zanieb marked this pull request as ready for review November 10, 2025 22:33
@zanieb zanieb temporarily deployed to uv-test-registries November 10, 2025 22:51 — with GitHub Actions Inactive
@zanieb zanieb added the cli Related to the command line interface label Nov 10, 2025
members: Vec<WorkspaceMemberReport>,
}

/// Display package metadata.
Copy link
Member

@charliermarsh charliermarsh Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Project metadata, maybe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, "workspace metadata"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shameful AI slop, thanks!

@zanieb zanieb enabled auto-merge (squash) November 11, 2025 15:35
@zanieb zanieb temporarily deployed to uv-test-registries November 11, 2025 15:36 — with GitHub Actions Inactive
@zanieb zanieb merged commit 3ccad58 into main Nov 11, 2025
99 checks passed
@zanieb zanieb deleted the zb/metadata branch November 11, 2025 15:46
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 14, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.8` -> `0.9.9` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.9.9`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#099)

[Compare Source](astral-sh/uv@0.9.8...0.9.9)

Released on 2025-11-12.

##### Deprecations

- Deprecate use of `--project` in `uv init` ([#&#8203;16674](astral-sh/uv#16674))

##### Enhancements

- Add iOS support to Python interpreter discovery ([#&#8203;16686](astral-sh/uv#16686))
- Reject ambiguously parsed URLs ([#&#8203;16622](astral-sh/uv#16622))
- Allow explicit values in `uv version --bump` ([#&#8203;16555](astral-sh/uv#16555))
- Warn on use of managed pre-release Python versions when a stable version is available ([#&#8203;16619](astral-sh/uv#16619))
- Allow signing trampolines on Windows by using `.rcdata` to store metadata ([#&#8203;15068](astral-sh/uv#15068))
- Add `--only-emit-workspace` and similar variants to `uv export` ([#&#8203;16681](astral-sh/uv#16681))

##### Preview features

- Add `uv workspace dir` command ([#&#8203;16678](astral-sh/uv#16678))
- Add `uv workspace metadata` command ([#&#8203;16516](astral-sh/uv#16516))

##### Configuration

- Add `UV_NO_DEFAULT_GROUPS` environment variable ([#&#8203;16645](astral-sh/uv#16645))

##### Bug fixes

- Remove `torch-model-archiver` and `torch-tb-profiler` from PyTorch backend ([#&#8203;16655](astral-sh/uv#16655))
- Fix Pixi environment detection ([#&#8203;16585](astral-sh/uv#16585))

##### Documentation

- Fix `CMD` path in FastAPI Dockerfile ([#&#8203;16701](astral-sh/uv#16701))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the command line interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants