#7660·uv

Allow command for `tool.uv.index-url` and `tool.uv.pip.index-url`

Author: jpedrickCreated Sep 24, 2024Updated Sep 25, 2026
Labelsneeds-designneeds-decision

UV currently supports using a keyring for the credential provider. However, in my case it's not always practical. I would like to have a simple command line script: get_pip_credentials.sh that could invoke something like:

scripts/get-pip-credentials.sh

aws codeartifact login --tool pip --domain my_domain --repository python --dry-run --profile pip-read-access | cut -d " " -f 5

So, in my pyproject.toml:

[tool.uv]
index-url = { 'command' : [ './scripts/get-pip-credentials.sh' ] }

[tool.uv.pip]
index-url = { 'command' : [ './scripts/get-pip-credentials.sh' ] }

Likewise, if --index-url is specified on the command line, I would prefer that to override tool.uv.index-url.command and tool.uv.pip.index-url.command