mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-04 08:42:38 +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
575 B
Python
24 lines
575 B
Python
"""Wrapper for the crew chat command.
|
|
|
|
Delegates to ``crewai.cli.crew_chat.run_chat`` when the full crewai package is
|
|
installed, otherwise prints a helpful error message.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import click
|
|
|
|
|
|
def run_chat() -> None:
|
|
try:
|
|
from crewai.cli.crew_chat import run_chat as _run_chat
|
|
except ImportError:
|
|
click.secho(
|
|
"The 'chat' command requires the full crewai package.\n"
|
|
"Install it with: pip install crewai",
|
|
fg="red",
|
|
)
|
|
raise SystemExit(1) from None
|
|
|
|
_run_chat()
|