Skip to content

Commit

Permalink
added command stub to match the others and . (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilien authored Feb 4, 2025
1 parent 1da99e4 commit 3f921ae
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions bee-hive/cli/beeAI.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
Usage:
beeAI validate SCHEMA_FILE YAML_FILE [options]
beeAI create AGENTS_FILE [options]
beeAI run AGENTS_FILE WORKFLOW_FILE [options]
beeAI deploy AGENTS_FILE WORKFLOW_FILE [options]
Expand Down
2 changes: 2 additions & 0 deletions bee-hive/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def __init__(self, args):
def command(self):
if self.args.get('validate') and self.args['validate']:
return Validate(self.args)
elif self.args.get('create') and self.args['create']:
return Create(self.args)
elif self.args.get('run') and self.args['run']:
return Run(self.args)
elif self.args.get('deploy') and self.args['deploy']:
Expand Down
17 changes: 17 additions & 0 deletions bee-hive/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def execute(self):
def dispatch(self):
if self.args['validate']:
return self.validate
elif self.args['create']:
return self.create
elif self.args['run']:
return self.run
elif self.args['deploy']:
Expand Down Expand Up @@ -86,6 +88,21 @@ def validate(self):
return 1
return 0

# Create command group
class Create(Command):
def __init__(self, args):
self.args = args
super().__init__(self.args)

def AGENTS_FILE(self):
return self.args['AGENTS_FILE']

def name(self):
return "create"

def create(self):
Console.ok("create: {agents_file}: OK.".format(agents_file=self.AGENTS_FILE()))

# Run command group
class Run(Command):
def __init__(self, args):
Expand Down

0 comments on commit 3f921ae

Please sign in to comment.