aboutsummaryrefslogtreecommitdiff
path: root/cli.py
diff options
context:
space:
mode:
authorGravatar Swifty <craigswift13@gmail.com> 2023-09-18 16:27:03 +0200
committerGravatar GitHub <noreply@github.com> 2023-09-18 16:27:03 +0200
commit8b3a915b2f208df39996d18bb8f4620369de4c99 (patch)
tree34e475b69afa3d291acc796724f366e8f3bd7ee4 /cli.py
parentfixed code block (diff)
downloadAuto-GPT-8b3a915b2f208df39996d18bb8f4620369de4c99.tar.gz
Auto-GPT-8b3a915b2f208df39996d18bb8f4620369de4c99.tar.bz2
Auto-GPT-8b3a915b2f208df39996d18bb8f4620369de4c99.zip
Serving frontend from the forge agent server (#5252)
Diffstat (limited to 'cli.py')
-rw-r--r--cli.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli.py b/cli.py
index 89630fd1e..931fc2f15 100644
--- a/cli.py
+++ b/cli.py
@@ -264,9 +264,13 @@ def start(agent_name):
script_dir = os.path.dirname(os.path.realpath(__file__))
agent_dir = os.path.join(script_dir, f"autogpts/{agent_name}")
+ frontend_dir = os.path.join(script_dir, "frontend")
+ frontend_build = os.path.join(frontend_dir, "build.sh")
run_command = os.path.join(agent_dir, "run")
if os.path.exists(agent_dir) and os.path.isfile(run_command):
+ subprocess.Popen([frontend_build], cwd=frontend_dir)
os.chdir(agent_dir)
+
subprocess.Popen(["./run"], cwd=agent_dir)
click.echo(f"Agent '{agent_name}' started")
elif not os.path.exists(agent_dir):