Skip to content

Add completion spec: uv#262

Merged
lucieleblanc merged 1 commit into
mainfrom
auto/command-spec-uv
Apr 10, 2026
Merged

Add completion spec: uv#262
lucieleblanc merged 1 commit into
mainfrom
auto/command-spec-uv

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

Add completion spec: uv

Add comprehensive command completion support for uv, the extremely fast Python package manager by Astral.

JSON Spec (command-signatures/json/uv.json)

Covers all top-level subcommands with their unique options, arguments, and nested subcommands:

Project management: run, init, add, remove, sync, lock, export, tree, version, format, audit
Tool management: tool run, tool install, tool upgrade, tool list, tool uninstall, tool update-shell, tool dir
Python management: python list, python install, python find, python pin, python dir, python uninstall
Pip interface: pip compile, pip sync, pip install, pip uninstall, pip freeze, pip list, pip show, pip tree, pip check
Packaging: venv, build, publish
Cache: cache clean, cache prune, cache dir, cache size
Other: self update, auth login/logout/token/dir, generate-shell-completion, help

Key features:

  • Static suggestions for all enum-type arguments (--resolution, --prerelease, --link-mode, --vcs, --build-backend, --format, etc.)
  • File/folder template completions where appropriate (--config-file, --cache-dir, --script, --output-file, etc.)
  • Global options defined at root level with isPersistent where applicable

Generators (command-signatures/src/generators/uv.rs)

5 dynamic generators:

Generator Used by Command
installed_tools tool upgrade, tool uninstall uv tool list
project_dependencies remove Parses pyproject.toml
pip_installed_packages pip uninstall, pip show uv pip list --format freeze
python_versions --python, python install, python pin uv python list --only-installed
installed_pythons python uninstall uv python list --only-installed

Validation

  • npm run format
  • script/presubmit ✅ (fmt, clippy, 54 tests passed)

Conversation: https://staging.warp.dev/conversation/9c9a6b2e-9963-4e2a-81de-e8b12ea0259d

This PR was generated with Oz.

Add comprehensive command completion support for uv, the extremely fast
Python package manager by Astral. Includes:

- Full JSON spec covering all subcommands: run, init, add, remove, sync,
  lock, export, tree, version, format, audit, tool (run/install/upgrade/
  list/uninstall/update-shell/dir), python (list/install/find/pin/dir/
  uninstall), pip (compile/sync/install/uninstall/freeze/list/show/tree/
  check), venv, build, publish, cache (clean/prune/dir/size), self
  (update), auth (login/logout/token/dir), generate-shell-completion, help

- 5 Rust generators for dynamic completions:
  - installed_tools: lists tools installed via uv tool
  - project_dependencies: parses pyproject.toml for project deps
  - pip_installed_packages: lists pip-installed packages
  - python_versions: lists installed Python versions
  - installed_pythons: lists managed Python versions for uninstall

Co-Authored-By: Oz <oz-agent@warp.dev>
lucieleblanc added a commit that referenced this pull request Apr 10, 2026
Copy link
Copy Markdown
Contributor Author

Generator Validation Screenshots

All 5 generators have been tested end-to-end in a local Warp build against the auto/command-spec-uv branch. Each screenshot shows the completions dropdown menu triggered by pressing Tab, confirming the generator produces meaningful, non-trivial output.

Testing Environment

  • uv v0.11.6 installed
  • Python versions: cpython-3.12.13, cpython-3.11.15 installed via uv python install
  • Tools: ruff (v0.15.10) and black (v26.3.1) installed via uv tool install
  • Project: Sample project at /tmp/uv-test-project with flask and requests dependencies
  • Pip packages: numpy, pandas, flask, requests and transitive deps installed in venv

1. installed_toolsuv tool upgrade <TAB>

Shows installed uv tool names (black v26.3.1, ruff v0.15.10).

installed_tools


2. project_dependenciesuv remove <TAB>

Shows project dependency names parsed from pyproject.toml (flask, requests).

project_dependencies


3. pip_installed_packagesuv pip show <TAB>

Shows installed pip package names with versions (blinker, certifi, charset-normalizer, click, flask, idna, etc.).

pip_installed_packages


4. python_versionsuv python pin <TAB>

Shows installed Python version strings (cpython-3.11.15, cpython-3.12.13, cpython-3.12.3).

python_versions


5. installed_pythonsuv python uninstall <TAB>

Shows installed Python versions for uninstallation (cpython-3.11.15, cpython-3.12.13, cpython-3.12.3).

installed_pythons


Screenshots hosted on temporary branch screenshots-temp (commit ee197dc). This branch can be deleted after review.

@lucieleblanc lucieleblanc marked this pull request as ready for review April 10, 2026 16:08
@linear
Copy link
Copy Markdown

linear Bot commented Apr 10, 2026

@lucieleblanc lucieleblanc merged commit 22e095c into main Apr 10, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the auto/command-spec-uv branch April 10, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants