Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

Forward install command options to `uv sync` (#1510)

Vini Brasilf29f4abdd7ea
diff --git a/src/crewai/cli/cli.py b/src/crewai/cli/cli.py
index 460128634..1ea2ef4e2 100644
--- a/src/crewai/cli/cli.py
+++ b/src/crewai/cli/cli.py
@@ -178,10 +178,14 @@ def test(n_iterations: int, model: str):
evaluate_crew(n_iterations, model)
-def install():
[email protected](context_settings=dict(
+ ignore_unknown_options=True,
+ allow_extra_args=True,
+))
+def install(context):
"""Install the Crew."""
- install_crew()
+ install_crew(context.args)
@crewai.command()
diff --git a/src/crewai/cli/install_crew.py b/src/crewai/cli/install_crew.py
index 35206e5eb..d1d0ab9da 100644
--- a/src/crewai/cli/install_crew.py
+++ b/src/crewai/cli/install_crew.py
@@ -3,12 +3,13 @@ import subprocess
import click
-def install_crew() -> None:
+def install_crew(proxy_options: list[str]) -> None:
"""
Install the crew by running the UV command to lock and install.
"""
try:
- subprocess.run(["uv", "sync"], check=True, capture_output=False, text=True)
+ command = ["uv", "sync"] + proxy_options
+ subprocess.run(command, check=True, capture_output=False, text=True)
except subprocess.CalledProcessError as e:
click.echo(f"An error occurred while running the crew: {e}", err=True)