def execute(
        self, cmd: Sequence[str], input: bytes | None = None, use_exec: bool = False
    ) -> int:
        """
        Execute the given cmd as a subprocess inside the uv managed dev environment.

        We simply use `uv run`, which handles the virtualenv and other setup for us.
        """

        uv_run_options = []
        if self.context.ui and self.context.ui.verbosity > 0:
            uv_run_options.append("-v")
        elif self.context.ui and self.context.ui.verbosity < 0:
            uv_run_options.append("-q")

        if self.working_dir:
            # Explicitly set the working directory and project directory for uv
            uv_run_options.append(f"--directory={self.working_dir}")
            uv_run_options.append(f"--project={self.context.config.project_dir}")

        # Run this task with `uv run`
        return self._execute_cmd(
            (self._uv_cmd(), "run", *uv_run_options, *cmd),
            input=input,
            use_exec=use_exec,
        )

        Execute the given cmd as a subprocess inside the uv managed dev environment.

        We simply use `uv run`, which handles the virtualenv and other setup for us.
        
poethepoet/executor/uv.py