This worked for me:
pip install uv
uv tool install leo-cub # On Windows, installs in
C:\Users\Dev\.local\bin
Per my (somewhat eccentric workflow), I leave the Python path unchanged.
Instead, I defined c:\scripts leo-cub.cmd as follows: (c:\scripts is on my path):
@echo off
cd C:\Repos\leo-editor
C:\Users\Dev\.local\bin\cub.exe tui leo\core\leoPy.leo %*
Now, typing leo-cub from a console opens leoPy.leo in leo-cub.
And typing leo-cub -h types:
c:\Scripts>leo-cub -h
Browse an outline interactively (read-only)
Usage: cub.exe tui [OPTIONS] <FILE>
Arguments:
<FILE>
Options:
--no-derived Show only the hierarchy stored directly in the .leo XML
-h, --help Print help
HTH.
Edward