-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add crewai install CLI command (#1203)
* feat: Add crewai install CLI command * feat: Add crewai install to the docs and force now crewai run
- Loading branch information
1 parent
ddda8f6
commit 231a833
Showing
7 changed files
with
38 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import subprocess | ||
|
||
import click | ||
|
||
|
||
def install_crew() -> None: | ||
""" | ||
Install the crew by running the Poetry command to lock and install. | ||
""" | ||
try: | ||
subprocess.run(["poetry", "lock"], check=True, capture_output=False, text=True) | ||
subprocess.run( | ||
["poetry", "install"], 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) | ||
click.echo(e.output, err=True) | ||
|
||
except Exception as e: | ||
click.echo(f"An unexpected error occurred: {e}", err=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters