-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswarm
More file actions
executable file
·46 lines (40 loc) · 1.39 KB
/
Copy pathswarm
File metadata and controls
executable file
·46 lines (40 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3
"""
Cleo Agent Stack — Interactive CLI.
Usage:
cleo # interactive chat (default)
cleo configure # full setup wizard (re-configure)
cleo --setup # alias for configure
cleo run "task" # one-shot task
cleo status # task board
cleo scores # reputation scores
cleo doctor # system health check
cleo gateway # start HTTP gateway (foreground)
cleo agents add <name> # add an agent to the team
"""
import os
import sys
# Always run from the project root
os.chdir(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
if __name__ == "__main__":
from core.env_loader import load_dotenv
load_dotenv()
cmd = sys.argv[1] if len(sys.argv) > 1 else ""
# Fast routes (avoid importing main module for simple commands)
if cmd == "configure" or "--setup" in sys.argv:
from core.onboard import run_onboard
run_onboard()
elif cmd == "doctor":
from main import cmd_doctor
cmd_doctor()
elif cmd == "gateway":
from main import cmd_gateway
cmd_gateway()
elif cmd == "" and len(sys.argv) == 1:
from main import interactive_main
interactive_main()
else:
# All other commands → argparse in main.py
from main import main
main()