# Extension points — astral-sh/uv

> Canonical page: https://codevetter.com/unpack/uv/extension-points

# Extension points — astral-sh/uv

Scanned commit a9e231a7e377342084d1c0b6009409bdec41acc5 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

uv does not load third-party Rust plugins. Extension is by adding a clap command variant, a settings field, a cache bucket, a preview flag, or a build-backend hook. Indexes, find-links directories, and keyring providers are the user-facing plugin surface. New resolver behavior plugs in through ResolverProvider and the PubGrub dependency provider. Documentation and the JSON schema are generated from the same types, so a new flag is incomplete until uv-dev regenerates the references.
- New CLI commands are added as variants on Commands or on the nested enums ProjectCommand, PipCommand, ToolCommand, PythonCommand, AuthCommand, CacheCommand, and WorkspaceCommand in crates/uv-cli/src/lib.rs, then matched in crates/uv/src/lib.rs. Help is data-driven from clap, not a separate route table. — [crates/uv-cli/src/lib.rs#L451-L614](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-cli/src/lib.rs#L451-L614) [crates/uv/src/lib.rs#L638-L692](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/src/lib.rs#L638-L692)
- User indexes are the main external integration point. CLI and config accept UV_INDEX, UV_DEFAULT_INDEX, UV_EXTRA_INDEX_URL, and UV_FIND_LINKS. RegistryClient::simple_detail walks those indexes using IndexStrategy. uv publish looks up a named index and uses its publish_url. — [crates/uv-static/src/env_vars.rs#L37-L59](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-static/src/env_vars.rs#L37-L59) [crates/uv-client/src/registry_client.rs#L346-L376](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-client/src/registry_client.rs#L346-L376) [crates/uv/src/commands/publish.rs#L49-L80](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/src/commands/publish.rs#L49-L80)
- Authentication providers plug in through AuthBackend (system keyring or TextCredentialStore), KeyringProvider on AuthMiddleware, and netrc or URL credentials via Credentials::from_url and Credentials::from_env. The Bazel auth helper is a separate protocol enum with a single variant. — [crates/uv-auth/src/store.rs#L21-L36](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-auth/src/store.rs#L21-L36) [crates/uv-auth/src/middleware.rs#L248-L285](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-auth/src/middleware.rs#L248-L285) [crates/uv-auth/src/credentials.rs#L232-L269](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-auth/src/credentials.rs#L232-L269) [crates/uv-cli/src/lib.rs#L5424-L5431](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-cli/src/lib.rs#L5424-L5431)
- Build backends are an external plugin surface. uv-build-frontend speaks PEP 517. The in-tree backend is uv_build_backend::build_source_dist, build_wheel, and build_editable, invoked either by the hidden uv build-backend command or by the uv-build Python entrypoint's build-sdist command. — [crates/README.md#L49-L52](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/README.md#L49-L52) [crates/uv-build-backend/src/lib.rs#L9-L13](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-build-backend/src/lib.rs#L9-L13) [crates/uv-cli/src/lib.rs#L7932-L7944](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-cli/src/lib.rs#L7932-L7944) [crates/uv-build/src/main.rs#L71-L79](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-build/src/main.rs#L71-L79)
- Resolver extension is Resolver::new plus the provider passed into it. uv-resolver re-exports DefaultResolverProvider, ResolverProvider, InMemoryIndex, and OptionsBuilder. A new dependency kind has to be represented in the manifest, the PubGrub package model, and Lock::from_resolution or it will not round-trip through uv.lock. — [crates/uv-resolver/src/lib.rs#L1-L26](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-resolver/src/lib.rs#L1-L26) [crates/uv/src/commands/pip/operations.rs#L389-L410](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/src/commands/pip/operations.rs#L389-L410) [crates/uv/src/commands/project/lock.rs#L1127-L1136](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/src/commands/project/lock.rs#L1127-L1136)
- PreviewFeature is the feature-flag registry. Adding a variant to the enumflags2 enum requires a display name via PreviewMetadata, and docs are regenerated by uv-dev generate-preview-features-reference. UV_PREVIEW enables every flag; UV_PREVIEW_FEATURES takes an explicit list. — [crates/uv-preview/src/lib.rs#L224-L230](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-preview/src/lib.rs#L224-L230) [crates/uv-preview/src/lib.rs#L349-L368](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-preview/src/lib.rs#L349-L368) [crates/uv-dev/src/lib.rs#L67-L69](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-dev/src/lib.rs#L67-L69) [crates/uv-build/src/main.rs#L44-L60](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-build/src/main.rs#L44-L60)
- Cache layout is a closed CacheBucket enum. New persistent data needs a new variant and a versioned directory name (the comment says bumps must also update references in cache_prune.rs, cache_clean.rs, or lock tests). Atomic directory replacement is done by storing blobs in Archive and symlinking them into other buckets. — [crates/uv-cache/src/lib.rs#L1275-L1327](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-cache/src/lib.rs#L1275-L1327)
- Settings fields are added on Options and FilesystemOptions and merged by the Combine trait. The JSON schema for uv.toml is generated by uv-dev generate-json-schema, and the settings reference by generate-options-reference. check-generated-files.yml fails CI if those outputs drift. — [crates/uv-settings/src/combine.rs#L25-L39](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-settings/src/combine.rs#L25-L39) [crates/uv-dev/src/lib.rs#L58-L65](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-dev/src/lib.rs#L58-L65) [.github/workflows/ci.yml#L85-L91](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/.github/workflows/ci.yml#L85-L91)
- Python discovery request syntax is itself an extension point documented on the Python command: version specifiers, implementation names, freethreaded and debug variants, target triples, executable paths, and install directories. New interpreter kinds have to be recognized by uv-python or they are skipped as unsupported. — [crates/uv-cli/src/lib.rs#L470-L511](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-cli/src/lib.rs#L470-L511)
- Workspace membership is discovered by Workspace::discover and VirtualProject::discover in uv-workspace, with a WorkspaceCache. New project layouts have to be found there before lock, sync, or run will see them. DiscoveryOptions controls member discovery, including MemberDiscovery::Existing in frozen sync. — [crates/uv-workspace/src/workspace.rs#L292](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-workspace/src/workspace.rs#L292) [crates/uv-workspace/src/workspace.rs#L337](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-workspace/src/workspace.rs#L337) [crates/uv/src/commands/project/sync.rs#L108-L119](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/src/commands/project/sync.rs#L108-L119)
- The uv-dev CLI is the internal extension tool, not a user plugin host. Its subcommands generate schema, CLI reference, env-var reference, preview-feature docs, Packse scenario tests, and sysconfig mappings. ROOT_DIR is the repository root computed from CARGO_MANIFEST_DIR. — [crates/uv-dev/src/lib.rs#L42-L77](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-dev/src/lib.rs#L42-L77)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
