Files
hive/core/framework/cli.py
T
2026-01-20 16:28:21 -08:00

53 lines
1.5 KiB
Python

"""
Command-line interface for Goal Agent.
Usage:
python -m core run exports/my-agent --input '{"key": "value"}'
python -m core info exports/my-agent
python -m core validate exports/my-agent
python -m core list exports/
python -m core dispatch exports/ --input '{"key": "value"}'
python -m core shell exports/my-agent
Testing commands:
python -m core test-generate goal.json
python -m core test-approve <goal_id>
python -m core test-run <agent_path> --goal <goal_id>
python -m core test-debug <goal_id> <test_id>
python -m core test-list <goal_id>
python -m core test-stats <goal_id>
"""
import argparse
import sys
def main():
parser = argparse.ArgumentParser(
description="Goal Agent - Build and run goal-driven agents"
)
parser.add_argument(
"--model",
default="claude-haiku-4-5-20251001",
help="Anthropic model to use",
)
subparsers = parser.add_subparsers(dest="command", required=True)
# Register runner commands (run, info, validate, list, dispatch, shell)
from framework.runner.cli import register_commands
register_commands(subparsers)
# Register testing commands (test-generate, test-approve, test-run, test-debug, etc.)
from framework.testing.cli import register_testing_commands
register_testing_commands(subparsers)
args = parser.parse_args()
if hasattr(args, "func"):
sys.exit(args.func(args))
if __name__ == "__main__":
main()