Skip to content

Conversation

@GavinAstk
Copy link

Description

Fix incorrect uv package manager configuration in CLI extension documentation. The current documentation uses [project.scripts] which creates standalone executables instead of registering commands with the Litestar CLI group.

Changes Made

  • Replaced [project.scripts] configuration with correct [project.entry-points."litestar.commands"] in CLI extension examples
  • Updated documentation to align with Litestar source code that searches for litestar.commands entry point group
  • Ensured compatibility with uv and other PEP 621 compliant package managers

Closes

close #4455

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4456

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just above the changed like we have tool.poetry.plugins, which is deprecated: https://python-poetry.org/docs/pyproject#plugins

Can you please update it as well?

…t.entry-points]` for CLI command registration to ensure PEP 621 compliance. (litestar-org#4455)
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@GavinAstk
Copy link
Author

@sobolevn Thanks for pointing that out! I've updated the deprecated tool.poetry.plugins configuration to use the standard [project.entry-points] format as requested. The changes are now included in this PR.

:caption: Using `uv <https://docs.astral.sh/uv/>`_
[project.scripts]
[project.entry-points."litestar.commands"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this has been standardised across tools, these individual tool-specific sections are unnecessary and should just be removed entirely

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend changing this section to clarify that any build backend supporting the PEP 621 standard can register commands using the following syntax within the pyproject.toml file:

[project.entry-points."litestar.commands"]
my_command = "my_litestar_plugin.cli:main"

This generalizes the approach beyond a specific tool and aligns with modern Python packaging practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs This PR involves changes to the documentation pr/external size: small Triage Required 🏥 This requires triage type/docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Incorrect uv configuration for CLI extensions in "Using entry points" section

3 participants