--- id: uv-sort version: "0.7.1" license: unclear license_treatment: permissive maintenance: active --- # uv-sort — Sort uv's dependencies alphabetically License: permissive · Maintenance: active · Downloads: 220.0K/mo ## What it is and what it does uv-sort is a command-line tool that alphabetically sorts dependencies in uv project configuration files. It reads and rewrites pyproject.toml files to organize dependencies across multiple sections—dependency-groups, project.dependencies, project.optional-dependencies, tool.uv.dev-dependencies, and tool.uv.sources—into alphabetical order. The tool runs as a standalone CLI and integrates with pre-commit and Lefthook workflows. It offers a --check flag to verify whether dependencies are already sorted, a --dry-run flag to preview changes without writing, and can be invoked directly or through uv's tools system (uvx) without installation. The package depends on tomlrt for TOML parsing and typer for CLI argument handling. Use it for: - Enforce consistent dependency ordering in CI/CD pipelines using the --check flag to fail builds when dependencies are unsorted. - Integrate into pre-commit hooks to automatically sort dependencies before commits are accepted. - Standardize dependency organization across multiple uv-based projects without manual editing. - Preview dependency sorting changes with --dry-run before applying them to pyproject.toml. - Run as a one-off tool via uvx without installing it locally to sort a single project's dependencies. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Alphabetically sorts dependencies in uv's pyproject.toml configuration files across dependency-groups, project.dependencies, optional-dependencies, dev-dependencies, and sources sections. Yes. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. Install it if you use uv and want to enforce alphabetical dependency ordering in your projects—or use uvx to run it on demand without installation. ## Install pip install uv-sort uv add uv-sort poetry add uv-sort ## Installing uv-sort Before you install: Low friction: pure Python wheel with only two runtime dependencies (tomlrt and typer). Actively maintained with a recent release; last commit on 2026-06-28. License in practice: MIT license (permissive); no restrictions on use, modification, or distribution. Quickstart: pip install uv-sort # Sort dependencies in pyproject.toml in current directory uv-sort # Or specify a path uv-sort /path/to/pyproject.toml # Check without modifying uv-sort --check ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 220.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sort uv dependencies, alphabetize pyproject.toml, uv dependency organizer, pyproject.toml formatter, dependency sorting tool, dependency-management, uv-ecosystem, pre-commit-ready [View on SkillFed](https://skillfed.io/packages/uv-sort) · [View on PyPI](https://pypi.org/project/uv-sort/)