with one click
use-venv
// Prefer the repository .venv Python interpreter for Python commands, tests, scripts, package tooling, and AI coding workflows when .venv exists.
// Prefer the repository .venv Python interpreter for Python commands, tests, scripts, package tooling, and AI coding workflows when .venv exists.
| name | use-venv |
| description | Prefer the repository .venv Python interpreter for Python commands, tests, scripts, package tooling, and AI coding workflows when .venv exists. |
When running Python commands in this repository, use the local virtual environment if it exists.
Before Python commands, resolve the interpreter:
$py = if (Test-Path .\.venv\Scripts\python.exe) { ".\.venv\Scripts\python.exe" } else { "python" }
Then run commands through that interpreter:
& $py -m py_compile ok\util\logger.py
& $py -m pytest tests
& $py .\.agents\skills\compile_i18n\add_translation.py --help
& $py -m pip install -r requirements.txt
Do not call global python, pip, or pytest directly when .venv exists. Use & $py, & $py -m pip, and & $py -m pytest instead.
How to add i18n to all the ts files, and use the compile_i18n.cmd command to compile the ts files
Generate a commit message, commit all changes, run deploy_pip.ps1 to publish to PyPI, and tag HEAD with the deployed version on success
Generate a commit message based on current changes and commit all staged and unstaged changes to git