Improve crewai run startup UX (#6297)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled

Remove redundant startup logs from `crewai run` and make the legacy flow
command warning actionable.

- Stop printing `Running the Flow` and `Running the Crew` before project
  execution.
- Stop printing the redundant `Flow started with ID: ...` line while
  preserving flow lifecycle event emission.
- Replace Click's generic `kickoff` deprecation warning with a clearer
  message that tells users to use `crewai run`.
This commit is contained in:
Vinicius Brasil
2026-06-22 22:31:39 -07:00
committed by GitHub
parent 221dfdb08e
commit 2eb4e3a236
7 changed files with 19 additions and 15 deletions

View File

@@ -787,9 +787,13 @@ def flow() -> None:
"""Flow related commands."""
@flow.command(name="kickoff", deprecated=True)
@flow.command(name="kickoff")
def flow_run() -> None:
"""Kickoff the Flow."""
click.secho(
"The command 'crewai flow kickoff' is deprecated. Use 'crewai run' instead.",
fg="yellow",
)
run_crew(trained_agents_file=None, definition=None, inputs=None)

View File

@@ -595,7 +595,6 @@ def _run_flow_project(
if trained_agents_file is not None:
raise click.UsageError("--filename can only be used when running crews")
click.echo("Running the Flow")
from crewai_cli.run_declarative_flow import (
configured_project_declarative_flow,
run_declarative_flow_in_project_env,
@@ -611,7 +610,6 @@ def _run_flow_project(
def _run_classic_crew_project(
pyproject_data: dict[str, Any], trained_agents_file: str | None
) -> None:
click.echo("Running the Crew")
_execute_uv_script(
"run_crew",
entity_type="crew",