mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
feat: set basic structure deploy commands
This commit is contained in:
@@ -7,12 +7,15 @@ from crewai.memory.storage.kickoff_task_outputs_storage import (
|
||||
KickoffTaskOutputsSQLiteStorage,
|
||||
)
|
||||
|
||||
from .deploy.main import DeployCommand
|
||||
from .evaluate_crew import evaluate_crew
|
||||
from .replay_from_task import replay_task_command
|
||||
from .reset_memories_command import reset_memories_command
|
||||
from .run_crew import run_crew
|
||||
from .train_crew import train_crew
|
||||
|
||||
deploy_cmd = DeployCommand("myCrew_test")
|
||||
|
||||
|
||||
@click.group()
|
||||
def crewai():
|
||||
@@ -172,5 +175,54 @@ def run():
|
||||
run_crew()
|
||||
|
||||
|
||||
# Deploy command group
|
||||
@crewai.group()
|
||||
def deploy():
|
||||
"""Deploy the Crew CLI group."""
|
||||
pass
|
||||
|
||||
|
||||
@deploy.command(name="up")
|
||||
def deploy_up():
|
||||
"""Deploy the crew."""
|
||||
deploy_cmd.deploy()
|
||||
|
||||
|
||||
@deploy.command(name="create")
|
||||
def deploy_create():
|
||||
"""Create a deployment."""
|
||||
deploy_cmd.create_crew()
|
||||
|
||||
|
||||
@deploy.command(name="list")
|
||||
def deploy_list():
|
||||
"""List all deployments."""
|
||||
deploy_cmd.list_crews()
|
||||
|
||||
|
||||
@deploy.command(name="status")
|
||||
def deply_status():
|
||||
"""Get the status of a deployment."""
|
||||
deploy_cmd.get_crew_status()
|
||||
|
||||
|
||||
@deploy.command(name="logs")
|
||||
def deploy_logs():
|
||||
"""Get the logs of a deployment."""
|
||||
deploy_cmd.get_crew_logs()
|
||||
|
||||
|
||||
@deploy.command(name="remove")
|
||||
def deploy_remove():
|
||||
"""Remove a deployment."""
|
||||
deploy_cmd.remove_crew()
|
||||
|
||||
|
||||
@deploy.command(name="signup")
|
||||
def signup():
|
||||
"""Sign up for a deployment."""
|
||||
deploy_cmd.signup()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
crewai()
|
||||
|
||||
0
src/crewai/cli/deploy/__init__.py
Normal file
0
src/crewai/cli/deploy/__init__.py
Normal file
24
src/crewai/cli/deploy/main.py
Normal file
24
src/crewai/cli/deploy/main.py
Normal file
@@ -0,0 +1,24 @@
|
||||
class DeployCommand:
|
||||
def __init__(self, project_name):
|
||||
self.project_name = project_name
|
||||
|
||||
def deploy(self):
|
||||
print("Deploying the crew...")
|
||||
|
||||
def create_crew(self):
|
||||
print("Creating deployment...")
|
||||
|
||||
def list_crews(self):
|
||||
print("Listing all deployments...")
|
||||
|
||||
def get_crew_status(self):
|
||||
print("Getting deployment status...")
|
||||
|
||||
def get_crew_logs(self):
|
||||
print("Getting deployment logs...")
|
||||
|
||||
def remove_crew(self):
|
||||
print("Removing deployment...")
|
||||
|
||||
def signup(self):
|
||||
print("Signing up for deployment...")
|
||||
Reference in New Issue
Block a user