From 010db7790a750c5853d0607fbffda92564a3eda2 Mon Sep 17 00:00:00 2001 From: Lorenze Jay Date: Fri, 12 Jul 2024 13:46:30 -0700 Subject: [PATCH] easier cli command name --- docs/core-concepts/Crews.md | 6 +++--- src/crewai/cli/cli.py | 2 +- src/crewai/cli/templates/pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/core-concepts/Crews.md b/docs/core-concepts/Crews.md index cb8f49524..e2b751c41 100644 --- a/docs/core-concepts/Crews.md +++ b/docs/core-concepts/Crews.md @@ -156,9 +156,9 @@ for async_result in async_results: ``` ### Replaying from specific task: -You can now replay from a specific task using the `replay_from_task` method. +You can now replay from a specific task using our cli command replay. -The replay_from_tasks feature in CrewAI allows you to replay from a specific task using the command-line interface (CLI). By running the command `crewai replay_from_tasks -t `, you can specify the task name for the replay process. +The replay_from_tasks feature in CrewAI allows you to replay from a specific task using the command-line interface (CLI). By running the command `crewai replay -t `, you can specify the task name for the replay process. Kickoffs will now create a `crew_tasks_ouput.json` file with the output of the tasks which you use to retrieve the task id to replay. @@ -171,7 +171,7 @@ To use the replay_from_tasks feature, follow these steps: 3. Run the following command: ```shell -crewai replay-from-tasks -t +crewai replay -t ``` These methods provide flexibility in how you manage and execute tasks within your crew, allowing for both synchronous and asynchronous workflows tailored to your needs diff --git a/src/crewai/cli/cli.py b/src/crewai/cli/cli.py index 70fb24730..eb6ef204b 100644 --- a/src/crewai/cli/cli.py +++ b/src/crewai/cli/cli.py @@ -57,7 +57,7 @@ def train(n_iterations: int): type=str, help="Replay the crew from this task ID, including all subsequent tasks.", ) -def replay_from_task(task_id: str) -> None: +def replay(task_id: str) -> None: """ Replay the crew execution from a specific task. diff --git a/src/crewai/cli/templates/pyproject.toml b/src/crewai/cli/templates/pyproject.toml index 601445fe6..4d1d5e15e 100644 --- a/src/crewai/cli/templates/pyproject.toml +++ b/src/crewai/cli/templates/pyproject.toml @@ -11,7 +11,7 @@ crewai = { extras = ["tools"], version = "^0.35.8" } [tool.poetry.scripts] {{folder_name}} = "{{folder_name}}.main:run" train = "{{folder_name}}.main:train" -replay_from_task = "{{folder_name}}.main:replay_from_task" +replay = "{{folder_name}}.main:replay_from_task" [build-system] requires = ["poetry-core"]