Skip to content

Allow configuring a custom runner command e.g., uv run for the Play button #26319

Backlog

Description

Summary

Allow users to configure a custom runner or launcher prefix such as uv run, poetry run, pipenv run, or a custom wrapper command in settings.json for the editor Run play button when executing Python files, even when a virtual environment .venv is already detected.

Motivation

Many Python developers use modern package and project managers like uv and rely on commands such as uv run python <file>.py or uv run <file>.py so that dependencies, environment variables, and project metadata stay automatically synced with pyproject.toml and uv.lock.

Currently, clicking the top-right Run button executes the selected Python interpreter binary directly in the terminal rather than routing through the project's runner. Because of this, uv users miss automatic environment synchronization and runner-level behaviour, making the Run button unreliable or unhelpful in uv-managed workflows.

Proposed Solution

Add a setting in settings.json configurable at both User and Workspace/Folder levels that lets users specify a runner prefix or command template for the Run action.

Example configuration prefix style:

{
  "python.run.commandPrefix": ["uv", "run"]
}

Alternative configuration template style:

{
  "python.run.commandTemplate": "uv run ${file}"
}

Expected Behaviour

  • When unset default: Preserves existing behaviour by executing the currently selected Python interpreter directly.
  • When set: Prepends or wraps the execution command triggered by the Run button with the configured runner e.g., running uv run /path/to/script.py in the integrated terminal.

Additional Context

  • Supporting this via settings.json allows seamless switching across workspaces for example, using uv run in one project, poetry run in another, and standard .venv execution in others without changing global habits.

Activity

  1. added
    feature-request
    on Nov 28, 2026
  2. added
    triage-needed
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requesttriage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions