Skip to content

Add a --output and -o flag to uv export #7058

@SamEdwardes

Description

@SamEdwardes

Background

Thank you for adding the uv export command. It is a great feature. One improvement that would be helpful is to include an option to export the data to a file. For example, currently you can do this:

uv export > requirements.txt

However, it would be a nice feature to have an output flag. For example:

uv export --output requirements.txt
# or...
uv export -o requirements.txt

This is the same approach that poetry uses: https://python-poetry.org/docs/cli/#export

Why

Using > or >> requires the user to have more advanced shell knowledge. Having an output flag could be easier for users.

System

❯ uv --version
uv 0.4.5 (42b6bfbad 2024-09-04)

Metadata

Metadata

Assignees

Labels

cliRelated to the command line interfaceenhancementNew feature or improvement to existing functionalitygood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions