mirror of
https://github.com/astral-sh/uv.git
synced 2025-12-23 09:19:48 +00:00
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / lint (push) Waiting to run
CI / cargo clippy | ubuntu (push) Blocked by required conditions
CI / cargo clippy | windows (push) Blocked by required conditions
CI / cargo dev generate-all (push) Blocked by required conditions
CI / cargo shear (push) Waiting to run
CI / cargo test | ubuntu (push) Blocked by required conditions
CI / cargo test | macos (push) Blocked by required conditions
CI / check windows trampoline | aarch64 (push) Blocked by required conditions
CI / check windows trampoline | i686 (push) Blocked by required conditions
CI / test windows trampoline | x86_64 (push) Blocked by required conditions
CI / typos (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / build binary | linux libc (push) Blocked by required conditions
CI / build binary | linux aarch64 (push) Blocked by required conditions
CI / build binary | linux musl (push) Blocked by required conditions
CI / ecosystem test | pydantic/pydantic-core (push) Blocked by required conditions
CI / build binary | freebsd (push) Blocked by required conditions
CI / ecosystem test | prefecthq/prefect (push) Blocked by required conditions
CI / ecosystem test | pallets/flask (push) Blocked by required conditions
CI / smoke test | linux aarch64 (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / smoke test | macos (push) Blocked by required conditions
CI / smoke test | windows aarch64 (push) Blocked by required conditions
CI / cargo test | windows (push) Blocked by required conditions
CI / build binary | macos aarch64 (push) Blocked by required conditions
CI / check windows trampoline | x86_64 (push) Blocked by required conditions
CI / test windows trampoline | aarch64 (push) Blocked by required conditions
CI / test windows trampoline | i686 (push) Blocked by required conditions
CI / build binary | macos x86_64 (push) Blocked by required conditions
CI / build binary | windows x86_64 (push) Blocked by required conditions
CI / build binary | windows aarch64 (push) Blocked by required conditions
CI / build binary | msrv (push) Blocked by required conditions
CI / smoke test | windows x86_64 (push) Blocked by required conditions
CI / integration test | conda on ubuntu (push) Blocked by required conditions
CI / integration test | uv publish (push) Blocked by required conditions
CI / integration test | deadsnakes python3.9 on ubuntu (push) Blocked by required conditions
CI / integration test | free-threaded on windows (push) Blocked by required conditions
CI / smoke test | linux (push) Blocked by required conditions
CI / integration test | activate nushell venv (push) Blocked by required conditions
CI / integration test | aarch64 windows implicit (push) Blocked by required conditions
CI / integration test | aarch64 windows explicit (push) Blocked by required conditions
CI / integration test | windows python install manager (push) Blocked by required conditions
CI / integration test | graalpy on ubuntu (push) Blocked by required conditions
CI / integration test | graalpy on windows (push) Blocked by required conditions
CI / integration test | pyodide on ubuntu (push) Blocked by required conditions
CI / integration test | github actions (push) Blocked by required conditions
CI / integration test | determine publish changes (push) Blocked by required conditions
CI / integration test | registries (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on rocky linux 10 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | aarch64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / benchmarks | walltime aarch64 linux (push) Blocked by required conditions
CI / integration test | pypy on ubuntu (push) Blocked by required conditions
CI / integration test | pypy on windows (push) Blocked by required conditions
CI / integration test | free-threaded python on github actions (push) Blocked by required conditions
CI / integration test | pyenv on wsl x86-64 (push) Blocked by required conditions
CI / integration test | uv_build (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | graalpy on ubuntu (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | x86-64 python on macos aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks | instrumented (push) Blocked by required conditions
zizmor / Run zizmor (push) Waiting to run
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> > 4. Hyphenate compound words, e.g., use "platform-specific" not "platform specific". Applies to "command line arguments" -> "command-line arguments".
5.2 KiB
5.2 KiB
Style guide
The following is a work-in-progress style guide for our user-facing messaging in the CLI output and documentation.
General
- Use of "e.g." and "i.e." should always be wrapped in commas, e.g., as shown here.
- Em-dashes are okay, but not recommended when using monospace fonts. Use "—", not "--" or "-".
- Always wrap em-dashes in spaces, e.g., "hello — world" not "hello—world".
- Hyphenate compound words, e.g., use "platform-specific" not "platform specific".
- Use backticks to escape: commands, code expressions, package names, and file paths.
- Use less than and greater than symbols to wrap bare URLs, e.g.,
<https://astral.sh>(unless it is an example; then, use backticks). - Avoid bare URLs outside of reference documentation, prefer labels, e.g.,
[name](url). - If a message ends with a single relevant value, precede it with a colon, e.g.,
This is the value: value. If the value is a literal, wrap it in backticks. - Markdown files should be wrapped at 100 characters.
- Use a space, not an equals sign, for command-line arguments with a value, e.g.
--resolution lowest, not--resolution=lowest.
Styling uv
Just uv, please.
- Do not escape with backticks, e.g.,
uv, unless referring specifically to theuvexecutable. - Do not capitalize, e.g., "Uv", even at the beginning of a sentence.
- Do not uppercase, e.g., "UV", unless referring to an environment variable, e.g.,
UV_PYTHON.
Terminology
- Use "lockfile" not "lock file".
- Use "pre-release", not "prerelease" (except in code, in which case: use
Prerelease, notPreRelease; andprerelease, notpre_release).
Documentation
- Use periods at the end of all sentences, including lists unless they enumerate single items.
- Avoid language that patronizes the reader, e.g., "simply do this".
- Only refer to "the user" in internal or contributor documentation.
- Avoid "we" in favor of "uv" or imperative language.
Sections
The documentation is divided into:
- Guides
- Concepts
- Reference documentation
Guides
- Should assume no previous knowledge about uv.
- May assume basic knowledge of the domain.
- Should refer to relevant concept documentation.
- Should have a clear flow.
- Should be followed by a clear call to action.
- Should cover the basic behavior needed to get started.
- Should not cover behavior in detail.
- Should not enumerate all possibilities.
- Should avoid linking to reference documentation unless not covered in a concept document.
- May generally ignore platform-specific behavior.
- Should be written from second-person point of view.
- Should use the imperative voice.
Concepts
- Should cover behavior in detail.
- Should not enumerate all possibilities.
- Should cover most common configuration.
- Should refer to the relevant reference documentation.
- Should discuss platform-specific behavior.
- Should be written from the third-person point of view, not second-person (i.e., avoid "you").
- Should not use the imperative voice.
Reference documentation
- Should enumerate all options.
- Should generally be generated from documentation in the code.
- Should be written from the third-person point of view, not second-person (i.e., avoid "you").
- Should not use the imperative voice.
Code blocks
- All code blocks should have a language marker.
- When using
consolesyntax, use$to indicate commands — everything else is output. - Never use the
bashsyntax when displaying command output. - Prefer
consolewith$prefixed commands overbash. - Command output should rarely be included — it's hard to keep up-to-date.
- Use
titlefor example files, e.g.,pyproject.toml,Dockerfile, orexample.py.
CLI
- Do not use periods at the end of sentences :), unless the message spans more than a single sentence.
- May use the second-person point of view, e.g., "Did you mean...?".
Colors and style
- All CLI output must be interpretable and understandable without the use of color and other styling. (For example: even if a command is rendered in green, wrap it in backticks.)
NO_COLORmust be respected when using any colors or styling.UV_NO_PROGRESSmust be respected when using progress-styling like bars or spinners.- In general, use:
- Green for success.
- Red for error.
- Yellow for warning.
- Cyan for hints.
- Cyan for file paths.
- Cyan for important user-facing literals (e.g., a package name in a message).
- Green for commands.
Logging
warn,info,debug, andtracelogs are all shown with the--verboseflag.- Note that the displayed level is controlled with
RUST_LOG.
- Note that the displayed level is controlled with
- All logging should be to stderr.
Output
- Text can be written to stdout if it is "data" that could be piped to another program.
Warnings
warn_userandwarn_user_onceare shown without the--verboseflag.- These methods should be preferred over tracing warnings when the warning is actionable.
- Deprecation warnings should use these methods.
- Deprecation warnings must be actionable.
Hints
- Errors may be followed by hints suggesting a solution.
- Hints should be separated from errors by a blank newline.
- Hints should be stylized as
hint: <content>.