diff --git a/codeflash/cli_cmds/init_javascript.py b/codeflash/cli_cmds/init_javascript.py index 9a3b03a93..fcd3c4b57 100644 --- a/codeflash/cli_cmds/init_javascript.py +++ b/codeflash/cli_cmds/init_javascript.py @@ -700,9 +700,9 @@ def get_js_codeflash_install_step(pkg_manager: JsPackageManager, *, is_dependenc # Codeflash will be installed with other dependencies return "" - # Install codeflash via uv (Python + uv are set up in the workflow) + # Install codeflash via uv pip (Python + uv are set up in the workflow) return """- name: 📥 Install Codeflash - run: uv tool install codeflash""" + run: uv pip install codeflash""" def get_js_codeflash_run_command(pkg_manager: JsPackageManager, *, is_dependency: bool) -> str: diff --git a/docs/getting-started/javascript-installation.mdx b/docs/getting-started/javascript-installation.mdx index 3075e9675..9d109f249 100644 --- a/docs/getting-started/javascript-installation.mdx +++ b/docs/getting-started/javascript-installation.mdx @@ -76,7 +76,7 @@ bun add --dev codeflash ```bash pip install codeflash # or -uv tool install codeflash +uv pip install codeflash ``` The Python CLI orchestrates the optimization pipeline, while the npm package provides the JavaScript runtime (test runners, serialization, reporters). diff --git a/tests/code_utils/test_js_workflow_helpers.py b/tests/code_utils/test_js_workflow_helpers.py index 15e43db4f..56b99455a 100644 --- a/tests/code_utils/test_js_workflow_helpers.py +++ b/tests/code_utils/test_js_workflow_helpers.py @@ -131,13 +131,13 @@ class TestGetJsCodeflashInstallStep: assert result == "" - def test_uv_tool_install_when_not_dependency(self) -> None: - """Should generate uv tool install when not a dependency, regardless of package manager.""" + def test_uv_pip_install_when_not_dependency(self) -> None: + """Should generate uv pip install when not a dependency, regardless of package manager.""" for pkg_manager in (JsPackageManager.NPM, JsPackageManager.YARN, JsPackageManager.PNPM, JsPackageManager.BUN): result = get_js_codeflash_install_step(pkg_manager, is_dependency=False) assert "Install Codeflash" in result - assert "uv tool install codeflash" in result + assert "uv pip install codeflash" in result class TestGetJsCodeflashRunCommand: