Skip to content

✨ How to define custom commands like tool.rye.scripts #6302

@jd-solanki

Description

@jd-solanki

Hi πŸ‘‹πŸ»

I'm really happy for UV. I always wanted better python ecosystem thanks all of you for your efforts.

I want to migrate from rye to UV as I'm starting new project and wanted to add custom command like uv run dev that executes uv run fastapi dev src/backend/main.py for me.

In Rye, I used to define it under scripts section:

[tool.rye.scripts]
dev = "uvicorn aitools.main:app --reload"
migration = "alembic revision --autogenerate -m"
migrate = "alembic upgrade head"
downgrade = "alembic downgrade -1"

However, It looks like UV don't have this feature or isn't documented yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement to existing functionalityprojectsRelated to project management capabilities

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions