This guide is the Windows PowerShell path for installing and running KOMU CLI without guessing where the command lives.
Run all of these in PowerShell:
Get-Command python
Get-Command py
Get-Command pip
where.exe python
where.exe py
where.exe pipHealthy outcomes:
pythonresolves, orpyresolves, andpython -m pipworks
If python or pip is not recognized, fix Python before debugging KOMU.
Windows can reserve python.exe and python3.exe as App Execution Aliases.
If python opens Microsoft Store or behaves inconsistently:
- open
Settings - go to
Apps - open
Advanced app settings - open
App execution aliases - disable
python.exeandpython3.exe
Then reopen PowerShell and run:
python --version
python -m pip --versionSome Windows users have py even when python is unreliable.
These are valid:
py --version
py -m pip --version
py -m venv .venvIf both python and py fail, repair or reinstall Python 3.11+ and enable the PATH option during setup.
Use this when you are actively developing KOMU:
python -m venv .venv
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\.venv\Scripts\Activate.ps1
python -m pip install -e .[dev]
komu --helpImportant:
komulives in.venv\Scripts- it works while that venv is active
- it is not a normal user-level install
Use this when you want komu available outside the repo venv:
python -m pip install --user .Then find the user Scripts directory:
$userBase = python -c "import site; print(site.USER_BASE)"
$userScripts = Join-Path $userBase "Scripts"
$userScriptsPowerShell must have $userScripts on PATH to discover komu.
Validation:
Get-Command komu
where.exe komuIf needed:
- add
$userScriptsto your user PATH - close PowerShell
- open a new PowerShell session
This is the cleanest install mode for a CLI product.
Install pipx once:
python -m pip install --user pipx
python -m pipx ensurepathRestart PowerShell, then install KOMU:
pipx install .
komu --helpWhen the repo is published on GitHub:
pipx install git+https://github.com/<owner>/<repo>.gitBecause the command was created in .venv\Scripts, and PowerShell only knew about it when the venv activation script added that directory to PATH.
That behavior is correct for development mode.
It is not the same as:
python -m pip install --user .pipx install .
Those installs create a command outside the repo venv.
Use these commands:
Get-Command komu
where.exe komu
python -m pip show komu-cliTypical locations:
- repo venv:
C:\path\to\repo\.venv\Scripts\komu.exe - user install:
%APPDATA%\Python\PythonXY\Scripts\komu.exe - pipx install: the pipx-managed command path
Minimum checks:
komu --version
komu --help
komu providers list
komu profiles list
python -m komu_cli --helpIf you want a fuller smoke pass:
komu profiles add --label dev --host 10.0.0.10 --username ubuntu --auth-method agent
komu profiles show dev
komu plan "restart nginx" --profile dev --no-inspect
komu explain last
komu history
komu profiles remove dev --yesAfter any install that changes PATH or writes a new komu.exe into a Scripts directory, open a new PowerShell window before concluding the command is broken.
This matters for:
- Python install or repair
pip install --userpipx ensurepath- editing environment variables in Windows settings
- Python missing
- Python install directory missing from PATH
- Microsoft Store alias interference
- Scripts directory missing from PATH
- use
python -m pipinstead
- installed only inside a repo venv
- user Scripts directory not on PATH
- new shell not opened after install
pipx ensurepathnot run yet
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass- the Python launcher is not installed or not working correctly
- use
pythonif available, otherwise repair the Python install
- the package entrypoint is defined in
pyproject.tomlaskomu = "komu_cli.cli.app:run" python -m komu_cliworks throughsrc/komu_cli/__main__.py- playbook data is shipped as package data
- the package now includes
py.typedfor typed-distribution friendliness
For a deeper explanation of PATH and command routing, see: