uv/docs/reference
justin c48af312ae
Add --marker flag to uv add (#12012)
## Summary

Add a `--marker` flag to `uv add` which applies a marker to all given
requirements.

Example:

```
$ uv-debug add --marker "platform_machine == 'x86_64'" \
    "anyio>=2.31.0" \
    "iniconfig>=2; sys_platform != 'win32'" \
    "numpy>1.19; sys_platform == 'win32'"
```

```toml
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.12.0"
dependencies = [
    "anyio>=2.31.0 ; platform_machine == 'x86_64'",
    "iniconfig>=2 ; platform_machine == 'x86_64' and sys_platform != 'win32'",
    "numpy>1.19 ; platform_machine == 'x86_64' and sys_platform == 'win32'",
]
```

Fixes https://github.com/astral-sh/uv/issues/11987


## Test Plan

Added snapshot tests

---------

Co-authored-by: konstin <konstin@mailbox.org>
2025-03-11 16:29:36 +01:00
..
policies Update versioning policy (#11666) 2025-03-07 11:12:07 -06:00
troubleshooting Add tool.uv.build-constraint-dependencies to pyproject.toml (#11585) 2025-02-17 20:58:36 -05:00
benchmarks.md Add link to benchmarks in documentation (#6257) 2024-08-20 12:54:46 -04:00
cli.md Add --marker flag to uv add (#12012) 2025-03-11 16:29:36 +01:00
index.md Add policies reference section and license document (#9367) 2024-12-03 10:56:32 -06:00
resolver-internals.md Update resolver internals docs (#11098) 2025-02-04 13:06:27 +00:00
settings.md Fix reference to macOS cache path (#11845) 2025-02-28 02:14:09 +00:00