Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions codeflash/cli_cmds/init_javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/javascript-installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 3 additions & 3 deletions tests/code_utils/test_js_workflow_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ def test_returns_empty_when_is_dependency(self) -> None:

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:
Expand Down
Loading