mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-06 17:52:35 +00:00
Copy all CLI source modules from lib/crewai/src/crewai/cli/ to the new lib/cli/src/crewai_cli/ package, updating internal imports from crewai.cli.* to crewai_cli.* throughout. Includes: authentication, deploy, enterprise, organization, settings, tools, triggers, templates, and all top-level CLI command modules. Also excludes lib/cli/ from pre-commit mypy checks to match existing behavior (original CLI code has the same type gaps).
24 lines
620 B
Python
24 lines
620 B
Python
import subprocess
|
|
|
|
import click
|
|
|
|
|
|
def plot_flow() -> None:
|
|
"""
|
|
Plot the flow by running a command in the UV environment.
|
|
"""
|
|
command = ["uv", "run", "plot"]
|
|
|
|
try:
|
|
result = subprocess.run(command, capture_output=False, text=True, check=True) # noqa: S603
|
|
|
|
if result.stderr:
|
|
click.echo(result.stderr, err=True)
|
|
|
|
except subprocess.CalledProcessError as e:
|
|
click.echo(f"An error occurred while plotting the flow: {e}", err=True)
|
|
click.echo(e.output, err=True)
|
|
|
|
except Exception as e:
|
|
click.echo(f"An unexpected error occurred: {e}", err=True)
|